Wednesday, May 26, 2010

Working on Blobs&Globs

I have decided to work on OpenGL by porting a game one of my friends and I designed to the iPhone. The game, called Blobs&Globs, will utilize the iPhone's accelerometer to move onscreen objects through tilt controls.

Other than for a few minor glitches (some flickering and texture overlaps), I have completed the OpenGL portion of the game. Below, I have listed each of the stages I went through to develop the App (I apologize for the odd video sizes; they got stretched somehow):

1. Stagecast Mockup
(Stagecast Creator, a graphical programming environment, was used for prototyping)

2. Starting the App:
-Setting up an orthogonal viewport
-Drawing a moving square from two triangles
-Making multiple squares all use the same geometry to save memory

3. Accelerometer input
-Setting object velocity based on device tilt


4. Handling basic collisions
-Idealist method (test every object for collisions with every object; prevent objects from moving if doing so would make them collide)

5. Texturing
-Making every object appear to be a circle rather than a square

6. Improved Collisions
-Creating a collision grid to prevent slow frame-rates (only objects within the same grid square are tested for collisions)

Future Plans:
-Improve collisions so that they are based on vectors properly
-Finish implementing Blobs&Globs gameplay

My most valuable resources were Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark and Jeff LaMarche and http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html