Keyboard control and sprites
BlitzPlus Forums/BlitzPlus Beginners Area/Keyboard control and sprites
| ||
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? |
| ||
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: |
| ||
Thanks! |
| ||
D2, a good book to read that would help you is Game Programming For Teens. |
| ||
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. |
| ||
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. |