Archive for March, 2008

FPS Engine:Mouse Movement and Collision

Monday, March 31st, 2008

Well today has been a slow one, most of the work has been done on the backend so no nice screenies to show. Basically mouse movement works perfecting with a full looking around now done (with upper and lower bounds set). I have also updated the collision slightly by adding some less than perfect sliding collision to the environment items(boxes, cylinders etc). I really should make a too do list has the last few days a lot of feature creep has settled in detracting from the aim. Here is a list of current features:

  • 3D World Loading from file (floors - wall worked out automatically) - file format needs overhaul to include items
  • Normals set so OpenGL lighting works - Need to learn more about lights in OpenGL
  • Texture setting works
  • Environment Obstacles (non moveable items) can be loaded - need to test on different sizes/types to make sure collision is consistant
  • Placeholder gun and crosshairare in the correct place - need to work on this more
  • Classes for Maps, Obstacles and Player are coming together - Need one for Lights and another for Fog settings
  • Messed around with different height blocks - realised the initial level format needs some work before this becomes a permanent feature
  • Edit Mode hasn’t been started.
  • Anything above the Obstacle Layer is still in theory land. Everything below is in messy hack land.

Target for Tuesday : Bring the Current Code Up to Acceptable Standards with Comments, Class Files and No Global Variables(I think I have 2) - Remove all outdated code.

There we go. Now I have to do it.

FPS Engine - Items Planning

Monday, March 31st, 2008

So, I know this is slightly earlier than I thought I would be updating but I couldn’t help myself. I have started planning how items are going to work. So in order to do this I had to test the theory. Check the screenshot:

Metal Lights

I have removed the temp crosshair and gun placeholder because they just looked messy. The next step is the get multilevel levels working so I can implement ramps and stairs. After that I am planning to design a basic level so I can work on some decent collision and then its onto the actual level editor.

Lights(getting there)! Camera(almost!) Action(Not yet)

Sunday, March 30th, 2008

So, I ended up re-writing the rendering functions, it took some time but the engine is now a lot more efficient, i’m pretty sure i’ll end up re-writing it again at some point but since this is mainly a learning exercise I am not too worried.

I have light, not entirely finished but they are getting there, having some issue with some normals, but makes for some cool effects. The mouse input is getting there, you can now turn around using the mouse but there is no up and down movement yet.

As for other things, the level format hasn’t been worked on yet and anything above that(enemies, light position(currently hardcoded), items etc.) will have to wait. Enjoy the new screenie and I will keep you updated.

darkened hallway - fps engine

FPS Engine

Saturday, March 29th, 2008

So today I started work on a new project. Well I say today, most of the ground work was laid last night. I am attempting to create an FPS engine in the hopes of building a fully fledged game on top. MY task for today was simple, render a simple level from a file and allow the camera to walk around it. 3 hours in and it is done. I would have taken less time but having to relearn everything takes a while

FPS Engine 2FPS Engine 1

.

So now that is done my plan for tomorrow is to get mouse support working so I can look around the world. I am planning to take this project slow to give me plenty of time to clean the code up after every change.

Now for some technical details:

  • The Engine is written in C++ using the SDL Library and OpenGL
  • The Current Engine reads in a simple text file which lays out the level, it then uses this to place planes and cubes

So thats it for today, stay tuned for updates.