C++

warning: Creating default object from empty value in /mnt/web115/e0/40/51546440/htdocs/drupal/modules/taxonomy/taxonomy.pages.inc on line 33.

Attack of the sheep clones

After the UI, I'm improving (that's a huge improvement, you'll see :)) the units... some of you told me the magician walking without moving his feet is not a proof of high technology... (who is impressed by someone walking with his feet ??).

So here is the attack of the sheep clones (I don't know how to draw but I can make them jump...) There are other models too and will be many more soon (It's funny how many object you can make jump :))

Sheep clones

Don't mess with your algorihtms

After some weeks without working at all on my projects (got a job, and I'm now preparing my travel to Australia). I decided to fix my lost algorithms.
The one you can see is my plant generator (an simple alpha version... and yes all is alpha in this game but i'm gonna fix that too).

The conclusion for today is : Don't feed your plant too much or they gonna eat your screen.
Ps : my Liquid Crystal UI is getting better. I'll soon show a preview of it.

Plant eating my game

Empire Defense in 3D

I wanted to try if a 3D mode would be cool for the game. I played during 2 days with Irrlicht and decided to implement it for the game (as another View, which allows me to use the 2D or 3D view anytime I want). Irrlicht is maybe not the best (I don't like how they code and there are many mistakes, like the returning a full object instead of a const ref some times... and missing optimization like using a list instead of a vector is sometime useless). I'll move to another engine if I need it.

Empire Defense with Irrlicht

MVC applied to the sound

Now I have some music/sounds to add to the game (see the next post), I need to implement the Sound Engine. After looking for a library on Google, my final choice was Fmod. It's quite easy to use and seems to be fast. I'll not show you how to use it, there are some tutorials easy to follow on Internet.
However, this is a big step in the game development. The sounds and the music really increases the game sensations.

Object Pool Management

I'm always looking for performances (too much I guess) and everybody knows that a malloc/free is expensive. That's why I was using a Object (can be Unit, Towers, Ammos....) array as a fixed memory and a vector of Object pointer as a list pointing to some of the array objects. The only problem was about the constructor. I didn't find a way to call it without "new"

Multiplayer : lot of towers

Multiplayer : Cooperative mode

Implementing Multi-player was an easy task. I only changed the "Player* player" to a "vector players".
Actually the game is in cooperative mode. But it can be easily changed to another multi-player mode. The money is individual but the rewards are shared whoever killed the unit.

The number of players in-game is not limited, which is a good news for my mmorpg version (will come in a long long time I guess)

Multi-player mode

Font Management and rendering

The font is an important part of the graphics. It has to be clear, easily readable and small enough.
The previous version, as described in one of my first post was using a bitmap pre-generated and a metric file.

I still beleive it's a good idea, except for the pre-generated part (how a waste of time it is !). So I looked at some OpenGL good GUI and found good articles about Freetype2. For those who don't know yet, it's a library generating font bitmap from true type fonts. (The article on Nehe Tutorials is a good way to start to use it).

Simple Font

2D Shock-wave on texture with shader

The new shader example is about how to simulate a shock-wave over a texture.
It is really useful for my explosion. The result is pretty cool. It looks like a transparent shock-wave, and I think I could use it for water wave. If you can make a better version of it, I'll appreciate to get it :)

I could have used 2 textures (the real texture + a normal-like map) to implement it. However I'm not sure if the multi-texture is part of all the almost recent devices, I use a distance algorithm.
Video from YouTube to show the effect of the shockwaves :

Shock-wave

Bring the peons for the construction

To be honest, there is no peons at the moment... but maybe one day. My idea was more about how to make the player know a tower is in construction and not broken. I don't have skills/time to draw animation so I simply made the tower appears slowly from the ground until it reaches its size. Who never looked at a construction site and never saw a huge smoke of earth. That's my second idea... to add some smoke during the construction.

Here is the result and I really like it :)

Tower construction

Pre-compiled headers : simple how to

As many of other independent developers, I don't like to use tools I'm not completely controlling and I try to reduce the complexity and dependence of my project as possible as I can. That's why most of the time I remove the stdafx.h from the projects I create and disable the pre-compiled use in the project settings.

This is a good idea if your project is using less than 10 files (and not big libraries) but it can be a really huge mistake on huge projects. My project is now using around 40 classes ( I always try to reduce it but it is sometime impossible ) so I decided to implement the precompiled header.

My compilation time is 4-5x faster than before (even more now I'm using Boost Library). I'll explain how to configure it easily.

Syndicate content