New Project started: Tower Defense Game for Android

Last weekend I started a new Project. I am now developing a Tower Defense game for Android. It will be a classic Tower defense game, where the enemies will walk predefined paths in multiple waves. Your task as the player is to stop them to reach your Castle by placing defending towers on the map. Until now I haven’t found a proper name for the game – but this will follow soon.

This time I’ll use the Andengine Game Engine and will share my experiences here in the blog.

 First Steps

Even if the start was a bit difficult, because of the way Andengine works with textures and Atals objects, the first impression on Andeninge is very good. A lot of functionality that I had to work on for long times in e3roid are already available in Andengine (e.g. letting an enemy walk along a predefined path). This will reduce the development time a lot.

 What’s done so far

Here you see a first screen-shot, where you see some enemies and defending towers. The graphic is still draft, especially the level design, as it’s mainly build to code and check the logic.

Letztes Wochenende habe ich ein neues Projekt gestartet. Ich habe begonnen ein Tower Defense Spiel für Android zu entwickeln. Bei dem Spiel wird es sich um ein klassisches Tower Defense handeln, bei dem die Gegner vordefinierten Wegen folgen. Deine Aufgabe als Spieler ist es mit Verteidigungsanlagen, die Ihr kaufen könnt und auf der Karte platziert die Gegner davon abzuhalteneuer Schloss anzugreifen. Noch ist kein Name für das Spiel gefunden, aber der wird sicher bald folgen.

Bei der Entwicklung werde ich nun die Game Engine Andengine nutzen und meine Erfahrungen damit hier teilen.

e3roid example: Score handling – displaying the score

Something nearly every classic game needs, is the display of a score. A simple text doesn’t look “game like” – so a normal “textsprite” wasn’t my choice for displaying the score.

In this article you find my implementation a score-display class for e3roid based on animated sprites. I could also have used “TiledSprites”, but I still have the vision of letting the numbers change with animation – but I haven’t started implementing this yet.

To use the source code below you first need a e3roid body. Best is to extend the code of the Tutorial “Handle touch events” on the e3roid-page. If you follow the instructions below, the course will be increased with each touch-action.

Here you see how a sample coding could look like:

Continue reading

Game Engines: Including the the first game elements in my Android project

The next step after setting up an Andorid project was to include the first game relevant elements into a prototype. The target is to put multiple moving or animated graphics (sprites) and paint them into a canvas that will regularly be displayed on the screen. To accomplishing this, a nice class hierarchy has to be created to easily handle and organize sprites.

By coincidence i stumble over two freely useable 2d game engines, which handle exactly these topics – and even more. I have had a detailled look at both engines. Here you find a short summary of my experiences, that I’ve made with these engines:

e3roidhttp://www.e3roid.com

E3roid is a relatively easy to learn 2d game engine for the Android. There are a lot of example source code available that perfectly describes the way to use the engine. There is a good Tutorial in the e3roid-Blog available, which makes the start even more easy.

Basic functionality is in addition to sprites and animated sprites also an easy menu-function and the support for so called “Tiled-Maps”, which helps you in building game-worlds quite easy.

Andenginehttp://www.andengine.org/

Andeninge is, like e3roid, a 2d game engine for Andorid. The engine seems to be more difficult to understand as e3roid. Many functionalities are quite similar to e3roid (because e3roid is been inspired by Andengine in some places). But it’s not only more difficult, but also looks more professional and complete than e3roid. Additional functions in Andeinge are for example: Audiosupport, a* (a-star) algorythm for path-finding on tiled maps, and a multi-touch onscreen controller.

The Andengine-Community is very active, so that you can quickly find solutions for your problems or get some inspiration by others.

My conclusion:

Who prefers to have a quick start should have a look at e3roid. You can have nice results within a short time. Especially if you are new to the topics, I’d really recommend to use this engine.

If you prefer the more professional way and you require a more complete game engine, you should prefer to use Andengine. The more difficult start-phase will soon be rewarded when more complex questions arise.