Space Prisoner 1.4

Space Prisoner 1.4
Work on Space Prisoner has ceased.
However, I will continue to update the high score list as scores come in.

Wednesday, April 30, 2008

Turned CubeRoids into a full-on Apple XCode 3.0 project, rather than just using XCode as a code editor and building the executable from the command line.

The end result really isn't much different (the performance is identical), but the target executable is now a standard Macintosh application instead of a command-line executable, and XCode's structured view of the various code files will allow much improved organization.

Tuesday, April 29, 2008

Added lots of internal structure this weekend:

- Now that the text info box is running, I've added a frames per second (fps) counter to monitor performance. At the moment I'm getting between 90 and 300 fps, depending on how many active objects (ships, explosion debris etc.) are active.
- The "thinking" and movement routines, now that they are fully separated from the drawing routines, have been throttled to 30 cycles per second. This means that the game plays at a constant speed, regardless of frame rate, and provides compatibility for slower machines and possible future networked play.
- All collision checking is now handled by one routine.
- Collisions are sent to a Collision Dispatch function which allocates damage and performs physics deflections, depending on which objects are involved.
- Asteroids now take damage, and blow up when struck by a ship.

The code blocks are starting to get quite large, so I will probably have to break them up into more files soon.

Saturday, April 26, 2008

Added text. After poring through the Red Book and researching text display options online, I decided to start out with the easiest solution, which is the included GLUT utility, glutStrokeCharacter.

I moved the main action window to the left of the screen, and created a 2D, orthoganal projection text info strip on the right side. The text characters came out extremely large, so currently I am scaling them to make them fit. Later I'll play with the viewport dimensions to try to minimize the scaling operations.

Friday, April 25, 2008

1) Carefully extricated all of the pure drawing code from each object type; each type now has its own pure draw routine allowing for more clarity and ease of adjustment.
2) Refined the drawing code, removing a fair number of unneccessary calls.
3) Adjusted the lighting model, removing unneeded code and refining the "look" of the lighting.

Thursday, April 24, 2008

1) Began the process of converting the user from a simple cameraman to a ship:
The forward/back keys now control a thrust component instead of arbitrarily changing the position of the camera. Thrust is applied in the direction of the camera view.

2) Removed the pseudogravity which caused shards from exploding ships to "fall" to the "ground". The game will be based in zero-g, so all particles should react accordingly. Therefore there exists no real "floor" or "ceiling" to the cube arena, but the walls may be distinctly textured to help with orientation while playing.
Revised and updated the blog content.

Wednesday, April 23, 2008

Revamped data structures to improve expandability and portability. Essentially I changed the objects array to an array of pointers instead of an array of static code.

This allows easier access to the array from various different code files, but has the unfortunate side effect of slowing things down a bit. My plan for tomorrow is to fine-tune it and carefully examine the code and see if I created a slowdown in the process of converting the data types.

Monday, April 21, 2008

Added fullscreen mode and automatic 1024 x 768 resolution switching.

Wednesday, April 16, 2008

• Broke up the main.c code into smaller, more manageable chunks. List of code files so far:
holodeck.c, holodeck.h
simpleShip.c, simpleShip.h
glm.c, glm.h (Nate Robbins' code)

• Added option to display cube as a wireframe grid (using GL_LINE_LOOP)
• Tinkered with size of objects array. Currently set at 3000 which runs great on my MacBook Pro.

Tuesday, April 15, 2008

Created this blog. Its purpose is to provide easy reference to the latest state of the CubeRoids project. Updates to this blog will be at least weekly, but I hope to update it more frequently than that.