Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MadKnIghT

Sprite!

This topic is 6913 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay...Can any1 here help me how to Load a sprite and animate ''em? i have a bitmap that contains 6 frame of sprite but i dunno how to load,draw and animate ''em i don''t have the specific function/engine so please some1 help me regards,MadKnIghT

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
If you are developing your game with DirectX, you must:
1- Create a surface with CreateSurface
2- Load the bitmap into the surface with the Win32 API

Then you can blit this surface into the Primary surface

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
MadKnIghT, it''s really simple... I dont known how your sprite are disposed in your bitmap. But anyway, i think the best way will be to create a array of small bitmap of the size of the sprite and simply load each frame of the sprite to a index in this array. For animate them, simply make a loop that will show each frame one after the other...

The other thing that will be possible it''s to load all the frame of your sprite into one bitmap in mem. then calculate the frame to show..

Sorry, im french ...


Just hope that will help you !!

Share this post


Link to post
Share on other sites
if u''r developing game under directX, then I''ll give u a link:

Make each sprite as a bitmap with frame index like sprite0.bmp, sprite1.bmp and so on..
then go to :http://members.home.net/theluckyleper/
tutorials and directx animation.. that''s all !! copy and be happy!!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!