Freitag, 25. Dezember 2015

Creating a game with GameMaker - Tetris

As promised, I will show you today the source code of a small game that I programmed. But it is not an original creation, but the reprogramming of a game that has been around a very long time - since 1984. Even today there are many new versions of it and it's still a popular pastime in many ages. Most probably know it from Nintendo consoles, others play it mid way on their smartphones.
It is TETRIS!








This game is liked to be cloned and imitated, and not least because it is so "simple". The programming, however, is perhaps not as trivial as one might think ... depending on how you implement it.
I'd like to
share my version, I made with GameMaker: Studio (version 1.4.1657) and explain a little bit to it.

Download Tetris (.zip file 867KB)



In this archive you will find the entire project, including all images and code.
Overall the game is not necessarily written beginner friendly - we want see how it's done "correctly" for learning, and let's see how it looks like. That is, the code is partly highly optimized and no unnecessary Drag'n'Drop was used. Nevertheless, I have the scripts clearly structured and extensively commented (in English).

Below are listed some individual parts of the game I want to show and explain shortly.


The Rooms:

In order for a game can be started, there must be at least one room. In Tetris, we have three rooms:
room_intro
room_title
room_game

Relevant is only room_game, the others are only prepared for bringing you directly through to the next room, for now.


The Objects:

obj_all Persistent (ubiquitous object), which is to take care of everything that can happen always and in every room.
obj_intro An object that is to take care of an intro at the very beginning of the game.
obj_title This object is to look at the title screen. From there different game modes should be available to be started.
obj_tetris_controller The controller is to look after the in-game happenings. It is the centerpiece of the game.
obj_tetris_stone This embodies a tetris block of any form.
obj_tetris_back Helper object for drawing a background.

The Scripts:

These are just five of ten scripts, which are used in the game. For the rest you can see in the attached archive.

When a new tetris stone is created a random form is passed to it. This script sets a 2D array (matrix) for any of the possible forms that determines which parts of the maximum of 4x4 large stone are set and which are not.
 ↓ tetris_set_stone_parts(form) ↓

The following two scripts are called for the currently falling stone when you press the button for a right or left turn. It assigns the set of tetris parts of the above matrix, so that the entire stone is rotated by 90°.
 ↓ tetris_stone_turn_right() ↓

 ↓ tetris_stone_turn_left() ↓

Once a stone has been moved, you can check with the next script if it collides with another stone. For this all the other stones are checked: do the boundaries of the maximum possible size of 4x4 stone parts overlap? Only if that is the case, the individual stone parts are checked. This approach is very efficient and not necessary with today's computing power... you also can implement this much easier. But as I said - this is supposed to show how make it "right". ;)
 ↓ tetris_check_collision() ↓

If a falling stone finally hit the ground or other stones (collide after moving), it can be tested with this script if lines are completed and can be cleared.
 ↓ tetris_check_for_clearing(clear_y1, clear_y2) ↓



The interaction of items:

So now you have learned about the most important parts of the game, but how do they work together? This I also want to keep short:
The object obj_tetris_controller is assigned to the room room_game in the room editor.
If the game has been started and the room was
reached, the controller will take care of everything. For example i also creates an instance of the obj_tetris_back object which is for handling the background.
The controller will now create an obj_tetris_stone instance at the top of the screen. Always after a certain time, which is set to a half of a second, or 500,000 microseconds (fall_time = 500000) in the create event of the controller, the current stone is moved one square down. This movement takes place in the step event of the controller.
What also happens in this event, is cecking various keystrokes, such as the arrow keys or WASD, to control the stone falling. Depending on what is pressed, the stone is moved to the left, right or down or is rotated by the scripts mentioned above. After each such action it is checked for collision again and if necessary the movement or turning will be reversed, because we do not want overlapping stones.
When a stone strikes down, that means reaching a specific height in the game area, or collides with a stone under it, then its movement is stopped. After this stop it's checked via tetris_check_for_clearing for completely filled rows and then a new stone will be generated at the top of the screen.

However, if fully filled lines were found, they will be removed. This process is probably the most complicated one in this program because the matrices of the stones need to be adapted and maybe stones have to be split into several pieces if the mid part(s) of these stones were cleared...
When a new stone was "thrown" in, it is to be checked if there's enough space for it. If there already a collision takes place, the playing field is full and the game therefore is over.



And so the end result looks like. It should be noted that the background was found in a Google search and the font is not by me, either. Everything else can be used freely (it will be nice to have credits to BadToxic, of course ;) ). But errors are also still included in this version - the finder will be allowed to keep them...

I know this tutorial may not be suitable for beginners, but with it you can see how GameMaker works or learn from it if you are already ready for it. ^^
Also, I would have liked it to be able to show and explain a lot more, but unfortunately I do not have the time. But if you have any questions, please feel free to comment uses this blog's
functionality - I'll try to help. :)

And at this point I will tell you that I continue with this game and will try to make something nice. ;)

Ein Spiel mit GameMaker erstellen - Tetris

Wie versprochen, zeige ich euch heute den Quellcode zu einem kleinen Spiel das ich programmiert habe. Es handelt sich aber nicht um eine Eigenkreation, sondern der Nachprogrammierung eines Spieles das es schon sehr lange Zeit gibt - seit 1984. Noch heute erscheinen neue Versionen davon und es ist bei vielen Altersklassen noch immer ein beliebter Pausenkiller. Die meisten kennen es vermutlich von Nintendo-Konsolen, andere spielen es mittlerweise auf ihren Handys.
Es handelt sich um TETRIS!







Dieses Spiel wird gerne geklont und nachgeahmt und das nicht zuletzt weil es so "simpel" ist. Die Programmierung hingegen, ist vielleicht nicht so trivial, wie man denken mag... je nachdem wie man es umsetzt.
Ich möchte hier meine Version, welche ich mit dem GameMaker: Studio (in der Version 1.4.1657) erstellt habe teilen und ein wenig dazu erklären.

Download Tetris (.zip Datei 867KB)


In diesem Archiv findet ihr das komplette Projekt inklusive Bildern und allem Code.
Insgesamt ist das Spiel nicht unbedingt anfängerfreundlich geschrieben - wir wollen es ja gleich "richtig" lernen, bzw. mal sehen, wie soetwas aussehen kann. Das heißt, der Code ist teilweise stark optimiert und es wurde kein unnötiges Drag'n'Drop verwendet. Trotzdem habe ich die Skripte übersichtlich strukturiert und umfangreich kommentiert (allerdings auf Englisch).

Im Folgenden möchte ich genauer auf die Einzelteile des Spiels eingehen und minimal erläutern.

Die Räume:

Damit ein Spiel gestartet werden kann, muss mindestens ein Raum existieren. In Tetris haben wir drei Räume:
room_intro
room_title
room_game

Relevant ist nur der room_game, die anderen sind nur schon mal vorbereitet und reichen direkt durch zum jeweils nächsten Raum.


Die Objekte:

obj_all Persistentes (allgegenwärtiges Objekt), welches sich um alles kümmern soll, das immer und in jedem Raum passieren kann.
obj_intro Ein Objekt das sich um ein Intro ganz zu Beginn des Spiels kümmern wird.
obj_title Dieses Objekt soll sich um den Titelbildschirm kümmern. Von dort aus sollen z.B. verschiedene Spiel-Modi gestartet werden können.
obj_tetris_controller Der Kontroller soll sich um das in-game Spielgeschehen kümmern. Er ist das Herzstück des Spiels.
obj_tetris_stone Dies verkörpert einen Tetrisstein einer beliebigen Form.
obj_tetris_back Hilfsobjekt zum Zeichnen eines Hintergrundes.

Die Skripte:

Dies sind nur fünf von zehn Skripten, die in dem Spiel Verwendung finden. Für die Restlichen könnt ihr in das angehängte Archiv schauen.

Wenn ein neuer Tetris-Stein erstellt wird, wird ihm eine zufällige Form übergeben. Folgendes Skript legt für eine beliebige der möglichen Formen ein 2D-Array (eine Matrix) an, welches bestimmt, welche Stein-Teile des maximal 4x4 großen Steines gesetzt sind und welche nicht.
 ↓ tetris_set_stone_parts(form) ↓

Die folgenden beiden Skripte werden für den aktuell fallenden Stein aufgerufen, wenn man die Taste für eine Rechts- bzw. Linksdrehung drückt. Sie ordnen die gesetzten Tetris-Teile der oben genannten Matrix so um, dass der gesamte Stein um 90° gedreht wird.
 ↓ tetris_stone_turn_right() ↓

 ↓ tetris_stone_turn_left() ↓

Nachdem ein Stein bewegt wurde, kann mit dem nächsten Skript geprüft werden, ob er mit einem anderen Stein kollidiert. Dabei werden alle anderen Steine betrachtet und zunächst geprüft, ob sich die Bereiche der maximal möglichen Größe von 4x4 Stein-Teilen überlagern. Erst wenn das der Fall ist, werden auch die einzelnen Stein-Teile geprüft. Dieses Vorgehen ist sehr effizient und bei heutiger Rechenleistung nicht nötig... man könnte dies auch sehr viel einfacher umsetzen. Aber wie gesagt - dies soll zeigen wie man es "richtig" macht. ;)
 ↓ tetris_check_collision() ↓

Wenn ein fallender Stein schließlich aufgeschlagen ist, also nach einer Bewegung kollidiert ist, kann mit diesem Skript geprüft werden, ob Zeilen vollständig ausgefüllt sind und somit also aufgelöst werden können.
 ↓ tetris_check_for_clearing(clear_y1, clear_y2) ↓



Das Zusammenspielen der Einzelteile:

So, jetzt habt ihr die wichtigsten Bausteine des Spiels kennengelernt, doch wie hängen diese zusammen? Auch dies möchte ich nur minimalistisch ansprechen:
Der Raum room_game bekommt das Objekt obj_tetris_controller im Raum-Editor zugewiesen.
Wenn das Spiel nun gestartet wurde und man den Raum erreicht hat, wird sich dieser Kontroller um alles kümmern. Er erstellt z.B. auch eine Instanz des obj_tetris_back Objektes, welches sich um den Hintergrund kümmern soll.
Der Kontroller erstellt nun eine obj_tetris_stone Instanz am oberen Bildschirmrand. Immer nach einer bestimmten Zeit, welche im Create-Event des Controllers auf eine halbe Sekunde, bzw. 500000 Mikrosekunden festgelegt wurde (fall_time = 500000), wird der aktuelle Stein ein Feld nach unten bewegt. Diese Bewegung findet im Step-Event des Kontrollers statt.
Was in diesem Event ebenfalls noch passiert, ist die Überprüfung auf verschiedene Tastendrücke, wie etwa den Pfeiltasten oder WASD, zum Steuern des fallenden Steines. Je nachdem, was gedrückt wird, wird der Stein nach links, rechts oder unten verschoben, bzw. mit Hilfe der obigen Skripte gedreht. Nach einer jeden solchen Aktion wird erneut auf Kollision geprüft und die Aktion ggf. rückgängig gemacht, denn wir wollen ja nicht dass Steine sich überlagern.
Wenn ein Stein unten aufschlägt, also eine gewisse Höhe auf dem Spielfeld erreicht hat, oder mit einem Stein unter sich kollidiert, dann wird seine Bewegung gestoppt. Nach diesem Stopp wird via tetris_check_for_clearing auf auflösbare Zeilen geprüft und danach ein neuer Stein am oberen Bildschirmrand generiert. Wurden allerdings voll ausgefüllte Zeilen gefunden, so werden diese entfernt. Dieser Vorgang ist vermutlich der komplizierteste in diesem Programm, da hierfür die Matrizen der Steine angepasst werden müssen und evtl. sogar ein Stein in mehrere Steine gespalten werden muss, weil vielleicht nur seine Mitte aufgelöst wurde...
Wenn ein neuer Stein "eingeworfen" wird, muss geprüft werden, ob er dafür auch genügend Platz hat. Wenn bereits hier eine Kollision stattfindet, ist das Spielfeld voll und das Spiel somit vorbei.



Und so sieht das Endergebnis aus. Dabei bleibt anzumerken, dass der Hintergrund bei einer Google-Suche gefunden wurde und auch die Schriftart nicht von mir ist. Alles andere darf gerne frei verwendet werden (gerne natürlich auch mit Credits an BadToxic ;) ). Aber auch Fehler sind in dieser Version noch enthalten - der Finder darf sie gerne behalten...

Ich weiß, dieses Tutorial ist nicht unbedingt für Einsteiger geeignet, aber man kann damit doch ganz schön sehen, wie der GameMaker funktioniert oder davon lernen wenn man schon dafür bereit ist. ^^
Auch hätte ich noch sehr viel zeigen und erklären können, doch leider fehlt mir dazu die Zeit. Doch wenn ihr Fragen habt, nutzt gerne die Kommentarfunktion dieses Blogs - ich werde versuchen zu helfen. :)

Und an dieser Stelle verrate ich noch, dass ich auch an dem Spiel weiter mache und versuche etwas schönes auf die Beine zu stellen. ;)

Montag, 26. Oktober 2015

GameMaker - Introduction

As discussed in my last post, I have chosen GameMaker: Studio as my development environment for game programming.
Now I would like to provide an easy entry for beginners and other interested parties to this IDE (Integrated Development Environment) by listing a few sources of information and tips and explaining the basics.

Official GameMaker: Studio site

Communities:

Documentation:

Resources:

Of course, there are countless other sources of information, but the best will be to use Google. ;)

The various versions of GameMaker: Studio
and Supported Platforms

Here we see the different versions of GameMaker: Studio and the various modules for additional platform support. This table I have simply taken over from the official GameMaker page.
[http://www.yoyogames.com/studio, 09/28/2015]
FeatureStandardProfessionalMaster Collection
PriceFree $149.99$799.99
Registration Required
Made with GameMaker Splash Screen in game
Unlimited resources
Texture Management
Multiple Configurations
Team Features
Developer Services Portal (DSP)
Mobile Testing (Android)
GameMaker: Player Export
Windows Desktop Module
Windows Desktop Module + YoYo Compiler + Export
Windows App Module + YoYo Compiler + Export
Mac OS X Module + Export
Ubuntu Linux Module + Export
HTML5 Module + Export
+$199.99
Android Module + YoYo Compiler + Export – x86, ARM, MIPS
+$299.99
iOS Module + YoYo Compiler + Export
+$299.99
Windows Phone 8 Module + YoYo Compiler + Export
+$299.99
Tizen Module + Export
+$199.99
Xbox® One Module + YoYo Compiler + Export
+$299.99
PlayStation® 4 Module + YoYo Compiler + Export
+$299.99
PlayStation® Vita Module + YoYo Compiler + Export
+$299.99
PlayStation® 3 Module + YoYo Compiler + Export
+$299.99
Includes all current & future modules in version 1.x


Basics of using GameMaker: Studio























Here we see the GUI (graphical user interface) of Game Maker IDE. On the left is a column with all resource types that can be used. These include:
  • Sprites (images that can be drawn)
  • Sounds (audio files for sound effects and background music)
  • Backgrounds (graphics for backgrounds)
  • Paths (predefined movements)
  • Scripts (code scripts: corresponds methods / functions)
  • Fonts
  • Timelines (predefined timings)
  • Objects (objects from which instances can be created)
  • Rooms (rooms / levels / maps)
  • Included Files (files integrated into the game)
  • Extensions (extensions for several platforms: JAR, DLL, ...)
  • Macros (constants and snippets)
  • Global Game Settings (settings for all platforms)
And that you may even want to see now how to tinker a first small program I wrote a little guide below, before I explain how the whole as such plays together:

How does it start?These instructions have been starting from GameMaker: Studio is written in latest version.

  1. At the very first, when a new project is created, a room is required.
    -> Right click on the Rooms folder - Create Room.

    (Now the "game" could already be started, but we would only get a blank window.)
  2. We need to create an object with which something should be done.
    -> Right click on the Objects folder - Create Object.

    -> Let's call it obj_hello.
  3. Now we open (if not already open) the newly created room by double-clicking on its name, jump into the Objects tab, and click right into the room to place the object obj_hello.
  4. In the created object (double-click on obj_hello in resource tree, if not already open) we create a new event:-> Add Event - Draw - Draw
  5. Here we use drag'n'drop to move the tile with the big A (Draw Text) from the right (in the draw tab) into the Actions list.
  6. We open this newly created command Draw Text by double click (also opens on its own after the pull-in) and write "Hello World" in the text field "text:" and click OK.
  7. With one click on the green arrow in the top menu (Run the game) of the IDE, we now start our "game" and see - a Hello World Program is "written".

What happens next?


Now you should have a first impression of how the GameMaker is constructed and works roughly:

  • You can drag objects into an editor and arrange as desired.
  • These objects function event oriented. For example, you can respond to:"Instance created," "instance clicked", "instance deleted", "instance1 collides with instance2" ...
  • And to these events you can drag instructions into, which will be triggered in turn, or only under certain conditions. It is also possible to drag a "piece of paper" and to write everything yourself (me as an experienced programmer wouldn't do it the other way).
Of course, there are countless ways that I have not indicated at all. If you feel like you want more, you can look for tutorials in the mentioned communities, on YouTube, or in other sources, or simply experiment yourself.
GameMaker itself also provides a small selection of tutorials and demos directly.

Important tip: If you are still inexperienced, you should definitely start with a project that is as small as possible! Even the idea to start a complex game, such as an RPG, keep it short and expand it later, probably suggests the wrong way.
Your way of programming and implementing things will constantly change and improve. You will eventually notice how inefficient or opaque your old code is and would like to do everything from scratch... It is extremely demotivating if you start something, but never brings to an end...


In my next post I want to share a little game with source code with youso you can look at everything in peace and understand it. It is a short held replica of a very old but still often played game that everyone knows. ;)
The source code is well commented in English, but not necessarily addressed to beginners. But so you have the opportunity to see how something can be done the "professional" way

GameMaker - Einführung

Wie in meinem letzten Posts erläutert, habe ich mich für GameMaker: Studio als meine Entwicklungsumgebung für die Spieleprogrammierung entschieden.
Nun möchte ich Anfängern und Interessenten einen Einstieg für diese IDE (Integrierte Entwicklungsumgebung) erleichtern, indem ich ein paar Quellen für Informationen und Tipps aufliste und die Grundlagen ein wenig erkläre.

Offizielle GameMaker: Studio Seite

Communities:

Dokumentation:

Ressourcen:

Natürlich gibt es noch unzählige weitere Informationsquellen, aber die beste bleibt schließlich doch Google. ;)

Die verschiedenen Versionen von GameMaker: Studio
und unterstützte Plattformen

Hier sehen wir die verschiedenen Varianten von GameMaker: Studio und den verschiedenen Modulen für zusätzliche Plattformunterstützungen. Diese Tabelle habe ich schlicht von der offiziellen GameMaker Seite übernommen.
[http://www.yoyogames.com/studio, 28.09.2015]
Feature Standard Professional Master Collection
Price Free $149.99 $799.99
Registration Required
Made with GameMaker Splash Screen in game
Unlimited resources
Texture Management
Multiple Configurations
Team Features
Developer Services Portal (DSP)
Mobile Testing (Android)
GameMaker: Player Export
Windows Desktop Module
Windows Desktop Module + YoYo Compiler + Export
Windows App Module + YoYo Compiler + Export
Mac OS X Module + Export
Ubuntu Linux Module + Export
HTML5 Module + Export
+$199.99
Android Module + YoYo Compiler + Export – x86, ARM, MIPS
+$299.99
iOS Module + YoYo Compiler + Export
+$299.99
Windows Phone 8 Module + YoYo Compiler + Export
+$299.99
Tizen Module + Export
+$199.99
Xbox® One Module + YoYo Compiler + Export
+$299.99
PlayStation® 4 Module + YoYo Compiler + Export
+$299.99
PlayStation® Vita Module + YoYo Compiler + Export
+$299.99
PlayStation® 3 Module + YoYo Compiler + Export
+$299.99
Includes all current & future modules in version 1.x


Grundlagen zur Verwendung von GameMaker: Studio























Hier sehen wir die GUI (grafische Benutzerschnittstelle) der GameMaker IDE. Links zu sehen ist eine Spalte mit allen Ressourcen Typen, die verwendet werden können. Dazu zählen:
  • Sprites (Bilder, die gezeichnet werden können)
  • Sounds (Audio-Dateien für Soundeffekte und Hintergrundmusik)
  • Backgrounds (Grafiken für Hintergründe)
  • Paths (Vordefinierte Bewegungsabläufe)
  • Scripts (Code-Skripte: Entsprechen Methoden / Funktionen)
  • Fonts (Schriftarten)
  • Time Lines (Vordefinierte Zeitabläufe)
  • Objects (Objekte, von denen Instanzen erzeugt werden können)
  • Rooms (Räume / Level / Maps)
  • Included Files (In das Spiel eingebundene Dateien)
  • Extensions (Erweiterungen für verschiedene Plattformen: JAR, DLL, ...)
  • Macros (Konstanten und Codefragmente)
  • Global Game Settings (Einstellungen für alle Plattformen)
Und damit ihr nun mal seht, wie man ein erstes kleines Programm bastelt, habe ich im Folgenden eine kleine Anleitung verfasst, noch bevor ich überhaupt erkläre, wie das ganze so zusammenspielt:

Wie geht es los?
Diese Anleitung wurde ausgehend von GameMaker: Studio in der aktuellen Version geschrieben.

  1. Als allererstes, wenn ein neues Projekt angelegt wurde, wird ein Room benötigt.
    -> Rechtsklick auf den Rooms-Ordner - Create Room.
        (Jetzt könnte das "Spiel" bereits gestartet werden, doch wir bekämen nur ein leeres Fenster.)
  2. Es muss ein Objekt erstellt werden, mit dem etwas geschehen soll.
    -> Rechtsklick auf den Objects-Ordner - Create Object.
    -> Nennen wir es doch obj_hello.
  3. Nun öffnen wir (falls nicht bereits offen) den neu erstellten Raum per Doppelklick auf seinen Namen, springen in den Reiter Objects und klicken rechts in den Raum, um das Objekt obj_hello zu platzieren.
  4. Schließlich legen wir in dem angelegten Objekt (Doppelklick auf obj_hello im Ressourcen-Baum, falls nicht bereits offen) einen neuen Event an:
    -> Add Event - Draw - Draw
  5. Hier ziehen wir nun via Drag'n'Drop von rechts (unter dem Reiter draw) die Kachel mit dem großen A (Draw Text) in die Actions-Liste.
  6. Wir öffnen diesen neu angelegten Draw Text Befehl mit Doppelklick (öffnet sich auch von alleine nach dem Hineinziehen) und schreiben "Hello World" in das Textfeld "text:" und klicken auf OK.
  7. Mit einem Klick auf den grünen Pfeil oben im Menü (Run the game) der IDE, starten wir nun unser "Spiel" und siehe da - ein Hello World Programm ist "geschrieben".

Wie geht es weiter?

Jetzt solltet ihr einen ersten Eindruck davon haben, wie der GameMaker aufgebaut ist und grob funktioniert:
  • Ihr könnt Objekte in einen Editor ziehen und beliebig anordnen.
  • Diese Objekte funktionieren Event-orientiert. Z.B. könnt ihr reagieren auf:
    "Instanz erstellt", "Instanz angeklickt", "Instanz gelöscht", "Instanz1 kollidiert mit Instanz2"...
  • Und in diese Events könnt ihr wiederum Anweisungen hinein ziehen, die der Reihe nach, oder auch nur unter bestimmten Bedingungen, ablaufen. Es ist auch möglich ein "Blatt Papier" hineinzuziehen und alles selbst auszuprogrammieren (ich würde es als erfahrener Programmierer nicht anders machen).
Natürlich gibt es unzählige Möglichkeiten die ich nicht im geringsten angedeutet habe. Wenn ihr Lust auf mehr bekommen habt, könnt ihr euch in den genannten Communities, auf YouTube, oder auch aus anderen Quellen, Tutorials anschauen oder einfach selbst etwas rumexperimentieren.
GameMaker selbst liefert ebenfalls eine kleine Auswahl an Tutorials und Demos direkt mit.

Wichtiger Tipp: Wer noch unerfahren ist, sollte unbedingt mit einem Projekt starten, dass so klein wie möglich ist! Auch der Gedanke, man könne ein komplexes Spiel, wie z.B. ein RPG beginnen, kurz halten und später erweitern, schlägt wahrscheinlich den falschen Weg ein.
Eure Art und Weise zu Programmieren und Dinge umzusetzen wird sich stetig wandeln und verbessern. Ihr werdet irgendwann merken wie ineffizient oder undurchsichtig euer alter Code ist und würdet am liebsten alles neu machen... Außerdem ist es extrem demotivierend, wenn man etwas anfängt, aber nie zu Ende bringt...


In meinem nächsten Post möchte ich ein kleines Spiel samt Quellcode mit euch teilen, mit dem ihr euch alles in Ruhe anschauen und nachvollziehen könnt. Es handelt sich um einen kurz gehaltenen Nachbau eines sehr alten aber auch heute noch gespielten Spiels das jeder kennt. ;)
Der Quellcode ist gut kommentiert (allerdings auf Englisch), aber nicht unbedingt an Anfänger gerichtet. Doch so hat man mal die Gelegenheit zu sehen, wie alles etwas "professioneller" angegangen werden kann.