Keyboard control and sprites

BlitzPlus Forums/BlitzPlus Beginners Area/Keyboard control and sprites

D2(Posted 2007) [#1]
I want to make a sample game, overhead view (as in old SNES RPGs) where you control a character who can walk in 8 directions, with sprites for left, right, up and down both walking and standing. I can either make the sprites or use a sheet from RPG Maker, that's the easy part. But I basically want to know how to make him move and change the sprites. Do I make sense at all?


b32(Posted 2007) [#2]
Use the command LoadAnimImage to load the sprite sheet.
It needs the width and height of a single frame and the number of frames that the sheet contains.
Then, use the 4th parameter of DrawImage to select which frame to draw.
Sort of like this:



D2(Posted 2007) [#3]
Thanks!


Siopses(Posted 2007) [#4]
D2, a good book to read that would help you is Game Programming For Teens.


D2(Posted 2007) [#5]
I've got that book, just I lost it until recently...and I didn't know how useful it would be nowadays. I'll look at it right away.


tonyg(Posted 2007) [#6]
I think Learn 2D Game Programming with BlitzBasic will help even with B+. It won't cover the GUI stuff but is superb for explaining how most things are done.