Enforce Coding Standards with PHP_CodeSniffer and Eclipse IDE on Ubuntu Linux
ENUMs, User Preferences, and the MySQL SET Datatype
G3D on Ubuntu Linux
Changing Mailman Python Scripts for Virtual Host Support
Using PHP pspell Spell Check Functions with a Custom Dictionary
Using Multi-Byte Character Sets in PHP (Unicode, UTF-8, etc)
Microsoft Office Open XML

First 3D Game

Saturday, 31 December 05, 7:00 am
compton
I now feel I'm ready to have a go at creating my first simple OpenGL game. It's going to be pretty simple - there'll be no scene graph, just a simple array for storing objects in the world. I won't implement frustum culling either, at least not in the first instance.

My game will be based on space flight, so I will start with the player's ship. It should appear just in front and below of the camera, i.e. third person. It should turn and dive/climb in response to keyboard input, and have a speed that can be set.

I will start with the p51 IFS model that comes with G3D, as I don't have the means to create my own models as yet. The VC++ project is created as an empty Win32 Project. It needs as a minimum a main.cpp file containing the main() entry point.
1 2   

compton

7:00 am, Saturday, 18 March 06

It's been a while since I posted my progress on the game. Due to being preoccupied with looking for work, as I have been for the last two or three months, I've neglected the programming. Hopefully, if my new job goes well, I'll be able to worry less about job hunting and do other stuff like the game, and this web site too.



Despite looking for work, I have done a fair amount of work on it. Using my own modeller (see other entry in the Journal), I've built a 3D model which is now used as the player's spaceship.



I also solved the problem of correctly rotating the ship based on the player input a while ago. The player has also been able to shoot projectiles for some time. These projectiles are rendered rather crudely, as simple spheres. They are implemented by three arrays, with one entry in each array for each shot. One array is the plasma life, which is initially set to 200, and indicates how many frames each plasma bolt lives for. The other two arrays hold Vector3 objects, one indicating the bolt's current location, the other indicating its heading.
 
 

compton

7:00 am, Saturday, 18 March 06

Today, I added my own 'sky box' which is now used instead of the G3D default, and gives a nice feeling of flying in space.



I also built a new model for the space station. This is a huge structure, with a central octagon, where the station's shopping and hotel complex is situated. There are two landing pods, each at the end of an arm emanating away from the octagonal central hub.



I also added a method to the Entity interface called move(). This method is called once per frame for each object, and moves it based on the object's velocity and rotation. To specify the velocity and rotation for an object, I've added two new arguments to the Entity constructor.



In this way, the space station is set to continually rotate. The idea is that the rotation creates gravity within the station, so that people can walk around and space ships can be parked easily in the pods.



Next, I need to make the pods 'dockable' ie allow the player to land their craft in a pod. Once they have done this, I would like to allow them to walk out of their ship, and explore the interior of the space station using FPS type controls and views.
 
 
1 2  Leave Comment
About This Page