APOCALYX is a...

free Game Engine based on OpenGL (MAIL) (SITE) (FORUM) (BLOG)

Sunday, August 31, 2008

The Guns of MekaWars

Finally, it's time to describe the MekaWars battles. You already know something about MakaWars spaceships, fighters, bombers and exoskeletons. Now I list the basic weapons available and show here the usual little radar-screen of a fight.

As you can see, there are asteroids (yellow dots), resources (orange and cyan), harversters (two green dots) and fighters (two red dots). The fighters are firing with their cannons.
These are the weapons:
  • Cannons shot projectiles (bombs) that explode after a specified amount of time or when they hit an obstacle; the inflicted damage depends on the target distance from the center of the explosion; bombs are invisible to the radar; the vehicle can't shot bombs when the shield is active; there is no limit to the number of bombs, but they require a certain amount of energy
  • Missile launchers launch missiles, of course, that follow automatically a given target; they explode when a certain distance of activation is reached, a timeout has expired, or an obstacle is hit; again the inflicted damage depends on the target distance from the center of the explosion; missile are invisible to the radar, but the sonar can detect them (it detects only the distance of the missile, not its precise position); missiles are confused by the launch of false targets; there is a limited number of missiles for each vehicle
  • Torpedo tubes launch torpedos, of course; they are similar to bombs, but possess an activation distance and a trigger time, so they may act also as mines if dropped in place; again the inflicted damage depends on the target distance from the center of the explosion, thus short activation distances are better; torpedos, like bombs, are invisible to the radar and to the sonar; the number of torpedos for each vehicle is limited
These are the weapons actually implemented in the MekaWars simulator. Let me know if you need more!

Saturday, August 30, 2008

MekaWars' blueprints (II)

Yesterday I briefly described some of the devices installed on MekaWars harvesters. Today I consider fighters and bombers.
Since this kind of vehicle is used mainly for combat, you may expect that weapons play a major role in their equipment: that's right, of course.

The basic devices, such as the generator, the radar, the engine and the hull, are also available, but there are additional ones.
For example, the shield is very important, since it can protect the vehicle, when it is activated. Then there is the hiding device, that removes the vehicle from the enemies' radar screens. There is also the disguising device, that reveals the unit as another one, weaker or frindly, to enemy probes.
Finally there are the weapons: cannons, missile launchers and torpedo tubes. The differences among these kind of weapons will be discussed in a future post (for example, what have torpedoes to do with outer space?). Let's say only that cannon balls, missiles and torpedoes are different in their reactions to the surrounding environment.
As a final consideration, one may ask, shields apart, if any countermeasure is available to defend vehicles from attacks. First of all, there is the sonar (uh!? What has the "sonar" to do with outer space?), that is very useful to detect incoming missiles, and also false targets to confuse the enemies' sensors.

Friday, August 29, 2008

MekaWars' blueprints

Some days ago I described the structure of the MekaWars spacechips and the modules they are made of.
In the game there are also units made of a single piece, like a lone module, but their internal structure is also complex. In fact the vehicles, such as cargos, fighters and bombers, even if they are shown as one-block models, possess a hidden organization, visible only to the simulator.

Let's consider, for example, the structure of the harvesters. These vehicles are sent around the asteroids to collect resources and dust of several materials, such as iron, silicon and uranium. When the charge is complete, they return to the spaceships to fill their holds.
Such vehicles possess the harvester, properly called (the device uses to collect resources), that is connected to a tank. As in other vehicles, there is also a generator to which all the devices that need energy are connected , like the radar, the detector and the engine. Each of these devices is described by several properties and interacts with the environment that surrounds the vehicle. Finally, the hull intercepts the damages and is responsible for the integrity of the vehicle.
Fighters and bombers show a similar structure, but in that case other devices are more important, such as cannons and shields.
A simulator so detailed may seem too complex at a first sight, but the inner workings are not explicitly visible to the player, while the variety of behaviors and the combination of different structures open the possibility to a variety of personalizations.

Thursday, August 28, 2008

Dog in the moor

Just a screenshot to remember
that your dog is a wonderful
playfellow, but it's not a toy.
If you leave for holidays,
don't adandon it.

Wednesday, August 27, 2008

Penguin on ice

The genie said: "Aladdin, still one wish remains! Which is your very last desire?"
Aladdin thought that no other satisfaction was greater than to see the nations on earth all at once, nothing was more exciting than to fly at high speed over the ocean, no activity more inspiring than to be able to sing the sweetest melodies.
So Aladdin answered: "This is my very last wish: to be a bird!"

Just a screenshot to remember that
it's hot here in Imperia (ITALY), but
it's very cold in the Antarctica, so
best wishes of a nice winter to...
all the penguins!

Tuesday, August 26, 2008

Game AI book

Some time ago I listed several papers related to Artificial Intelligence that made use of GUN-TACTYX as the main testing application of their thesis (read the post).
I forgot to mention that also a whole book, devoted to AI applications in computer games, had based its examples on an old version of APOCALYX. The book, published in 2004, describes several AI techniques useful to make the behavior of NPC more believable. The book is "Programming Believable Characters For Computer Games" and includes a lot of examples based on a VC++ version of one of the first releases of APOCALYX.
The author, Penny Baillie-de Byl, says: "Computer games have evolved from simple, little programs to major Hollywood-type productions. And today's player expectations have kept pace with this evolution - they expect truly believable gaming environments with complex stories, characters, and action. To achieve this quality, developers need to incorporate the most cutting-edge tools and techniques available. Programming Believable Characters for Computer Games is written to provide such a resource. It takes current research in artificial intelligence and games and presents both the concepts and architectures through practical programming examples. The book focuses on the higher-level AI needed to develop interesting and believable, non-player characters that can learn and express emotions. With an emphasis on pathfinding, decision trees, finite-state machines, rule-based systems, and goal-oriented action planning, it addresses the current topics in game development. Throughout the book, programmers work through the step-by-step creation of a 3D animated autonomous character. Each chapter covers the theory of the topic and then applies it through practical hands-on exercises. The creation process works from design, modeling, and animation to the development of the artificial brain, which includes techniques for learning, socializing, communicating, navigating, and adapting to its environment. This is a comprehensive resource that brings current games research into the hands of programmers."

Monday, August 25, 2008

Lost Garden Bronze Award

The results of the latest Lost Garden's Prototyping Challenge (Shade) are finally available. My entry was one of recent APOCALYX demos: Mushroom's Ride.
Unluckily I released it without implementing the main design requirement: take advantage of the shadows to bring the mushrooms at home (read the release post).

This design requirement was fundamental, that's why the entry received the bronze award instead of the silver one, that I tried to achieve. Anyway, seeing the quality and variety of the one and only entry that deserved a silver award, the result is not so bad.
Thank you Danc (the owner of Lost Garden) for your interesting game design ideas and your great graphics.

Sunday, August 24, 2008

Olympic Medals

Just a screenshot to celebrate
the Italy's partecipation to the
XXIX Olympiad - Beijing 2008

Saturday, August 23, 2008

MekaWars' harvesters

Today MekaWars moved a further step forward: the pilots can see the environment and the objects around them, in fact the algorithms to manage a radar and a detector device were finally implemented in the simulator.
The radar is useful to detect enemy vehicles and obstacles, like asteroids, while the detector is necessary to find the resources flying freely all around in empty space.

In the screenshot, that depicts the usual schematic 2D top view, you can see asteroids (yellow dots), two fighters (red dots) and two harvesters (green dots). All the other small cyan and orange dots represent two different kind of resources.
In the sample script, the fighters are instructed to avoid asteroids and other vehicles. To accomplish that task they use the radar and move away from the trajectories of the flying obstacles. In the same script (an if-then selection tests the kind of vehicle and chooses which section of the code must be executed), the harvester is programmed to use the detector and find any nearby resources of the requested kind, then directs the engine towards that resource to collect it. In the picture, there are just two harversters that move towards their nearest assigned targets.
The next step? To give the pilots some missiles and torpedos to shoot. Stay tuned!

Friday, August 22, 2008

MekaWars' pilots

The MekaWars' pilots move their first steps or, better, fly their first flights. As already explained in an old post (read it), in a programming-game like MekaWars, the bots' AI is written in Lua and executed in a sandbox, that is a protected environment where the player's code is executed without affecting in dangerous ways the computer, or the execution of the simulator, or other players' code.

As you can see in the screenshot (always taken from the current simple radar-screen-like viewer), a very short script can already control the vehicle on which the pilot is loaded. In this case, the pilot sets the speed at 75 m/s and every 5 second changes direction by 90 degrees.
The simulator answers to those commands accelerating the vehicle to the requested speed and rotating the direction when necessary. There are also other behaviors managed automatically by the simulator. For example, when a vehicle hits an asteroid, it bounces, but the direction is again rotated, according to the maximum speed of the vehicle, to match the requested direction. Then, after several collisions, the vehicle is so damaged that it explodes and the pilot is lost in space... but this is another story.
Stay tuned for more developments in the structure of the simulator and more complex pilots' behaviors.

Thursday, August 21, 2008

Andrea Orioli's models

Yesterday I forgot to mention the other models shown in the MekaWars' trailer. They are the well known vehicles already used in Hoverjet Racing.

They come from an Andrea Orioli's old project known as Black Chaos, a clone of the old Wipeout 2097. He kindly gave the permission to use them in Hoverjet Racing and I find them so good that I use to include them as placeholders also in other projects.
Being a high-level graphic designer, Andrea finds those models obsolete, in fact after those first attempts he designed more advanced models for the same project and developed also professional models for commercial games. If you are interested, visit the Andrea Orioli's online portfolio.

Above you can see the new version of the Black Chaos vehicles, while below you can see some very suggestive buildings taken from the scenery where Black Chaos races had to take place.

Wednesday, August 20, 2008

MekaWars' models

Yesterday I talked about the basic viewer of the MekaWars' simulator and someone asked about the models shown in the game trailer's screenshots.
As usual they come from free packages available on the internet, but they are only placeholders for the real original models, of course. They were taken from TurboSquid, the famous 3D models repository.

There are several lowpoly models representing cargos, spacefigthers and even a space station. They fit quite well in the current line of development of the game, but I need more models to distinguish the different races and technologies.

In the same package, several ground buildings are also included, such as a landing dock, a graving dock and a barrack. They are shown in the trailer's screenshots, but those structures are not needed by the current design of the game, since it takes place in outer space only, around a few asteroids.

Tuesday, August 19, 2008

Radar screens

The core of MekaWars is its simulator. Ships, cargos, bombers, fighters and robots must interact in a "realistic" way with asteroids, laser beams, missiles, torpedos and so on. To test effectively the wanted behaviors is not always the best choice to develop a fully featured 3D view. In fact, since MekaWars is, for simplicity, based on a 2D map even if outer space is its environment, a 2D view is faster to develop and easier to understand. Once the simulator will reach a sufficient level of development, the next step will be the design of a nice 3D viewer full of advanced effects, while a slighly improved 2D view will become useful to emulate schematic radar screens.
Also in my past games 2D views were important. In JROBOTS, the top map is the main and only available view to players. In that case, the choice was driven by the limitations of early Java applets, since JROBOTS is completely Java based.

However, dots, lines, circle, sectors and texts, that you can see in the screenshot depicting a running online match (visit the Online Arena page to see live fights), show in a clear way what's going on in the arena.
Of course, our PCs are equipped with powerful 3D graphic cards and it's a sin to take not advantage of them. That's why in the JROBOTS' successor, that is GUN TACTYX, the fighting robots took the shape of Wrokdam, a legendary post-apocalyptic arena gladiator, and the fights could finally take place in a 3D environment.

Obviously the 2D view wasn't dropped at all, because 3D scenes are nice and involving, but a player need to clearly understand what's going on to find the better strategies. The 2D dotted view was the preferred one during GUN TACTYX tournament, even if players always get involved by the 3D view at the beginning.
Finally, it's MekaWars time. Its simulator is still in development, but there are already interesting features available. Also the 3D viewer is not available yet, except for the demo scenes, but a simple 2D viewer is already up and running.

It's purpose now is to debug movements and collisions, but it's amusing to see that astro-pool at work: asteroids bounce one against the other, while fighters try to keep away from their trajectories. It's not far the day when fighters will shoot missiles, while their targets will flee away trying evasive manoeuvres, all tracked down by the radar screen dots.

Monday, August 18, 2008

Spaceship modules

The simple modules described yesterday permit to assemble in a modular way any kind of starship necessary to the players of MekaWars.
Since the modules must easily connect along their sides and, at least in a first release, all the modules share the same shape, there are only a few regular polygons possible. The easiest to use are hexagons and octagons, in fact equilateral triangles and squares leave only a few free sides after connections, while pentagons can't build linear structures.
My first choice fell on octagons, because leave more sides free after any connection between modules.
The second step was to model those modules and, as usual, I played a little with Wings3D. This screenshot shows the result: a simple octagonal model that I can slightly modify to differentiate other specialized modules.

In Wings3D, it's possible to attach textures on models, of course. The texturing tool passes through several steps and it's not easy to master but the final result, as shown in the screenshot, is quite acceptable.

Since the game will feature several races and nations, it's easy to change the aspect of the modules modifying the attached textures, even if they are all octagonal.
Another possibility to differentiate the races may be also to assign a particular regular polygon (triangle, square, hexagon, pentagon and octagon) to each of them. Players must be careful to choose their preferred race also on an architectural basis, in fact to build effective spaceship based on pentagons should be very tricky.

Sunday, August 17, 2008

MekaWars' spaceships

After a few MekaWars' screenshots, let's talk a little about it.
MekaWars is a game in development of the "programming games" genre, those games like Jrobots, where the players program the AI of their team of bots and then watch them fight against teams written by other players.
The environment of MekaWars is outer space, so you can expect fights among bombers, robots and spaceships.
Here I briefly describe the constructible ships system. Every player will be able to build his fleet starting from a given number of resources. Fighters, bombers and robots apart, that are fixed in their structure except for the installable devices, the players are going to build their spaceships from a defined number of modules, like those depicted below.

Each module has its own role and characteristics. For example, the battery installs cannons, the hangar and the deck hold fighters and bombers, the generator produces energy, the hold stores resources and so on. Since the modules are octagonal in shape, there are several possibilities to connect them in different ways.
Assembling the modules, the players can build specialized ship classes. Here you can see just a few examples.

This battleship connects 3 batteries and 2 engines, because the weight of the modules may require a lot of kinetic power.

This carrier alternates hangars, that store fighters, bombers and robots, and decks from which the vehicles lift off.

This heavy transport requires 3 engines, a powerful generator and carries several holds full of resources.
Other assemblies are possible, of course, and the players are going to build their fleets according to their preferred tactics and strategies.

Saturday, August 16, 2008

The GLGooey GUI (II)

This post regards again the GLGooey GUI included in APOCALYX. I already described months ago all the GUIs supported by the engine (read the post) and in particular the GLGooey GUI (read the post), but now I'm developing the GUI necessary to manage the fleets of MekaWars Offline so I discovered further GLGooey's hidden capabilities.

In practice, I needed to show several properties of fighters, bombers and ships, along with some explanatory image, but in the standard components I couldn't find any way to display an image on a button or as a static decoration.
In reality, GLGooey supports user defined skins through XML and it's easy to specify an image as the background of the title bar, for example, but I needed to show lists of images and to control that lists through Lua scripts.

To solve the problem I finally used the GuiCustomWindows, a particular kind of window that a programmer can completely define, from the paint function to the mouse callbacks, using Lua scripts. The programmer can draw arbitrary patterns in the window/component calling in the paint method a big collection of drawing functions, in which are included functions to load and draw PNG images.
As you can see in the screenshot, if the images are well done, the GUI looks much better and becomes easily readable.
Compared to other GUIs, GLGooey seems less featured, but in reality all the necessary tools are there to be assembled in the way your prefer with just a little effort.

Friday, August 8, 2008

Olympic Flame

Just a screenshot to celebrate the beginning of the
XXIX Olympiad - Beijing 2008

Thursday, August 7, 2008

Olympic Flag

Just a screenshot to celebrate the beginning of the
XXIX Olympiad - Beijing 2008

Wednesday, August 6, 2008

RPG Inventory preview

Yesterday I received a new demo by Nout, the author of the NsEditor, the editor/framework for APOCALYX.
You may know that the NsEditor includes great tools to write Lua scripts, manage game resources and edit the game world directly into the 3D scene. These powerful features apart, NsEditor includes also a framework plenty of ready-to-use entities to populate your demos and games written for the APOCALYX 3D Engine.
The demo I received from Nout is a preview of the Inventory entity, a kind of object very useful in RPG games.

As you can see in the screenshot, several objects are shown in a grid. What you can't see is that the objects in the grid are animated, the objects zoom out when selected, the number of items increases, a personalized message appears on the bottom and... the intentory-voice reads that message! Yes, Nout's Inventory is the single most complete piece of software ever written for APOCALYX, in fact it makes use of several different libraries at once. As usual, Nout made a great job!

In the screenshot above you can see another zoomed item, while in the one below you can see the selection dialog, where the player can select different attitudes for the same item.

I hope that a demo of the inventory will become publically available very soon, so everyone will be able to test the powerful and versatile features of this new NsEditor's entity.

Tuesday, August 5, 2008


A week ago I talked about PowerBullet, an easy to use tool to design simple Flash presentations (read the post).
Looking for a help in programming the code necessary to Video Capture, I have found another free utility related to Flash that is also a screen activity recorder. It is called CamStudio.

The purpose of CamStudio is twofold: one can use it to create several kinds of demostrations in AVI format, simply recording the screen activity; then the program can convert the generated AVI file in a Flash movie, easily embeddable in HTML pages.
The description from the producer's site says:
RenderSoft CamStudio is a tool for recording screen activity into standard AVI video files. If you move the cursor, launch a new program, type some text, click a few buttons, or select some menus - anything that you see on your screen - CamStudio will be able to record all these and allow you to play them back later on.
You can use CamStudio to:
  • demonstrate features of a new software
  • create movies used in user trainings
  • track the progress of a program that executes for a long time
  • record the sequence of steps that cause the occurrence of bugs in faulty software
  • record a movie stream
  • convert AVI files to Flash (SWF) files.

Monday, August 4, 2008

MekaWars trailer (II)

Just a screenshot
MekaWars Offline trailer

Sunday, August 3, 2008

Video Capture

As usually happens, a webcam is placed at the top of the screen of my notebook. I was disappointed by the fact that APOCALYX could render nice scenes on the screen, but couldn't take advantage of the webcam. For example, one could think of embedding the real world that surrounds the player in the virtual world of the game.
To perform a step forward in that direction, today I wrote some functions to manage the Video Capture facilities of the operative system in the Lua scripts of the engine. The result is shown in the screenshot below.

As you can see, the Lua script executed by the engine is doing its job showing a live portrait of myself in the small window at the bottom-right of the screen. That is nothing extraordinary, but along this way a few new interesting features are going to become possible.
First of all, the captured images could be drawn on textures and applied to the objects of the game, both as single frames or as live videos. This is the main use of this feature, of course.
Another possible application, that I'm very interested in, ragards head motion capture. To know the direction from which the player watches the screen may improve the 3D realism of the scene. An additional transformation of the in-game camera, according to the player head movements, greatly helps the brain to interpret correctly the depth of the scene.
A famous movie of a similar approach, realized with the help of the Wii sensors, explains how this principle works.

Of course, head tracking through a webcam requires algorithms that the engine does not include yet, but this could be a good accasion to let your webcam actively partecipate to your games as an additional and uncommon game peripheral.

Saturday, August 2, 2008

CDN Speedgame Contest

Just a fast news to let you know that the CDN Speedgame Contest 2008 has started yesterday.
The goal is to create quick, fun games focused on different aspects of Christian teaching (either moralistic, theological or both) to promote Christ, Christian Games and Fun!.
This years theme is: PROVERBS!
Create a game based on the point of the Proverb or create a game based on the Proverb itself! Dig through your Brains and Bibles and come up with a Creative and especially FUN idea.
PROJECTS MUST BE SUBMITTED BY OR BEFORE MIDNIGHT AUGUST 17TH TO QUALIFY, so you have two weeks to release your entry. Hurry up!
To download the entries of the last yers visit the CCN Speedgame Contest 2007 site.

Friday, August 1, 2008

MekaWars trailer

Just a screenshot
MekaWars Offline trailer