PDA

View Full Version : Sprites / Character animation using INI file



Petr Schreiber
22-12-2009, 08:28
Hi,

here comes little variation of the previous code, but with some auxiliary functions preventing hardcoding of the data.
All animation info is stored inside INI file.


Petr

file updated on Mar 18th, 2012

kryton9
22-12-2009, 10:24
Thanks again Petr for the example.

Petr Schreiber
22-12-2009, 10:31
Thanks Kent,

this is basically the same as previous one, but the separation of data and code should make this solution slightly better.
There is big power in sprite functions, I hope more tutorials will help to unleash it :)

Michael Hartlef
22-12-2009, 16:03
Thanks again man! :eusaclap:

Lionheart008
22-12-2009, 18:54
hi petr, thanks a lot, that's really cute :)

here I have a "house" for you, perhaps you can build a sweet home for the nice little robot. for my version he can run up (up) and down (space) ;)

I don't know how to specify "house" in your code example that can move too !
just an idea.

best regards, frank

Petr Schreiber
22-12-2009, 21:08
Hi Frank,

nice mod.
To add house to scene, simply use TBGL_SpriteLoad.
It will be demonstrated further in next tutorials, stay tuned ;)

Petr Schreiber
23-12-2009, 11:46
Updated the file,

latest thinBASIC beta (http://community.thinbasic.com/index.php?topic=2899.msg21972#msg21972) required, the code got easier as animation can now be determined using TBGL_SpriteSetAnimType.