Jump to content
  • Advertisement


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



This topic is 5549 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

Hmm might I suggest you start with a console game, if you don''t understand c/c++ then you shouldn''t try this yet make a text game first to imporve your skills then you can start working on that. Anyway to use sprites you probably want to use some kind of API like windows, opengl, or directx but for that you need a good undertanding of c/c++. Once you made a few text games and you have a basic understanding then you should be ready to start using one of those, you can try SDL, or allegro, to make things easier as well.

Share this post

Link to post
Share on other sites
Well, sprites are pictures, with a transparency color. A sprie is made of several pictures, and your program must find out, which picture must be displayed.
For example, 3 pictures for walking, 3 pictures for jumping, 2 picures for shooting...

- Seby -

Share this post

Link to post
Share on other sites
Let''s see now.

How much do you know about ''traditional'' animation techniques?

Acrylic cel - the technique Disney used to use - was a way of building up each frame of animation in layers. You''d have sheets of clear plastic, painted with whatever it was you wanted for that layer. So, animators could reuse backdrops (which were expensive) by ''layering'' different characters and stuff on top. A character itself could often be composed of several layers - say you wanted a character to wave, you could just rotate the layers with the sections of his arm on. Alternatively, you could draw out the arm a bunch of times in different positions.

Those are like your sprites. Given a backdrop, you ''overlay'' images - characters (the player or enemies), scenery (like, say, a tree that you want to be drawn on top of the player), powerups, you name it. Each sprite will have a number of different ''frames of animation'' - the second method, ''arm painted in every position'' technique I mentioned earlier - so you pick the frame you want and draw it. In many cases, you''ll have a ''sequence'' of frames - for example, a ''walk'' sequence, which you''ll just loop until the player stops walking.

As for how to get them into the game - you''ll need to load a image file (or files) with all your frames of animation in, maybe extract each individual frame (copy the pixels out to another surface), and then when drawing, decide on a ''transparent'' color (a ''color key''), and don''t draw any pixels which are that color. If your sprite was composed of dark, gloomy colors, you could fill the area around it - which you dont'' want to be drawn - with bright purple, say. That way you can test for that color without worrying that bits of the sprite you *do* want are getting ignored.

- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!