===================================
============ Introduction =========
===================================

Timetable is an entry for the TINS 2006 competition

Programming:
Amarillion (amarillion@yahoo.com)

Gfx & ASCII-art:
Max (ogsantin@otb.tudelft.nl)



TINS rules:

* Trains / Railways:
You have to construct railways and let trains run on them in the game.

* Time:
The goal of the game is to create a time-table for trains running between all
cities. That means, if there are 8 cities, you need to fill an 8 x 8 timetable
by making trains run between all cities.

* ASCII-Art
Ascii art can be found in the in-game help and about box

* In-game Help
you can access in-game help by pressing F1 or going to the help->help menu.


===================================
============ Concept   ============
===================================

The gameplay is derived in part from the popular game "transport tycoon".
The main difference is that you transport passengers only and the goal is 
to connect as many cities as possible. You don't finish the game until
each and every one of the cities is connected with all the others.

For more information about how to play I refer to the in-game help.

Ok - this is a speedhack so naturally there are many things that I didn't have
time for.

Firstly, and most importantly, colission detection between trains. In fact,
this is rather trivial to implement, but the problem is that the game
wouldn't be playable with it. I planned to implement traffic lights, that
divide the railways in sections where only one train can be at the time.
Preventing colissions would thus be a matter of placing traffic lights at the
right points, and that would make the game a lot more interesting I think.

Then I'd have liked the ability to save and load the game

Finally, music, sfx, nicer fonts, a custom skin. 
Hills and mountains, bridges, tunnels.

Oh and the program probably leaks more memory than an Internet Explorer Beta, 
so that needs to be fixed too.

===================================
======== Build instructions =======
===================================

windows:

fix mingw32
make

linux:

fix linux
make

(note: untested on linux)

Compilation depends on the latest stable version of allegro (4.2.0), 
Miran Amon's Skinnable GUI (MASkinG) v0.79 and Alfont


===================================
=========== Code Reuse ============
===================================

The MASkinG library is used for the GUI (Graphical User Interface), initialization
and main loop.

The code makes heavy use of STL. Vectors, lists, maps, heaps, you name it,
it is there.

I started by copying the GUI framework (menu bar, empty window) 
from my tilemap editor project, avaiable from http://tegel.sourceforge.net/.
During the course of the project I copied various bits and pieces from this
project when I didn't remember how to do certain GUI bits.

I then proceeded by copying and modifying the Resource manager (resources.cpp
and resources.h) from my last years entry, Xelda. Also the makefile and some
other miscelanneous project files were copied from Xelda.

Some of the dialogs are created dynamically from XML. 
The XML reading part comes from X-G's party pack,
which he published on allegro.cc just before TINS '05

The A* pathway finder that is used by the trains 
is written from scratch in just 3 hours, but I was helped a great deal
by the fact that I had written and optimized an A* implementation
for an RTS just a few weeks ago. I did most of it from memory.

===================================
============ Copyright ============
===================================

   TimeTable is gift-ware. It was created by two people working in 
   cooperation, and is given to you freely as a gift. You may use, modify, 
   redistribute, and generally hack it about in any way you like, and you do 
   not have to give us anything in return. However, if you like this product 
   you are encouraged to thank us by making a return gift to the Allegro 
   community. This could be by writing an add-on package, providing a useful 
   bug report, making an improvement to the library, or perhaps just 
   releasing the sources of your program so that other people can learn from 
   them. If you redistribute parts of this code or make a game using it, it 
   would be nice if you mentioned TimeTable somewhere in the credits, but you 
   are not required to do this. We trust you not to abuse our generosity.

   Disclaimer:

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
   SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
   FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   DEALINGS IN THE SOFTWARE.