Posts

Showing posts from January, 2012

Sunday Evening Imaginarium (C# + XNA 4.0)

Image
The game was developed in C# using XNA 4.0 framework. The game was merely meant as a demo which we presented to a small panel of people.   Game Design Documentation Available Here Sunday Evening Imaginarium is a two player game with the aim being to get people who aren’t gamers interested in games. The aim is to protect the idol in the centre from the attacking goblins and keep the bar up so you don’t fail; however there is a twist which I’ll go into in a second.  Player one is taking on the role of the experienced gamer, his role is to collect wood and stone which then gets turned into planks and metal. These resources are then used to upgrade the second player’s damage or make trap’s, the planks can also be used to repair the idol. The second player has to stop the goblins from coming – he has the use of a sword, traps and arrows to aid him. The idea behind this was to simplify the genre of an RTS and reduce its mechanics to the simplest form (resource collec...

3D Scene on the PSP

Image
During our university course, one of the tasks was to create a 3D scene on the PSP using only samples provided by the devkit documentation. The original specifications were to include: at least 2 “.gmo” models; a movable camera and lighting.  My original idea was to create a set of table and chairs and then develop it from there. However once looking for table models, I came across a pool table model. This reminded me of a pool demo I created in XNA to teach myself that library, I decided creating a similar game would help me learn. Even though I wasn’t able to complete my demo, due to limited time on the PSP devkits / other assignments due, I managed to get the basics completed. The table model is available at: http://www.max-realms.com/modules/wfdownloads/singlefile.php?cid=36&lid=819 . The models for the pool cue and ball I created myself. After creating a “loadModel” and “drawModel” method importing models was fairly easy – I could show new models through little ...

MIPS Graphics Library

Image
The reason for this task is twofold: first it helped show me show much work the processor had to do to display a simple shape on the screen; it also taught me memory management. The program was written in MARS virtual environment, and uses the Bitmap display to give a visual representation of the code. Each method uses 4 memory addresses to pass parameters, if any more are needed then they are sent to the stack.  The “SetPixel” method is the simplest, it takes the X, Y and colour of the pixel – calculates it position on the screen and then stores the colour into the memory address into the location where the screen gets its information.  The “DrawLine” method uses Bresenham’s Line algorithm. It takes a start point and end point of the line as parameters, as well as the colour. It then works out the gradient of the line, plots the first pixel, and then adds the gradient again to get to the next pixel. This repeats until it has reached the second point. The “Dr...

3D Renderer (C++)

Image
This is a 3D renderer that I wrote in C++ to load in and display “.md2” files, a fairly old format but a good basis into understanding graphics programming. An “.md2” file merely a list of vertices based around an origin, and a set of 3 integers which is loaded in as a polygon. A polygon contains 3 indexes, each point to a vertex in a list, contained within the model. This means that if a vertex is used more than once, it won’t be duplicated. The program started off with “Vertex” and “Matrix” classes which held the instructions to multiply them together; this is the basis of transforming and viewing the vertices on the screen. Once we had these, we could implement the full viewing pipeline, using perspective projection. And after this we could visually display these points on screen. To begin with I focused more on transformations and camera positioning whilst I had the points showing in world space. To visually show the model I made a “DrawWireFrame” method which drew lines...

XML Example

Image
A while ago I wanted to create some objects from classes but it seemed like a lot of coding to add in some pre-defined objects which would always be the same. I found it a bit odd and couldn’t really see how it would be done in a large scale game; I knew the larger the project, the more the pre-defined objects. So whilst searching around, I read up on reading and writing to an XML form – whilst it wasn’t used in the program I still wrote a small example in C#.    Not too long ago, I wanted to refresh myself on how to use it properly; so instead of writing in C#, I decided to try using Java, which I had only briefly used. Both programs hold a series of contacts which can be loaded in from the same XML file; once loaded, the list is then printed out in a console. The C# example does have a bit more user input from the console, but as I only wanted to refresh myself on XML, I didn’t include these in the Java example. Both Files are Avaliable to Download Here | 44...

Firewal - In Development Facebook Game

Image
“Firewal” is a Tower Defence game in development created for Facebook that was written by a team of university students. The idea was not to have ground breaking mechanics but to create a visually appealing game that players would keep coming back to. The game was coded in C# using the XNA library, and was integrated with Microsoft’s Silverlight using Silversprite . The idea of having a Tower Defence styled game came from the fact that majority of people who use Facebook don’t use it for hours on end, so we wanted to create a game that people could spend anything from 10minutes to an hour on. We used vector styled graphics to keep it simple, and whilst the game is still incomplete, we aim to continue using this style so that users can easily tell what things do and how it works. At the moment, there are 5 towers, 3 enemy types and 10 maps – however more are planned and can easily be integrated. I also helped write a small Map Maker for the game; the maps are generated by a s...