Isometric States Demo
Shri

Gio,

I was thinking it would be nice if you could define your own isometric states and their accompanying animations rather than sticking with the predefined idle, walk, etc.

Anyway, I made some modifications to the isoCharacter file to do that. It is quick and dirty, no error checking, fallback states, etc, but it works. Look at the code for the "Ashatej" tag to see where I made the changes.

Basically, I have a flying dragon that has 4 "states" red, green ,black and purple (I did this because it was easy to take the flying animation sheet and color shift in photoshop). Then you define the animations for these states in eight directinos in the json file. i.e red_iso_n. When the iso character is created, its' state machine is passed in as an array of strings. As the user transitions states, the current state of the iso object is set and the appropriate animation is played. In the demo, you switch states by hitting the keys (r-red, g-green, b-black, p-purple). The user is responsible for advancing the state machine to the correct state. I tested it on chrome and firefox and it seems to work as expected.

Not sure how hard this kind of thing would be to integrate with the online editor, but it would be nice to be able to define your own states and machine.

I got the isometric dragon images from this guy.

Anyway, I have attached the whole thing as a zip, it should run out of the box.

cheers,

Shri

1 Comment
Gio

Thanks Shri

I think it's a good idea to have such a state machine in IsoCharacter, I will try to find out what would be needed to integrate this in the editor in a neat way. It definitely makes sense from an interface standpoint.

Post a reply
Add Attachment
Submit Reply
Login to Reply