Wednesday 11 November 2009

Game Dev Tech - So far...

So the assignment for this module is an ongoing total conversion of Unreal Tournament 2004 into a non-violent game involving the Famous Five. The planning for this has been going on since the summer, and work started right near the start of the year. Everything from player models, the maps, the gameplay, the menus and even the HUD will have to be completely overhauled which is as big of a task as it sounds. After research and reading of several books, I chose Five Go To Smuggler's Top as my game.

My work is progressing fairly well however, and by this stage I already have a rough outline of my map (created just this week) which when textures and more static meshes are added, should do the job of my game well. There is a problem with loading the maps on my home laptop however, so pictures of this will be added at a later time, or in a later update.

I have successfully changed the menu screen completely to show a list of two maps, setting and an exit option. The background has been changed and obviously the buttons have been changed. The Unreal startup logo/video has been removed so the game starts up quicker.

Clicking the new map will warp you to it. Once in the map you can explore around it, and there is one pickup in plain view for now. Moving to it will declare that the magnifying glass has been picked up. Pressing H on the keyboard, or B on the Xbox 360 controller will toggle it off and on. This is actually an image overlaying the whole screen, with an alpha value in the middle so that the player can see through to the map. This will eventually be imported into the game in a way such that the player must look through these to see 'hidden' items to pickup and continue the story. They will then be able to pick the items up. This feature is yet to be implemented. This is the next step along with getting Timmy the dog in the game as an AI companion following the player around.

The other main function added in at the moment is a standard adventure pickup game. The start for this is still set to a console command, but will later be changed to be started after communication with an NPC character. When the game begins a timer pops up on the bottom of the screen. This will start to increase as soon as the first bottle of ginger beer is collected. The player must then rush around the level to collect all 10 of these in as fast a time as possible. When all 10 have been collected, the timer stops and the final time is displayed. In the final game, the player must complete this in under a certain time otherwise they will need to repeat it until they win. I am happy with how this works at the moment, there are no bugs with it whatsoever so just needs minor tweaking before it can be put straight into the final version.

Intro to 3D Programming - So far...

Over the course of this module we are basically extended one C++ program over and over to eventually get it to display a 3D graphic on stream, complete with lighting and textures. So far I have managed to complete my vector class, allowing it to implement vector addition, subtraction, multiplication, division, dot product and cross product successfully using a header file given to us.
I also have a working Matrix class, using a template of a header file and extending it to work fully. This class can now add and subtract matrices, multiply two matrices or one matrix with a float.

The final bit I have working is a Camera class. This was a lot more complicated as we were given nothing to build off of, and so had to implement it all from scratch. The first step was creating a header file, then starting to add x-rotation, y-rotation and z-rotation to the main .cpp file by creating a series of functions. After getting them working seperately, x and y rotations had to be multiplied together using the matrix-matrix multiplication function previously made. This xy-rotation then had to be multiplied to the z-rotation to create a full XYZ-rotation that can be applied to a finished 3D model when the time comes.
There is also a translation implemented, which multiplies a matrix by a vector to produce a vector resultant which will eventually translate the 3D model.
The view matrix is gained by doing the inverse of the translation matrix by the inverse of the rotation matrix. This resultant matrix is multiplied by a projection matrix which is a fixed matrix to get the final projection matrix.

After all this, the next step is to get a cube to load into a blank canvas. I am currently having errors when compiling this so more work is needed here before and screenshots can be shown.