Parallel, 3D Game

Technologies: C++, 3D, Ogre3D Engine, Blender 3D
My Responsibly: Software, Physics, Control, AI, Design, 3D Modeling, Some Texturing, Collision, World switching dynamic.
Not my work: Original Ogre3D Graphics Engine, Base Textures.
Description: Parallel is an experiment in game design, AI, Game engine development and the broader issues of developing a 3D game.
Technologies: C++, 3D, Ogre3D Engine, Blender 3D
My Responsibly: Software, Physics, Control, AI, Design, 3D Modeling, Some Texturing, Collision, World switching dynamic.
Not my work: Original Ogre3D Graphics Engine, Base Textures.
Description: Parallel is an experiment in game design, AI, Game engine development and the broader issues of developing a 3D game.


I wanted to experiment with some ideas in game development and with 3D games engine and the tools of development. First of all I needed to decide what technology I wanted to use. Eventually I decided on Ogre3D because it's mature on a large number of platforms, free to use and
doesn't require you to open-source your project. For similar reasons I decided to use Blender3D for modeling and level editing.The idea of this engine was to give me something to allow me to
1) Experiment with game play
2) Give me experience with games engine
3) Give me experience with modeling tools
4) Familiarity with Every job in the pipeline
As for gameplay I decided I had to choose my battles since I had to do everything myself. I wanted something that was unique, simple enough but would give me a lot of gameplay options. Inspired a little but the versatility of the portal gun in Portal I decided on a world switching mechanic. The player would play through an area as they switched between slightly different parallel worlds. Each one essentially the same area, a city block for example but with differing histories, differing obstacles. A wall may block your objective in a peaceful version of the world but the wall may be damaged enough to slip through in a wartorn occupied version.
I quickly sketched out some of the gameplay possibilities.

as well as some other uses for the mechanic like using it to show a building being destroyed or as a reset to an obstacle course.

Plan: 2 Versions of the same room
Ogre3D is a nice graphics engine but it doesn't include physics or AI. Since I was writing this on my own as a side project I needed to keep the project from getting out of hand. I decided to use a technique I had used before for CowsWithGuns, colour based physics , so I decided to use it again for this project.

With the color based physics a simple bitmap represents the playable area. In its simplest form one color means you can enter that area and another means you cannot. For this game I added more complexity. each pixel in the bitmap has a red value, a blue value and a green value.

In this system Green = 0 means you cannot go into an area, Green = 1 means you can and green Green = 2 to 254 means you can enter under various conditions like if you have the correct key, have used the correct switch ect.

Red is for dangerous areas like fire or triggers switches, gives items etc. and blue is height.To the left is an image showing the playable area for one of my levels. Here I have used different colors so that It is visible to you but in reality the
colors changes are so minut it just looks green and black.

This system is simple but has a number of problems eg. the world is effectively 2 dimensional, you can't go into a floor above another floor. Well with a bit of smoke and mirrors you can, if you want to travel from a first floor to a second floor you can switch physics bitmaps half way up the stairs. giving the illusion that it is one continues area.

Using this system I could have a rudimentary coalition and trigger system which with some smoke and mirrors and simple gravity gives enough control to have platform sections, stairs, unlockable doors etc to have decent game play. combine that with being able to jump to platform that don't yet exist yet from a platform that is about to disappear makes it possible to build nice puzzles. the system also allows for patrolling guards, dogs/wolfs that can follow your scent ect.

I wanted enemies, something to run from and evade but I didn't have the resources or the free time to spend a lot of time on AI alone. Again I needed a very simple but versatile system. I toyed with the idea of using node paths for patrolling but I had a problem with enemies leaving the path to attack the player.
I knew in the time allowed I couldn't write a sophisticated system, One where the AI could realistically chase the player. That would involve the AI being able to plan its path, not run into the walls and move realistically.
What though if I could borrow the players intelligence. I had the idea of the how a dog or a wolf tracks its pray by smell. If the player laid down a node path as they moved around the AI could use that when to track the player. the AI would use the players route to determine a path to them. But what if the player ran around in circles the AI would look ludicrous or if chasing the player at the same speed the AI would never catch them.
The path nodes the Player would lay down would have a time associated with them. The AI with determine the newest node the AI can get to. Following the players path but taking shortcuts where possible. I made a prototype quickly in C Sharp to test the idea.
Above, Buttons are place holders for walls.
Red circles are parts of the path the AI can't reach
Blue circles are parts of the path the AI can reach
the AI finds the newest blue node and rechecks
as it moves giving a smooth chase.
The default patrol path is very similar but laid down in advance. When the enemy sees the player or anther trigger they switch to following the node path.

Physics and AI tool

To accurately edit the physical area, walls height etc. and to lay down the node paths, spawning points etc I quickly created a program in C Sharp. It can also display the area in false color to make editing easier.

Graphics Engine Ogre3D

I started working with Ogre 3D and at the same time I was learning to use Blender. To get to grips with both I decided to model Blennerville windmill a local landmark. Please note the video capture program I used here is horrible, the program it self is crystal clear.

After finding my way around the Ogre engine I added the physics and AI mentioned above. I also added the mechanic that allows the game to switch the 3 different worlds based on a timer and added a simple enemy to test the AI.

Full disclosure, the original textures are not my work. They are images, mainly photos taken from free to use sites. I have written another post on finding these researches and the licences involved. I am not a texture artist, it's skilled specialized work but I had to make do. I wanted each world to have a slightly different pallet based on the same images and I needed to pull together images from a large number of different location, some photos some not.

I decided to use the the cartoon filter in GIMP, it gives every thing a sort of comic book with bleeding ink look. and allowed me to teak the color properties of the texture, change the lightness darkness. The cartoon filter covers a multitude of sins and ties everything into a single visual style.

Above the original Image (not mine), a photo of some windows nice and tileable.
Below 3 images in various color pallets with cartoon effect applied.

Area mocked up in Google Sketchup demonstrating the idea of
same area parallel world, using subtly different textures.

Level Design
I modeled it in Blender3D a high end modeling/animation/render/editing package. Learning Blender is tough since it incorporates so many areas of 3D movie production. The three areas are in the same file to make comparison possible to keep the three different areas manageable I used layer extensively and put areas like like roofs and inaccessible landmarks outside of the playable area on different layers so they could be turned off the access the inside of the area.

I modeled one base area and applied textures before duplicating it and changing the textures and adding changes related specifically to that version of the area.
As you can see above this single doorway can be open or can be obstructed depending on which of the 3 levels you are in.
About 20 Blender layers were used to keep the building exteriors, interiors, roofs, surrounding city, lighting etc for 3 different worlds manageable.

I used the shipping containers in this area as a testing, training area using various height in various areas to open and close route based on the world.

This project is still ongoing. I'm not quite happy with some parts of the first area. I still need to design and model the enemies.