AStar Program [source code]

•January 11, 2010 • 2 Comments

Here is a little A* implementation I made over the last few days.

Please note that the algorithm is heavily commented and unoptimised.

Source Code: AStar Program

If you found the source helpful why not leave a comment? :)

Minicar Madness

•December 22, 2009 • Leave a Comment

University has finished for the year, and here is one of the projects I worked on for one of my units. It was a team of 3 people.

It starts off here:

image  image

 

And here’s the game:

image

 

The aim of the game is to beat the ghost car, which is a recording of your fasted lap.

 

Here’s a youtube video showing the gameplay:

GLSL Post-processing system

•August 17, 2009 • 1 Comment

Put the farm game on the shelf for a while because uni’s back.

I spent all weekend making a easy to use post processing system for OpenGL. Basically, I am drawing my entire scene to a FBO, then drawing a fullscreen quad with the FBO as the texture to a different FBO. Then I draw that FBO as a full screen quad to another FBO, rinse and repeat until all effects have been applied. The system uses a list of effects which means you can stack shaders to combine effects.

Usage:

//Setup code
PostProcessor pp( screenW, screenH );
Shader* shader1 = new Shader();
shader1->loadVertexShader(   "file.vert" );
shader1->loadFragmentShader( "file.frag" );
shader1->compileShader();
pp.addEffect( shader1 );

//Main game loop
pp->stopRendering();
	//All scene rendering code to go here
pp->stopRendering();
//Draw the final screen
pp->drawProcessedScreen();

Easy as!

Here are some screenshots of various shaders:

I have collision!

•August 1, 2009 • Leave a Comment

I finally got around to implementing the collision detection on the terrain:

Didn’t give me too much trouble. Basically what I’m doing is feeding it an x and a z coordinate, the tile is determined, and then the specific polygon from that tile is determined. I then calculate the polygon normal and give it to my ray-plane collision detection function I created. Then it gives me the point where the ray intersects with the plane of the polygon!

Fixed my terrain normals

•July 29, 2009 • Leave a Comment

I spent all day slacking off watching Freaks and Geeks!

Anyway, the normals on my terrain finally bugged me enough to fix them. I always thought they were just a BIT off. So I had a quick look through and found out I was adding the up vector to my normal calculations – Doh!

That’s my 2 minutes of coding done for today:

WIP2Finally got some nice shadows going.

Farm game progress…

•July 28, 2009 • Leave a Comment

Got some time to work on my farm game… Got different tiles / textures working.

WIPCollision detection next I guess.

Textured

•July 23, 2009 • Leave a Comment

WIP4

Got my terrain textured.. Actually I will soon have to untexture it and implement tiles with different textures on them, and then optimise the rendering calls.

Farm Game

•July 22, 2009 • Leave a Comment

I’ve dropped my OSG pool game for a while. This is 100% due to a ridiculous lack of documentation!

Anyway, sorry for not posting lately. I havn’t been doing much programming because I couldn’t decide what to do. But now I’ve got my mind set. I’m going to make a fun farm game. It will be a mix between harvest moon and wurm online. With deformable terrain!

I just got the base of my terrain class down a few minutes ago. The normals are automatically generated!

WIP1

WIP2

I’m using pure OpenGL for the game. I’m also using and adding to my openGL lib GameFrame as I work on it and refine things. I have actually got the base of my own scene graph implementation layed out but I wont be using it for this game as there is no real need for a scene graph.

Pool Game Update

•July 9, 2009 • Leave a Comment

Added textures and quaternions so the balls can roll now!

Screenshot

Screenshot

Pool Game Progress:

•July 7, 2009 • Leave a Comment

Got it off the ground today, here’s proof:

WIP2

Obviously still got to do the wall and pocket physics.

 
Follow

Get every new post delivered to your Inbox.