|
|
|
|
|
|
|
|
Re: Improving the original JA2 graphics [message #222115]
|
Sat, 20 June 2009 01:15
|
|
Shanga |
|
Messages:3482
Registered:January 2000 Location: Danubia |
|
|
Quote: order to establish what to render we need to konw how this engine is working and how many files can be combined to obtain the desired result.
Lisac posted a lot of info on animations, might be worth a reading.
But basically, yes, JA2 loads sti files composed of static isometric frames and animates them like kids do with drawings on the edge of a notebook (or Lumiere did with his 1st cinema). Very basic stuff. And very tiresome to edit since each bodytype has different stances too. And for each stance you have separate animations for direction facing (N,S,W,E, NE,NW,SE,SW, etc). I think we're talking about hundreds of files.
There's been talk about an automated script who can assemble those in a sti files directly after rendering, but nothing was produced. Yet.
Anyway, BirfFlu and Lisac know way more than me on the subject so I'll just shuttup now.
Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Improving the original JA2 graphics [message #222161]
|
Sat, 20 June 2009 10:55
|
|
Maalstroom |
|
Messages:340
Registered:December 2008 Location: en route to San Hermanos |
|
|
ok about coding - i work with vba for autocad this is something i wrote for my personal use (it's a classic)
Public Function PopulateListControlFromFile( _
ListControl As Object, FullPath As String, _
Optional Delimiter As String = vbCrLf) _
As Boolean
Dim objFso As New Scripting.FileSystemObject
Dim objTextStream As Scripting.TextStream
Dim strContents As String
Dim arrContents() As String
Dim lCtr As Long, lCount As Long
On Error GoTo ErrHandler:
If Dir(FullPath) = "" Then Exit Function
ListControl.Clear
Set objTextStream = objFso.OpenTextFile(FullPath, ForReading)
strContents = objTextStream.ReadAll
objTextStream.Close
arrContents = Split(strContents, Delimiter)
lCount = UBound(arrContents)
For lCtr = 0 To lCount
ListControl.AddItem arrContents(lCtr)
Next
If ListControl.ListCount > 0 Then
ListControl.ListIndex = 0
End If
PopulateListControlFromFile = True
ErrHandler:
Set objTextStream = Nothing
Set objFso = Nothing
End Function
Private Sub ComboBox1_Change()
PopulateListControlFromFile ListBox1, _
"C:\layers\" + ComboBox1.Value + ".txt"
End Sub
Private Sub CommandButton1_Click()
Dim Layerc As AcadLayer
Dim values As String
Dim Lname, Lcolor, lin, LinWeight, LDescription As Variant
Dim LinType As AcadLineType
Dim Vectorlist(0 To 5) As Integer
Dim counter1, counter2 As Integer
values = ListBox1.Value
counter1 = 1
counter2 = 0
Do While counter1 < Len(values)
If Asc(Mid(values, counter1, 1)) <> 9 Then
counter1 = counter1 + 1
Else
Vectorlist(counter2) = counter1 - 1
counter2 = counter2 + 1
counter1 = counter1 + 1
End If
Loop
Lname = Mid(values, 1, Vectorlist(0))
Lcolor = Mid(values, Vectorlist(0) + 1, Vectorlist(1) - Vectorlist(0))
LinWeight = Mid(values, Vectorlist(2) + 1, Vectorlist(3) - Vectorlist(2))
LDescription = Mid(values, Vectorlist(3) + 2)
Set Layerc = ThisDrawing.Layers.Add(Lname)
ThisDrawing.ActiveLayer = Layerc
Layerc.color = Lcolor
lin = Mid(values, Vectorlist(1) + 2, Vectorlist(2) - Vectorlist(1) - 1)
Layerc.Linetype = lin
Layerc.Lineweight = LinWeight
Layerc.Description = LDescription
End Sub
Private Sub UserForm_Initialize()
PopulateListControlFromFile ComboBox1, _
"C:\layers\MainGrup.txt"
End Sub
if birdflu has time he can just explain and point in the right direction i'll try c++ too even if i haven't done any in years!
Report message to a moderator
|
Master Sergeant
|
|
|
|
|
|
Re: Improving the original JA2 graphics [message #223528]
|
Fri, 26 June 2009 14:20
|
|
Shanga |
|
Messages:3482
Registered:January 2000 Location: Danubia |
|
|
JA2 objects are represented in two parts: an image (STI) and an invisible physical "body" (JSD). Graphically JSDs can be represented as cubes (1 tile high, 1 tile wide, 1 tile deep). These basic building blocks are the "sculptured" using smaller cubes, 5 per side. So a basic JSD cube is 5x5x5 small cubes, which are indeed the smallest unit.
Here's a graphical representation of height:
A human standing is 4 small cubes high. Max height is 10 small cubes (2 big JSDs on top of each other).
As for trees are represented from two parts. Trunks are made from 1 JSD, the top part (leaves and branches) are represented by another JSD (big) cube. Both are sculpted to fit the graphical images as good as possible.
If you would place a human near a tree trunk he should be 4/5 of it. Which in general can be said is a medium height of trees, unless you want very tall ones like palms. Even those could be done, but I don't see what the practical use would be, since you cannot climb them anyway.
Conclusion: You can draw trees as high as you like. But as far their "material properties" go, they can only be 2x human size + some loose change...
[Updated on: Fri, 26 June 2009 14:21] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Improving the original JA2 graphics [message #223539]
|
Fri, 26 June 2009 15:39
|
|
Thor |
|
Messages:423
Registered:February 2007 Location: Belgium |
|
|
Why don't we try implementing multi-layered buildings now? Is it that hard to implement if it was already possible in Xcom (THE 1980s game)? I know it's a popular topic and I don't wish to spam this thread, but with the fine coders we have now and the revolution we're about to have in different possible layers, the knowledge of JSDs... I
As we can walk on roofs, why not make walls on the first level (the one above ground floor)? We know about JSDs now, so what's the problem...
And if trenches are easy through optical illusion, why not have walkable roofs on the second level as we have now for first level? A manned watchtower and some real rooftop sniping would be possible this way...
Okay I suppose we need a tileset with ladders, staircases and some new climbing animations, but I can handle that with the new Russian editor.
And the layer button [tab] would have an option more like the burst button...
[Updated on: Fri, 26 June 2009 16:01] by Moderator Report message to a moderator
|
Master Sergeant
|
|
|
|
|
|
|
|
|
|
|
Re: Improving the original JA2 graphics – Sprites (2)[message #233313]
|
Wed, 16 September 2009 14:40
|
|
rasz |
|
Messages:38
Registered:August 2006 |
|
|
ShangaJA2 objects are represented in two parts: an image (STI) and an invisible physical "body" (JSD). Graphically JSDs can be represented as cubes (1 tile high, 1 tile wide, 1 tile deep). These basic building blocks are the "sculptured" using smaller cubes, 5 per side. So a basic JSD cube is 5x5x5 small cubes, which are indeed the smallest unit.
If I read this correctly it should be possible to render Map sectors as 3D objects. Ignore textures (STI) and just interpret JDS as 3D building blocks (like Lego Designer http://ldd.lego.com/ ).
I guess it wouldnt look good at first, but with some polish and new textures it could eventually work.
Example : Unreal Tournament 3 mod features a totally destructible LEGO block environment
http://www.youtube.com/watch?v=1JSLpId6bvE
[Updated on: Wed, 16 September 2009 14:43] by Moderator Report message to a moderator
|
Private 1st Class
|
|
|
|
|
|
|
|
|