Posts

Showing posts from 2012

3D Game Engine Using DirectX11 (C++)

Image
This piece of work is what I’m most proud of this semester; it is also one of the projects I had the most fun working on; and because of that, I am currently building upon it and plan to continue over the summer. This is the first time I have ever used a 3D engine, or attempted building my own framework. Framework The engine uses a scene graph to handle the objects in the scene; once the user creates one of the nodes and adds it to the graph, the Initialisation, Updating and Rendering is handled in the underlying framework. I tried to make it so that the user would be able to simply add something to the scene, whilst maintaining as much control as possible. The user is able to create and add a node using 2 lines of code; this then adds the object to the scene graph and everything is handled in the under lying code, the result of this code would load, update and render that object onto the window. The Renderer is what I’ve used as the main DirectX interface...

Playing with Particles on the PSP

Unfortunately I have been unabled to get pictures of the programs so far; however I am still currently trying to get some video capture of them done. Billboard Particle System (PSP) This was a follow up from a previous module where we created a 3D scene on the PSP (which can be found here). Once again this program was written in C, using Sony’s PSP development kits. The module specification only required us to display bill boarded textured particles, and then it allowed us to do what we wanted in terms of scene. Due to problems, I had to start this assignment later than what I wanted and it only allowed me 4 days to work on both this and a benchmarking tool. The billboarding method I used was to create a world transformation based on the particles location to the camera; the tutorial I used can be found at http://nehe.gamedev.net/article/billboarding_how_to/18011/. When playing around with the movement I saw that the particles looked a bit like fireworks, so I played on this a ...

Pocket Recipes

Image
Pocket Recipes was created with the Android SDK and is for Android Devices 4.0 and above (it works on Android 3.0 in the emulator but I haven’t had a chance to test it using a device). The IDE I used was Eclipse. I enjoy cooking: I am awful at cooking, purely because I get the timings on everything wrong; things get overcooked, the bangers are cooked before the mash etc. If I followed a recipe I would need to set an alarm after every step to make sure I’m following it to the letter; if only there were an app on my phone which kept track of it for me! For my mobile development assignment I decided to put together an application to do just that. Luckily we were given free rein to make what we wanted in terms of app, so I took the opportunity to make “Pocket Recipes”, a simple application allowing me to store and view recipes, with the addition to have a timer notify me at every step. My target audience were people who, like myself, weren’t great with times and cooking, perhap...

Week 5 Round Up

Image
Interactive 3D  This week I worked on some Terrain Generation; mainly loading from a height map. To begin with I need to generate the heights, for this I read a 1280x1280 ‘.raw’ file containing a 4byte value. I then  make a grid of vertices and load them into a single dimensional array, whilst I set up the vertices I pass in the corresponding height value. I can then calculate the indices and set up the index array, and one I have the indices I’m able to calculate the normal’s which will be used for lighting. Once I had a completed ‘TerrainNode’ I looked into forms of procedural generation. So far I have implemented ‘Perlin Noise’ ( http://freespace.virgin.net/hugo.elias/models/m_perlin.htm ) which interpolates a value from a Sin Wave. The results were pretty good. I can change up to 5 values to get more varied height; more mountains; smoother terrain etc. I also added a Sky Dome for additional effect. Mobile Development This week we were given samples ...

Week 4 Round Up

Image
Though I should start updating what I do on a weekly basis, I’ll try to explain the assignments as we go through. Week 4 was actually last week; I’ve just come out of week 5, so I will get some updates ready for tomorrow. Team Software development The game our team has been working on is a Bullethell game; the idea is to get the mechanics of the typical space shooter down before we work on anything else, all we know is we want a Bullethell game with multiplayer support. My contribution to the project has been fairly disperse; I haven’t contributed fully to one aspect but I have had input on a number of different aspects. Nothing fancy yet, but we got some weapons working; paralax scrolling and enemy pathing; and I will also have a Boss entitiy ready to show off for next time. Console Development The final goal for this module is to create a billboard based particle system which will be used as a benchmarking tool on the PSP. So far we have only covered the ideas...

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...