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.

Monday 19 October 2009

Simple Mario World!

Ok, so we have been looking at assembly programming language this week. After being put into the NES group when we took apart consoles in week 2, I thought I would look more into code from a NES game. I thought I might as well go for one of the biggest and most well known:

After downloading Tracer, a disassembler for the NES and running the game through that. I was left with many lines of code along the lines of:


This is in a way completely different to the MIPS language used on the PSP we are looking at in tutorials. The lengths are different at different points for one thing. The hex codes at the end of the line are also copied to the point after the memory adress (though not always in the same order), which seems to only use odd values.
Without knowing anything about this language, you can guess at some points. For example I would assume ASL to be a 'Shift Left', as it doesn't have any hex after it to reference a place in memory.
LD would be load, with the next letter used to specify what is being loaded or how.
ST could possible be the same for store, though without knowing the language in depth I wouldn't know for certain.

It is interesting how this differs to the MIPS language we are learning to handle, though I will not look too much into this so to focus on the work in class.

Wednesday 14 October 2009

The Beginning

Well, a couple of weeks into my second year and it's about time I got started on the blogging scene. You'll see my advancements over the three game dedicated modules we are doing this term:
  • Intro to 3D Graphics Programming
  • Game Development Techniques
  • Console Development
Every now and then I might chip in with a side project or two, but these three are the focal point right now.