Coden revamping

September 8, 2008 at 6:14 pm (Coden Engine) (, )

Me and some friends decided to start again and redesign Coden. I’ve reached a point where I was pretty sure that things needed to change a lot, so as they say make one cause you’re gonna throw one anyway.

I think in general it is not a bad idea to start doing something and then do it all over again from scratch. In my opinion, the next version is going to be a lot better because hopefully you’ve learned from your mistakes. Think of the simplest thing you had to do and look at your solution. Now solve that problem again. If the solution is not the same it probably means you did better this time.

In terms of Coden, we decided to make things a lot faster. So we got a lot of books, some of which I recommend at the end of this post, and started getting ideas. It turns out that a lof of the things we tried to do on our own are already there in a much more efficient form. Which brings me to my next point: Research something before you start working on it. I’ve made this mistake a thousand times because I got overexcited about an idea I had. Yes your idea might be awsome, but there is a very strong possibility that someone else has done it better. So first google the problem or idea you’re having and after getting enough releated information about it, start working on it. It will save you time and trouble.

Here’s a list of books that I found very useful:

  • All books from the Game Programming Gems series
  • Real-time Collision Detection
  • Programming Game AI by Example
  • Game Physics Engine Development
  • Game Coding Complete
  • Game Programming Golden Rules
  • Effective C++
  • Effective STL

If you don’t have the above, get them. They are amazing books. So until next time, keep coding…

Permalink Leave a Comment

BeeSiege Overview

August 13, 2008 at 2:36 pm (BeeSiege Game)

This is a new game that I will be developing this Fall (2007) with two other people. The game idea is this. Life was good for the bees and their queen. They lived in their hive making honey and having fun. Until one day a spoiled little teenager threw his cigarette underneath the hive which caught on fire. Now the bees are left with no home and they have to travel through the forest to find a new place to live. But they are going to face a lot of challenges on their way…

The player controls the queen bee and her soldiers are following her at all times. Throughout the forest there are going to be a lot of enemies that will make the player’s life difficult. The queen is not able to attack, because that’s not her purpose in life, so she depends on her soldiers to protect her. Whenever an enemy is nearby the queen (player) will be able to select a number of bees and command them to destroy that enemy. The bees that survive the challenge will return to the queen. Of course many of them will die so a number of power ups is going to be distributed around the forest. When the queen makes it to the new hive the level ends. If the queen dies then it is game over.

Now just to give you an idea of how the game is going to look like, think of Wing Commander. Only replace the spaceship with the queen and the missiles with bees. Of course bees will not be shot at the enemy, they are going to move there at their own speed and attack him.

I am very excited about this project because it features various new stuff. First of all I do not know of any game that has a similar story / goal. Also I do not know of any game that uses this attack mechanism. Also the game features a very interesting animation mechanism. We use Behavioral Animation to move the bees around, which means that every bee or game character has a controller that generates forces and torques which drive the character. These forces and torques vary depening on the behavior that we are implementing. Behaviors include

  • Seek: the object travels to a target at maximun speed
  • Arrival: the object travels to the target while slowing down until it reaches it
  • Wander: the object moves in random directions within a radius
  • Separation: the object is keeping a distance from its surrounding objects
  • Allignment: the object follows the general direction of its neighbors

The nice thing about these individual behaviors is that you can combine them and get more complex behaviors like Flocking where the objects form groups and also have a randomness to their movement like actual bird flocks. Behavioral Animation is not a new idea however what is original in our implementations is that these forces and torques that the controllers generate are given to Ageia’s PhysX which then takes care of the simulation and moves the objects. The effect of all that is very realistic movement.. You actually think that these are actual bees you see on the screen.

Another cool thing in my opinion will be the simplicity of the game. The player only controls the queen and everything else is AI. Of course it is more than that, the player will have to make decisions that will affect his chances of survival, but still the gameplay is very simple and fun.

Before I go, I will also say that the game will be developed using Gamebryo 2.3 and PhysX. I’ll see you at the release party!

Regards,Vaios

Permalink Leave a Comment

BeeSiege Alpha Version Video

August 13, 2008 at 2:34 pm (BeeSiege Game)

Permalink Leave a Comment

Asteroids Game Screenshots

August 13, 2008 at 2:31 pm (Asteroids Game)

Some screenshots from the game.

pic1pic2pic3

pic5pic4pic6

Permalink Leave a Comment

3D Asteroids

August 12, 2008 at 3:20 pm (Asteroids Game) (, , , )

This is a project for the game design and development class that I had in June. Students had to implement a 3d version of a classic game, using Gamebryo and Maya. Here me and James chose to do Asteroids. James did all the art, I did all the programming. We had a 3d model of the player’s ship, a model for the asteroids that was scaled according to the size of the asteroids, a big and a small enemy ship, a model for the missiles, and two different kinds of billboards. One for the stars, which gave a 3d feel to the environment, and one for the explosions.

When we got very close to the deadline, the game was playable but it didn’t have any sound or explosions. The explosions were something that we knew we should implement if we wanted a better game, so we were looking for ways to do that. We definitely didn’t have enough time to learn Gamebryo’s particle system, so we decided to use billboards. Basically an explosion is a quad that always faces the camera, and grows big and small very quickly. The quad’s texture has fire drawn on it, so the final effect looks like an explosion.

On the other hand, Gamebryo was supposed to come with Miles Audio System, so we thought that we could use that for sound. Nevertheless, our version of Gamebryo did not have this audio system so we all supposed that we would not implement sound, because the game was due the next day anyway… However, our professor told us to implement sound using FMOD, and everybody panicked because people had still not implemented basic features in their games and now they had to do sound as well. I also heard that a group was writing code for six hours, trying to implement the sound system using Miles Audio, and after these six hours they hit compile… Of course they found out that all this time they spent was lost without reason… I don’t understand how people can write code for hours and then try to compile their projects… I feel that code should be written in small units that can be easily tested, before going for the whole application. Anyway…

I was worried about the sound system too, but it turned out to be fairly straightforward. I think I finished it in 2 hours or something, and it worked pretty well. It’s true that sound really changes the feel of a game. If you are an amateur game programmer DO NOT NEGLECT SOUND! It totally changes things. Now we had missiles firing all over the place, aliens squealing, loud explosions…

While working on this project, I started using some ideas I had more systematically. First of all I started using the singleton pattern. However I only use it for managers. The sound manager, the game manager, etc. We shouldn’t overuse it. Also I understood inheritance better. The game is fully based on inheritance. There is a GameObject, and everything you see in the game inherits from GameObject. That was a very flexible system that is extremely extensible. This way I can add a new feature in the game in very little time – I just need to write an update function, a draw function, and a collision response function and we’re set. And this makes sense… You need to specify what the object is going to do in the game, how is it going to look like and what its behaviour is going to be when it collides with something. That’s the way we did explosions too. We just added a new GameObject and told it to grow and shrink in 2 seconds… Easy.

Permalink Leave a Comment

Rendering Semi-Transparent Layered Media : Final Video

August 12, 2008 at 3:10 pm (Rendering Semi-Transparent Layered Media)

So we’re done… I’m pretty proud… We used the algorithm that I talk about in the design doc and we got some pretty cool results. Check it out:

Permalink 1 Comment

Beesiege – Final Video

August 12, 2008 at 3:04 pm (BeeSiege Game)

So we are done with the features that we said we were going to implement. Now the game needs tuning and some optimizations, but I don’t know when I’ll hve the time to do this. It’s been a fun period with a lot of work. Now we need to rest a little… I hope you will enjoy the final video:

Permalink Leave a Comment

Coden – Game Engine

August 12, 2008 at 3:02 pm (Coden Engine) (, )

After graduating from Penn and getting back home I decided to create my own game engine. The reason for this is that I regularly get new ideas for games that I want to make, and I am excited to start coding the gameplay part of the game, because this is the most fun part to me. But when I start thinking about all the things that I have to implement first, like input, graphics, managers etc I get so bored that I simply drop the idea… One could argue that I could use an existing engine like Ogre 3D or Gamebryo, but the thing is that I need an engine that will contain other systems too except graphics and input… For example AI, Event Managers, Sound, Networking, Scripting etc. And I want to use a SINGLE math library for a change, not 3 or 4 different ones just because the game will consist of 4 different API’s.

Also I want to learn about various things like Scene Graphs. And I believe that the only way to really learn is to start making something on your own. The name that I came up with for the engine is Coden. It comes from CODe studios ENgine.

So far I have implemented a math library that supports quaternions, matrices, vectors, transforms and the like. Also I embedded Lua for my script engine. In addition, I created some AI systems like steering behaviors, some physics integrators like euler or RK4, and a few loaders like a 3ds loader. I am currently working on the scene graph, which is harder than I thought… But it’s getting there.

If you want to look at the code you can visit my Google Code project called coden at http://code.google.com/p/coden/ .

Cheers!

Permalink Leave a Comment

Depth parallax

March 17, 2007 at 7:38 pm (Rendering Semi-Transparent Layered Media)

Today I implemented depth parallax on a quad with two textures. The algorithm creates the illusion that we have two surfaces instead of one. It’s really cool! Check out the screenshots below. The first one shows the initial multi-textured quad. The blue texture is the outer layer and you can see the inner texture through it.

initial_texture.jpg

Now this is the same quad after we rotate the view. The depth parallax algorithm creates the illusion of depth.

rotated_view.jpg

The code for doing this is pretty simple; we use a simple pixel shader and an even simpler vertex shader. We don’t even have to enable blending or even multi-texturing! We just pass the textures to the pixel shader and let it compute the final color for us.

Permalink Leave a Comment

Rendering Semitransparent Layered Media

March 14, 2007 at 4:04 pm (Rendering Semi-Transparent Layered Media)

In this project we are going to implement the algorithm presented at “Rendering Semitransparent Layered Media” [Oat2006]. Modern graphics hardware provides the capability to apply many texture layers onto a single surface. However, simply alpha blending many textures onto a surface does not give the appearance of surface depth that one would expect from semitransparent surface layers. Normal mapping, transparency masking, offset mapping and image filtering are combined in this method to produce realistic looking layered surfaces.

The method presented in the paper achieves the look of a volumetric material by exploiting several perceptual cues, based on depth and illumination, while combining multiple material layers on the surface of an otherwise non-volumetric, multi-textured surface such as the human heart shown in the first page. Multiple implementation strategies are suggested that allow for different trade-offs to be made between visual quality and runtime performance and we are going to investigate which one works best for our implementation.

You can download the design doc here

Permalink Leave a Comment

Next page »