Advertisement

animated sprite

Started by May 27, 2021 03:03 AM
8 comments, last by pbivens67 3 years, 5 months ago

I am using glut and soil, I have got an animated sprite to move up and down and left and right on a black screen. I just want to know what to add to my code. I want to work on a small 2d platformer.

Sorry what is your question here? Do you want to know how to draw an animated sprite?

One way is to have a different texture/image per frame.

Another option is to put all the frames in a single image, and adjust the UV coordinates of the quad you draw to specify just the part of the image containing the desired frame.

Advertisement

I have got my sprite to animate, I just want to know what features to add to my game

pbivens67 said:

I have got my sprite to animate, I just want to know what features to add to my game

Add trading and double jump!

@pbivens67 You really need to share some more of what you have done and are trying to do?

Assuming you have static and animated sprites to give you the player and the map, I guess the next step is to make it actually do something. Give the player object some gravity and the collision detection to not fall through the floor so they can walk along and fall off a platform. Then give them the ability to jump to reach another platform. Add a level complete when the player reaches a specific point.

That then is your core for a platformer game.

You will still need other major systems, such as music, sound effects, user interface, etc.

After that it really depends on your game. There are many possibilities ….

Advertisement

pbivens67 said:

I am using glut and soil, I have got an animated sprite to move up and down and left and right on a black screen. I just want to know what to add to my code. I want to work on a small 2d platformer.

Also, why are you using glut? Support for glut ended in like 2005 (maybe 2010?). Please for the love of all that is holy, please stop using it. It has well known bugs that will never be fixed.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

well I use glut because it is what I learned in college

You have posted multiple times with some very generic questions and then not been very helpful answering questions that we ask to try to help you. Did you ever take any of the advice given in the other threads? Like the one about that 3d FPS? Or the other 3d game? Or now something completely different. I'm nobody's boss of course, but you seem to be all over the place with no focus on anything. Are you really just trying to do all of this stuff at the same time or what's going on?



well I am trying to do several projects at one time, I guess I have a short attention span, sorry.

This topic is closed to new replies.

Advertisement