iDevGames Forums
2-D openGl - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: 2-D openGl (/thread-999.html)

2-D openGl - chrism - Jul 16, 2009 04:29 PM

i just wanted to post this thread to ask a couple of questions. The first question is with openGL if i want to make a 2-D game how would i make the characters. Would I just make an animation or do I need to make a shape in open gl and move the characters shapes each time and add the texture of my characters animation of him running? This is pretty much my only question so if anyone can help me by explaining how they did there 2-D game character with openGL that would be great.Smile oh and i have tried google and they dont show very many site with this kind of information becuase the iPhone is kind of new, like 3 years .

2-D openGl - ThemsAllTook - Jul 16, 2009 04:48 PM

You can do either one, or something else entirely. OpenGL doesn't dictate this to you, and there's no right or wrong way to do it; just learn how submitting geometry and texture coordinates works, and build whatever makes sense for your game on top of that.

2-D openGl - chrism - Jul 16, 2009 05:38 PM

K cool. Does anyone have any tips on collision detection? Like how they do it or easier ways of doing it?

2-D openGl - kendric - Jul 17, 2009 01:20 PM

I posted a render engine you can look at in the batch opengl thread I made. That could give you some good clues. I haven't had any feedback though if its well made or if there are better ways to do what I did. Also to answer your question. From my understanding opengl does not maintain any of your shape data. It just knows how to render vertexs(and textures between vertexes), do lighting, and various other cool graphical effects. Its up to you to have a model structure somehow that knows how big things are. As for collision detection you could try using chipmunk physics engine. You could prob just use the collision part by not putting gravirty and a couple other changes if you dont want the physics part.