🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How can I animate my character in VB ?

Started by
2 comments, last by GameDev.net 24 years, 7 months ago
I also am new to writing games. My approach (I have warned you you see, I am sure there are better ways) is to create seperate bitmaps for each stage of an animation. Hard work you say, well I guess so.

These could then be collected in a single bitmap file. When you run your program this bitmap could be loaded into an offscreen buffer. Then when you wish to animate, you can just copy the area that contains frame 1 of the animation from the buffer to the screen, then do the same with each frame in turn.

Just a suggestion. As I say there are bound to be different (better?) ways.

Woop

Advertisement
Creating an array of sprites is definitely the easiest way to handle this, its fast too, so there arent a lot of disadvantages.

You can also either parse the array from a standard Windows BMP upon loading, or pre-parse it into a data file so that you dont have to do those operations every time you run the game (faster, but you have to keep converting your art when you make changes).

-Geoff

I have created a sprite file in PSP 5 and saved it as a bitmap. I also created a mask but now my problem is how do I animate him so the mask dosen't show ? I am unsure of BitBlt and am fairly new to VB and am making a game for fun. All I need to do is animate him with the background where the pink is. Can anyone help me write a routine to do this?!
I hope you're still reading Geoff.

Okay so my reply 'works' but it is probably rather 'amateur'. But then that is my current position.

Could you possibly expand on the 'pre-parse into a data file' comment. I know what parsing is, but what you have mentioned is something I know nothing about. Alternatively if you can suggest anywhere I might be able to read up on this, I would be very appreciative.

Thanks,

Woop

This topic is closed to new replies.

Advertisement