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?

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?
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:
And here’s the game:
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:
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 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!
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:
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!
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.