View Single Post
Old Feb 19th, 2005, 12:55 AM   #1
InflamedSpirit
Newbie
 
Join Date: Feb 2005
Posts: 3
Rep Power: 0 InflamedSpirit is on a distinguished road
Question Sprite-Based Games

I have a few questions regarding some good ways to use sprites. Has anyone ever played the game Littlefighter2? (its written in C++ i think) It has these text files with something along the following.

Frame 1 pic:1 goto:2 wait:3 dx:0 dy:0 ifkeya:4 ifkeyb:10 ifkeyc:42
Frame 2 pic:2 goto:3 wait:3 dx:0 dy:0 ifkeya:5 ifkeyb:10 ifkeyc:20
Frame 3 pic:3 goto:1 wait:3 dx:0 dy:0 ifkeya:5 ifkeyb:10 ifkeyc:20

...
...this continues for hundreds of frames...
...
Note that these are noncompiled files that can just be edited in a text program and obviously the program reads these lines and interperates them somehow.


My question is what would be a good way to have a setup like above (in java)?
Would it be better to have text files like this or have it all in the program?
And how would I go around doing this or structure it (what would the classes/functions look like)?


I would really appriciate any answer, thanks in advance.
InflamedSpirit is offline   Reply With Quote