Category Archives: Uncategorized

Getting up to scratch and a new uni project

Hey everyone. I have not posted in ages mainly because I keep forgetting to. So I’ll be doing at least one a week for a new project I’m working on plus any number of others that I have in the works. The things that I’ve been working on briefly are:

Game Faming

20140326142906 Game Faming is a gamer social network website that allows users to post videos and blogs, vote on them by attacking or defending them, which allows the good videos to be kept and the bad ones be deleted. The site is like a Facebook type website but for gamers only, or game related content. The core of the site will be that users level up the same way as you do in an RPG type game and can access extra content and even enter competitions to win prizes based on their level. The website is being developed by myself and a team of others.

Filtrate updates

20140326143333 Filtrate is a 2D platformer game made with a friend in my first year at AIE. The updates include:

  • Extra HUD with dimension indicator and death counter (it’s great coming into a room where someone’s been playing a level for ages and seeing the death counter.)
  • More player animations and smoother walk cycle. Animated idle stance.
  • Added more music depending on the level
  • Added more level variations that match the music
  • Added backgrounds
  • Tweaked graphics. Particularly the spikes image as people thought it looked like grass and would skip and hop through a meadow of death.

I had also done a few code tweaks and added a mode where the orbs would kill you instead. This made the game really hard and had to tweak the levels slightly.

Little Annoying Rocket game

20140326143358 This game is a type of phone / tablet game where you control the rocket by tapping and holding, and then dragging the touch to rotate. As you’re touching, the rocket jets fire and you move forwards. It is a difficult game because the camera moves with the rocket and only moves the direction it is facing, so it’s hard to control, but that’s where the challenge is. The goal of the game is to get as much score as possible by going as high as possible, going

FPS Punching game

20140326161308This is currently in very early construction but basically, the idea is that it’s an arena type game like Quake III Arena except you only get the ability to punch people and kill them in 1 hit. The idea came about at a LAN one day when we decided to create our own game-mode in Crysis Wars where we would not use weapons. The game gave you the ability to go invisible, be super fast,. jump really high, or have armour. Using these abilities drained energy and you’d need to turn them off to recharge it. The game mode ended up being really fun because of 3 main aspects: sound effects – satisfying hearing the bash and crunch when you hit someone. Rag-doll: seeing your friend’s bodies fly across the arena after you punch them and then flop to the ground was funny. One hit punches: With the strength mode, punching someone was an instant kill, and this was extremely satisfying. This video shows this in action. 20140326164046   The way this worked well was also because it was a first person shooter game with guns, but if you take away the guns and make your arms super powerful, it’s a whole new game, and just as fun. This game will be fast paced and include power-ups that allow the player to move faster or jump higher, go invisible, and occasionally a ball they can throw once to kill someone. We will be developing it in Unity3D because it’s easy to use and I’m familiar with it. I also have a student licence for the pro version.

Helping a friend with some art

20140326182139 Even though I’m a programmer. I still enjoy doing (2D) artwork from time-to-time. A friend has been developing a game for fun and I asked if I could so some art for it. The concept for the art I was aiming for was a spaceship that appeared like a sports car (Sort of like the game is about you driving sports cars in space and not allowed to scratch it). 20140326182623

Particle tool for CIT

20140228054828 There will be a separate post about this later. But basically, because I really enjoy particle effects, for my “Final Project” for CIT, I’ll be creating an “In browser” tool that lets you create particle effect animations to be used as animated sprites in your game’s particle engine. The need is that there’s not many cheap / free usable particle creation tools around, apart from having to create them in Adobe Flash or Photoshop. There are tools around that let you create super realistic particle effects like Fume FX for Maya and 3DS Max. but these aren’t cheap and they require a lot of setting up. They also don’t allow you to view the effects at real-time as they need to be rendered out, which takes a considerable amount of time. So the main aim for this tool is to have a particle effect generator that utilized WebGL’s GPU usage to display the particle systems and the browser can take care of the toolset.

How to get a joystick working in XNA 4.0

The problem most people have with gamepads in XNA is the fact that you can’t use any joystick type input apart from the XBox 360 controller. This tutorial shows you the most simple way to get joystick input in your XNA game.

The reason I’m writing this is because it took so long to get it to work myself and thought there should be a more useful tutorial on the net about it.

For this tutorial, I’m going to assume you already have an XNA game with keyboard input and just want to be able to use joysticks.

Step 1. Don’t use Soopah.

Although it was a really good little plugin, it’s no longer supported (last updated in 2007) and it only works with XNA 1.0.

Step 2. Grab SlimDX

SlimDX is a DirectX interface for use with C# projects.

You will need to download the correct version for your project, which will most likely be the x86, .NET 4.0 version. It can be found here:

Once downloaded, install it.


Step 3. Reference it in your project

2013-12-06 13_30_33-Filtrate - Microsoft Visual Studio (Administrator)

Right-click on your project in the solution browser and select “Add Reference…”. Click “Browse” and browse to C:WindowsMicrosoft.NETassemblyGAC_32SlimDXv4.0_4.0.13.43__############# and select SlimXD.dll.

Or, you probably should copy that DLL file and paste it in your project (it depends where you want it) and then link it from there.

Step 4. Programming

Put this at the top of the files that you need to use methods from the DLL:

using SlimDX.DirectInput;

In your class, you want to declare some variables that DirectInput is going to use:

private DirectInput directInput;
private Joystick joystick;

For the setting up phase (initialize) parts, you want to add:

directInput = new DirectInput();

// Search for device
foreach (DeviceInstance device in directInput.GetDevices(DeviceClass.GameController, DeviceEnumerationFlags.AttachedOnly))
    // Create device                 
        joystick = new Joystick(directInput, device.InstanceGuid);
    catch (DirectInputException)

if (joystick == null)
    // do error for no joystick here

// get joystick device objects
foreach (DeviceObjectInstance deviceObject in joystick.GetObjects())
    if ((deviceObject.ObjectType & ObjectDeviceType.Axis) != 0)
        joystick.GetObjectPropertiesById((int)deviceObject.ObjectType).SetRange(-100, 100);

// Acquire sdevice             

Then, when in your update loop, you need to get a key or direction from the joystick, just use code like the following:

// button press
    // do some action like jump

// direction press
if(joystick.GetCurrentState().X < 0)
    // do some action for pressing "left" on the stick

If you need to disable the joystick, use the following:

if (joystick != null)
joystick = null;

Of course, you may want to incorporate better error handling and probably implement this into your game’s input handler that controls the key presses. But as I said in the intro, this is a very simple implementation, and will be enough as a starting point.

If you have any questions or if you found this tutorial useful, please leave a comment.

Camera bugs and research

Camera bug

I found a bug in my camera programming. The issue was that when the ray flying towards the camera HITS the transparent-able wall, it doesn’t go any further, which means if the camera is behind a solid wall, it never hits that, therefore the camera can go through walls if its behind a transparent wall.

To fix this, I put the transparent wall objects on the transparent effects layer and used that for things that are “not solid”. These include also the mother and children.

I then changed the programming to fire 2 rays instead: 1 to check with transparent things, and another to check with solid walls. This worked, however, I realized that it wouldn’t if there there was perhaps 2 transparent effects. This means I will need to do a loop of rays, each time ignoring the previous object, until the ray hits the camera. This will be quite difficult, and I may have to use some other method than a ray, or tweak the ray more so it can ignore certain objects or something. I did some research but couldn’t find much help.


Other than trying to fix the camera, I also did more research for cameras. Looking into it at the beginning of the project, the camera seemed pretty straightforward, but as the project comes along it’s starting to seem more complex.

I had a look at some videos of games that used cameras such as Mario 64, Banjo Kazooee, Journey, and various other Mario games. One thing I notices, especially with Mario 64, was that the camera had an AI. It seemed that at certain times in the game, the camera would position its self and aim in certain directions depending on what was happening. For example, when Mario has to fight Bowser, the camera zooms into Bowser’s face from behind Mario, and when game-play starts, the camera “LERP”s back to its normal position (orbiting Mario from a set distance). The camera controls and type of view are signified by an icon at the bottom-right of the screen. There’s also wall avoidance that was included.

As well as this, I did some reading for the camera in Unitie’s 3d person tutorial. The only thing I found to do with the camera in particular was that the camera has a “near” and “far” camera, that are both combined to make the finished image. This seemed like a good idea, but for the time being we will just render everything to the current camera until any tests reveal slow-downs of the game.

After all this I can see that the camera is going to be a quite large task. It is also a main element of the game. I think for a good camera, it will need a lot of sections in every level that tell the camera to navigate to a certain angle if the player is standing in certain area, mixed with any key things in the level that need to be in view. I can combine these to try and get a nicer camera.

Borderlands 2 smoke fail

I might be just picky, or maybe I spend too much time screwing around in games trying to figure out how they made stuff.

I do notice that every time I see a bug in a game, it reveales some secrets on how it was made.

So one of my last posts was sort of about billboarding, and I found bad billboarding in Borderlands 2.

Borderlands2 2013-04-03 14-34-51-26 Borderlands2 2013-04-03 14-34-56-52 Borderlands2 2013-04-03 14-35-02-85 Borderlands2 2013-04-03 14-35-06-93 Borderlands2 2013-04-03 14-35-16-49 Borderlands2 2013-04-03 14-35-48-15