How should I structure my iPhone OpenGL ES 1.1 game?
Posted
by Ryan
on Stack Overflow
See other posts from Stack Overflow
or by Ryan
Published on 2010-06-01T04:32:36Z
Indexed on
2010/06/01
4:33 UTC
Read the original article
Hit count: 203
I am building an iPhone OpenGL ES 1.1 game. I am using the OpenGL ES template provided by xcode. I am only using the ES1Renderer.
I've coded some basic touch actions the user can take, and I've begun to think about the overall structure of the code. All I'm really doing is using C in the ES1Renderer.m for my entire game state. I have an array of bullet structs, an array on enemy structs, etc..
Besides using this structure, where my entire game state is in ES1Renderer.m as C arrays and structs, what other ways are there to structure the code? Should I be using C++ or Objective-C classes to represent the enemies so they are more modular?
The main reason I ask this is because I don't normally code in C, C++ and Objective-C..so I am a little fuzzy on coming up with a good architecture here.
© Stack Overflow or respective owner