Version 1.1 of Universal Layout, compatible with OOK v0.01 (Physics Demo) and OS X 10.5+
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.
OOK Is an EV clone for the iPhone. EV stands for Escape Velocity and is a series of games distributed by Ambrosia SW. Unlike the EV series, OOK will be fully 3D. Its universe will have a different environment, too. The universe of EV focuses on jumping from solar system to solar system. Contrary to EV, OOK will focus on intra-system interactions. Traveling through the system will take time, and jumping between systems requires the use of a jump gate called an SAR (Subspace Accelerator Ring). Join me in my journey through space and follow the creation of this game. Join the forum, contribute, and possibly earn yourself a place in the credits and a free copy of the game. Again, this is an iPhone game.
Since the last update I have done a number of things. First off, the physics is 100% working, entities are more well defined, and basic controls are functioning. You can now fly around empty space no-problem. I also defined some basic spawning functions as ease-of-use utilities. Nothing fancy there. One last small thing I did was created a bit more of the resource loader so that I could start adding ships with the aid of the developer mode I mentioned previously.
The two more interesting things that I have done include figuring out how to procedurally generate the galaxy and using shaders to create a simply parallax effect for the space background...
In the past I created the space background by rendering a bunch of polygons and shifting them depending on the player's coordinates. To create a parallax effect (see here) I rendered a couple different layers with different offsets. However, now that I have added support for GLSL shaders, I realized that I could simplify things. With only one polygon and one texture, by retrieving texels of two different parts of the image each offset by the players position differently I was able to create the same effect. The shader is super basic with excellent results. Already using shaders has paid off!
Now the fun stuff. I explored the web a bit for equations to graph the curve of a galaxy. I found just the equation:
Notice that each star is represented by a 2px by 2px dot, while each planet around it is represented by a 1px by 1px dot. You may be wondering why star systems are overlapping. "WHAT THE HELL!?" It would be ridiculously big if I represented the galaxy at its actual scale in the browser, so for the visual representation I scaled it down and scaled up the star system size a bit. The final product, once I convert it to C, will be far larger with systems highly spaced out.
Finally, I would like to note that galaxies consist of billions to trillions of stars. OOK is not that big of a game. I will not be generating a trillion stars. This will have to suffice.