In the next days I’ll publish a demo performing the model in an animated sequence, like the one already published and based on the models from “The Trenches”, but before I have to solve a problem about the transitions between sequences. If fact, as you can see in the old demo, the MDL animations are smooth, but often the passage between different sequences, even if thought to be connected, are too evident and unrealistic. Once this problem is solved, the models from “The Specialists” are going to behave perfectly also in APOCALYX
Wednesday, April 30, 2008
GUN TACTYX has its models
Tuesday, April 29, 2008
Infinite terrains
To create this kind of terrain you have two possibilities, shown in the flight-simulator series of the demos: “Flying Circus” and “Zeke on Your Six!”
The first shows also an application of the built-in “noise” library. It includes functions to generate fractal terrains with their own colors and shadows. This is the simpler and faster way to generate a terrain, but often you need a particular kind of shape for your landscape, thus a random generator of fractal noise is not the best choice.
The second possibility, that is also the obvious one in most 3D engines, is shown in the second demo. The terrain is defined with the help of several images: an height map, that encodes the heights of the terrain in a greyscale image; a color map, that encodes the very large scale color of the map, including the shadows of mountains and hills; a coarse map, that is a texture applied on the large scale; and a detail map, that is a texture applied at small scale to simulate the details of the terrain.
The last two textures are easy to find as free resources on the internet: for example, use seamless textures of rocks, concrete, grass, sand etc. The first two instead (the height map and the color map) must be tailored according to your needs. You can use terrain editors, like Terragen, that generate a ladscape given a few parameters and also provide tools to modify it.
When the editing phase is done, simply take a screenshot of your terrain in the height map editor (this is the grayscale image that defines the height map), then render your terrain applying the light conditions that you prefer (be sure to set up correctly the sun inclination, or the shadows will not match the sun position in your world) and take another screenshot from above (this is the color map with shadows). Remember that the infinite terrain requires a seamless height map, so use the same shape for the opposite sides of the map.
For more details, on how to load your brand-new maps in the engine, read the code of the demos cited above, give a look to the resources zipped in the data files and, finally… fly like an eagle!
Monday, April 28, 2008
Particle-based physics
You may ask what a particle-based physics engine is. I first read about it in an old paper by Thomas Jakobsen, who designed the dead-body simulator of the first chapter of the Hitman series: “Hitman: Codename 47”. In that paper Thomas described a simple way to simulate rigid-bodies, soft-bodies and cloths, through the use of particles linked by sticks. In practice, the particles follow the usual laws of dynamics, but also they are constrained in their motion by rigid connections with nearby particles. At the time it was designed, that was the fastest way to create a believable physics behavior with little computational effort. In fact, the satisfaction of constraints is performed through a mathematical method known as relaxation: the particles move back and forth for a while, thus solving in a few steps a problem difficult to fix all at once.
Thanks to this idea, you can see APOCALYX performing nice looking flags and cloths. Now, because of faster hardware, other more accurate methods are available, but there is no reason to apply more complex algorithms, when simpler ones still work quite well.
Sunday, April 27, 2008
It’s full of stars!
That’s why you can find in APOCALYX so uncommon functions. When I decided to move from a simple 3D engine to a more complex game engine, a lot of libraries became of some interest even if they are usually ignored in games.
For example, some time ago I had an idea for a game set up in the Mediterranean Sea, based on naval commerces and wars from the ancient Greek-Persian conflict to the more recent Venetian-Turkish naval battles. It was an ambitious project, but as every “too large task for one-man army” it produced some useful spin-off. One obvious: the code for a better ocean than the ten years old one still performed in the engine demos. I also needed a realistic sky, with recognizable stars, because pilots had to choose directions also according to the position of stars (yes, it was a very ambitious project). The natural choice was to include in the engine a simple but accurate planetarium: I found it in Stellarium 0.4, that is open source, based on OpenGL and simpler than recent developments of the same program.
I can’t imagine any other application for those stars and planets, but it’s not bad to know that a realistic sky with accurate motion is there, waiting for the moment that you need to find your route in the world.
Saturday, April 26, 2008
“The Trenches” animated
To see the demo at work you must download the GunTactyx2.zip file (4.7 Mb), if you haven’t already downloaded it more than a week ago, and apply the patch GunTactyx2-patch.zip (600 Kb). To apply the patch, unzip the two files in sequence and, when you are asked for an overwrite confirmation, simply confirm.
Friday, April 25, 2008
TooDee 2D Engine
I use it mainly to fast prototype games and test their design, like those games shown in the “Experimental Gameplay Project”. It is useful also when sites like “Lost Garden” provide nice 2D graphics, to develop in a short time simple games.
Almost an year ago, I used TooDee to program a simple puzzle game: “The Lost Sheep”. I have developed it for “The CCN SpeedGame Contest 2007” and I achieved an unexpected third place.
If you want to try the game, download the “Lost Sheep” from GameAce. An editor of puzzles is included, but it’s quite raw and no documentation is available. Feel free to ask for further explanations.
Thursday, April 24, 2008
Soccer mode in GUN TACTYX
Only a few players succeeded in developing interesting teams tailored for soccer mode. Those teams were mainly RobyBaggio, VanHimst, Zidane2x2. It’s amusing to see those strange cyborgs follow the ball to push it, but also it’s surprising to see the intelligent-like behaviors programmed in a few script lines.
Now I have found some good MDL models performing soccer players (see the picture above) taken from the “International Online Soccer” MOD for Half-Life 1. I’ve asked for permission to use that model in my game, so it’s not impossible that even GUN TACTYX 2 is going to include a soccer mode. Start to tune your soccer tactics!
Wrokdam players is going to score a goal.
Wednesday, April 23, 2008
MS3D vs MD3 performances
This time I compare the same dog model in its original MS3D format against its MD3 version. The MD3 format is the old vertex-based Quake3 format, while MS3D is the native format used by the MilkShape3D modeller. The latter uses skeletal animation.
MS3D above, MD3 below
In the screenshots above, you can see two scenes rendered at the same frame rate. It’s evident that the engine performs the MS3D rendering at poor speed, compared to MD3 rendering, in fact the first loses 25 dogs against 225!
The main reasons are two: MS3D, being skeleton-based, require more computations than MD3 to place each vertex; then MS3D does not support yet the clone function and every dog in the picture is a different model with its own animation data, while similar MD3 models share the same data, so the impact on memory allocation is reduced.
I think there is room for a lot of speed improvements in the MS3D animator, but in the meantime I suggest, if you own some MS3D model, to convert them to MD3 (if there are only a few animation sequences) or MDL, because they are currently faster.
Tuesday, April 22, 2008
Watermarks
Then, thanks to a comment by Robert, I realized that the Ogre screenshots look better than APOCALYX also because there is an appealing watermark attached. The suggestion was about an atomic mushroom, so I unchained my poor graphic capabilities to produce the front-image of the blog, a powered-by button and a watermark. You are going to see this watermark superimposed on the demos in the next release of the engine.
If you want to draw a better watermark and post it, I'll be very happy to open a new poll to choose among the best ones.
Monday, April 21, 2008
Wrokdam, the gladiator
WROKDAM by Grant Struthers
Wrokdam Von Gadmoore was a legendary arena gladiator in his time. He had no greater love than the glory of combat and spent his entire life shaping his body and mind into the perfect weapon. Tragically, a warrior's prime fades quickly.
Wrokdam could feel the years catching up and it infuriated him. He swore he would never allow weakness to prevail even if his body betrayed him. He decided to combat death itself through the use of cybernetics and began replacing parts of his body he felt had grown too weak to be useful in battle. He thought he had found true immortality. He was terribly mistaken.
As time passed, Wrokdam slowly slipped into madness. His mind could not endure the time his new body could and he soon lost himself to the machine.
Now the monster known as Wrokdam wanders the world in search of combat and no one knows if any part of his soul still lives.
THE STORY SO FAR... by Leonardo Boselli
In a few decades people lost memory of Wrokdam and his past glory faded away. The cyber-gladiator's story became a legend known only by the oldest arena warriors, until Wrokdam was found still fighting in a provincial arena on a far planet at the border of the Empire.
A young researcher of ZYX Corporation apprehended the military application of a body so highly trained for combat, so the mad warrior was captured and transferred to a gun-fight training area known as GUN-TACTYX.
The researcher discovered that Wrokdam's body could become the perfect combat machine, but his brain was too weak, slow and mad to drive effectively his powerful devices. A hard decision was taken and an artificial brain was installed in place of Wrokdam's carbon-based one. Then his body was cloned hundreds of time to form teams of clones fighting each other to pick out the perfect warrior through natural selection.
Only one thing lacks to make Wrokdam the strongest arena gladiator of every time: The best gun-fighting algorithm for his artificial brain!
GUN-TACTYX: Now it's your play!
The reader may ask where Wrokdam's original brain is now, but the answer is obvious if you know that ZYX Corporation's philosophy is: "Throw Away Nothing".
Wrokdam's brain is now employed as a consultant at ZYX Corporation and mainly keeps up running commentary of the fights among the clones taking place in the arenas of the GUN-TACTYX area. His deep experience in gun tactics is very useful to the developers that tune up the fighting algorithms.
I don't know if he is really dissatisfied with his new condition, but I'm sure that he is a little envious of those artificially brained fighters that resemble the aspect of a warrior once know as Wrokdam: A legendary arena gladiator in his time.
Sunday, April 20, 2008
GameDev's "Image of the Day"
Saturday, April 19, 2008
BSP performances (II)
Ogre above, APOCALYX below
Friday, April 18, 2008
BSP performances
So, in conclusion, is APOCALYX really slower than Irrlicht in rendering BSP levels? Below you can see two screenshots of the same level from above (taken from the Irrlicht demos). In the same conditions, the utility "Fraps" reports almost the same frame rate.
In the next days, I'll make the same comparison between APOCALYX and Ogre. I need just the time to extract a BSP level from the Ogre demos.
Irrlicht above, APOCALYX below
Thursday, April 17, 2008
"Trenches" vs "Specialists"
The demo is still raw, in fact the animations are not connected seamlessly, neither the models move on the ground. I'll provide a better demo in the next days, but you can already see at work the main features of the two models and give suggestions.
Wednesday, April 16, 2008
Low-poly vs High-poly (POLL)
The one on the left is a quite low-poly WW1 german soldier from "The Trenches" MOD for Half-life 1, while the other is the Legionnaire that comes from "The Specialists" MOD always for Half-life 1, both wearing a gas mask in the picture.
The choice will influence the design of the game:
- In the first case (The Trenches) the game will include two platoons (british and german) of twelve soldiers each with two weapons: rifles with bayonet and grenades. The best environment for this choice is probably an open ground with trenches. Here the management of the team is going to be more complex, because a lot of mates are around.
- In the second case (The Specialists) will be available four team of three soldiers each with several weapons: rifles, machine guns, berettas and grenades. Here the best environment is probably an in-door maze and the main difficulty will be the management of the single unit, because of the high number of animations and weapons available.
Being an important choice for the game, I ask for suggestions: it's not only a matter of model, but also of design. In the poll on the right, you can choose the model and the design that you prefer.
GUN TACTYX 2: Now it's your play!
Tuesday, April 15, 2008
The Lua sandbox
Monday, April 14, 2008
A new movie
Sunday, April 13, 2008
Improving MD2 support
Tweaking the code, the demo showing 32 MDL models now give roughly the same frame rate of a square of 64 MD2 models with weapons and shadows.
In conclusion, in the next release of APOCALYX you are going to double the number of rendered MD2 models at the same time, keeping the frame rate the same: a nice achievement.
USA and German soldiers (MD2 format)
Saturday, April 12, 2008
MDL vs MD2 performaces
Since I'm oriented towards the usual, inflated WW2 background, my choice falls between the models of "The Trenches" MOD for Half-Life 1 and the models of the "DDay" MOD for Quake2. The models of the latter are worse, if seen at short distances, because of the limitations of the MD2 model format, but I thought that they were going to be better to keep frame rates high. In fact, an MD2 model is very simple: one need to attach only a single texture and render only triangle strips or fans already optimized for OpenGL strips and fans. On the contrary, MDL models are more complex and better seen at short distances: they need several textures, lots of triangles and the animations based on skeletons require chains of matrices multiplications.
Because I need a lot of models around of the battleground, I thought that MD2 models were lighter, but I was wrong. In the pictures below you can see a square of 36 WW2 USA soldier in MD2 format (from "DDay" MOD) against 32 british and german WW1 soldiers in two rows (from "The Trenches" MOD). Surprisingly the frame rate is roughly the same. I don't know yet which is the cause: the poor code of the MD2 animator, the good code of the MDL animator, or the relative heaviness in triangles count of the two kind of models.
However, this first test gives more points to the better looking, more versatile MDL models.
32 WW1 british and german soldiers in two rows (MDL format)
A square of 36 WW2 USA soldiers (MD2 format)
Friday, April 11, 2008
Improving MDL support
In the next release of APOCALYX, you are going to find an even better support for this format and you'll give new Full-Life to your MDL models!
The picture above shows MDL models in action from "The Trenches" MOD for Half-Life 1. I asked for permission to use these models in the next release of my GUN-TACTYX game. These models are quite light-weight and good-looking, especially when seen from a distance, as in a RTS-like game.
Thursday, April 10, 2008
The APOCALYX Blog is here!
In the picture you can see APOCALYX featuring the great MD2 dragon model by Magarnigal. You may notice the flame following the dragon's mouth: it's not easy to attach a particle emitter to an MD2 model, but the engine can do the trick. Give new life to your MD2 models!