How should I structure my iPhone OpenGL ES 1.1 game?
- by Ryan
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.