• Register

OOK, Once I Owned a Kestrel, is now being revamped. Previously, it was to be released solely on iPhone and iPad. Now, iPhone, iPad, and other mobile devices are dropped and it will be primarily a desktop project. Welcome to the new OOK. Enjoy.

Report RSS HUD, Cleanup, and Misc

I spent a day working on the HUD (again). I went through a few iterations. Eventually per popular vote I am keeping it simple, for now... After working on the HUD, I decided to do a few more cleanups in the code. In doing so, I have better defined how I will proceed...

Posted by on

I spent a day working on the HUD (again). I went through a few iterations. Eventually per popular vote I am keeping it simple, for now. Here is a screenshot of the HUD partially added to the game.

After working on the HUD, I decided to do a few more cleanups in the code. In doing so, I have better defined how I will proceed.

  1. Moved all OpenGL code to one file, effectively separating the renderer from the game code
  2. Reorganized physics step callback to simply make more sense
  3. Simplified how the game refers to different types of entities
  4. Completely ditched the existing entity manager in favor of the physics engine keeping track of entity data as userdata
  5. Preset a bunch of handler functions based on the cleaned up physics step callback

In doing this, I have clarified to myself how I will be proceeding. My vision is clearer, and the base engine functionality is complete. I will now be able to start rolling out gameplay functionality. Good stuff on the horizon!

One last thing I did, was a few optimizations. First, by getting rid of the Entity manager, I have eliminated one full iteration of all entities each frame. Second, I have set up the GUI to render only when it has been changed. This offers a significant performance increase. In fact, the main menu goes from using 13% CPU to 3.5% CPU on my 2.3GHz i7 (8 logical cores, so it tops at 800% CPU usage).

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: