🎉 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 to make 2d games with opengl

Started by
4 comments, last by GameDev.net 18 years, 4 months ago
i want to make 2d games with opengl but there are some problems: i know you can do 2d pictures by creating Quads and putting textures on them, there are is something i dont know: -how can i display just an certain area of a bitmap, not the hole bitmap? do i have to use 10 bitmaps if my character has 10 animation states?
Advertisement
Simply change your texture coords for the quad to only display a suitable portion of the complete texture/sprite sheet.
HeisHe, you may want to check this recent thread as it has details on doing exactly what OrangyTang suggests.

Good luck.
--
Cheers,
Darren Clark
This thread sort of brings up the point I came to these forums to ask about.

When making a 2d sprite kind of application, is the best way to go about it as described? Make a series of quads that are then textured as needed, and translate the whole unit to do scrolling?
Yes, that's about it.
Do run trough the tutorials, once your brain figures it out and makes all the connections, those tutorials will teach you what you need, they just require you to fill out the blanks.

2D graphics is simple, infact it's as easy as 3D, especially when you concider that 3D graphics is just an clever 2D hack.
Yeah, the tutorials have been extremely helpful. I'd been looking for a long time for something that catered to people who knew how to program but were unfamiliar with this kind of work, and these are perfect. I'll definately be running through the rest of them.

This topic is closed to new replies.

Advertisement