Train Game (working title) is a game about trains! Woo! You control a train which you drive around a 3D world picking up cargo, trundle it about, and deliver it for PROFIT; whilst avoiding disasters like falling off the rails, hitting other trains, bad weather, or privatisation. Imagine Elite but with trains instead of space craft. Can’t believe no one’s thought of it before.
It’s going to be more of a game than a train simulator, largely because I know very little about train-mechanics. Ho hum. To be honest, I think this will make it rather more fun.
It’s very much a work-in-progress, but you can download a demo below which has these features:
- An OpenGL-based 3D render. It will happily render large worlds using quad-trees to split up the terrain. It’s not overly optimised, but I get decent frame rate on low-end cards: 30-60 FPS on an Intel GMA 945, 60-120 FPS on an Nvidia G105M – not exactly the most powerful hardware on the market…
- It has a built-in map editor which lets you edit the terrain, paint the track, add stations etc.
- You can drive the train! It accelerates and slows down, moves in reasonably realistic way, and you can control which way it turns on points
- You can try and stop at stations if you like, but there’s no reward :-(
Screen shots
All the models are made in Wings3D.
Downloads
The game is released under the terms of the GPLv3. You can get the source code here:
- TrainGame-0.2.2.tar.gz – Gzip-ed TAR file
It should build fine on Linux – this is where I do most of my development. It has (at least) the following dependencies: OpenGL, GLEW, Boost (>= 1.37), Xerces-C++, CMake, SDL, SDL_image, and FreeType (sorry!).
To build, unzip the source code, and cd into the newly created directory. Now do the following:
$ cmake . $ make
Hopefully all will go well (email me or complain in the comments below if it doesn’t!). Now you can play the game by running:
./bin/TrainGame play coal_mine
(You can substitute figure8
or points
for coal_mine
there.)
To use the editor, run:
./bin/TrainGame edit <map_name_here>
You can edit existing maps as well as create new ones.
Windows users! You are not forgotten! I have successfully compiled and run the game on Windows using Visual Studio 2008, but that was nearly a year ago so it may take a bit of work to get it running again. You’ll still need all the same dependencies as above. Install them and then use the CMake GUI to help it find their library/include directories.
Instructions
Playing the game is fairly straightforward. Use the mouse to move the camera (it’s always directed towards the train). Use the following keys to control it:
- Up and down arrow to speed up and slow down the train.
b
to toggle the brake on and off.- Left or right arrow keys switch nearby points.
- Tab toggles between different views.
When using the editor, click and drag with the right mouse button to scroll the map. The currently selected tool is shown in the drop-down box in the top right. Click and drag with the left mouse button to apply that tool to an area – e.g. connect the endpoints with track, raise the area, delete everything, …
Feedback appreciated!
A very promising game !
I will speak of it in my next rev (20090831) of ‘Le Bottin des Jeux Linux’ (a list of Linux Games).
Very good.
Thanks
August 27, 2009 @ 10:26 pm
i want to play this game
November 18, 2009 @ 1:13 pm
i like it because it looks fun
January 2, 2010 @ 8:27 pm
i like it because it looks good
January 2, 2010 @ 8:30 pm
How to compile the new version under VS2008 (win32)?
If you can put a compiled version of the site under win32.
I would like to see your game, similar to AIT_trains under win32.
Thanks
February 4, 2010 @ 12:06 pm
It’s probably quite difficult to compile the 0.1 version on the website under Windows because of the dependency on FLTK. Newer versions (that I haven’t released yet) don’t have this problem. When I do the next release I’ll include a Windows binary.
If you have CMake you should be able to produce a VS2008 project but it won’t be easy – you’ll have to install a lot of dependent libraries.
February 4, 2010 @ 10:13 pm
Look forward
February 11, 2010 @ 1:12 pm
When the approximate date of the new release?
February 11, 2010 @ 1:15 pm
how do you play this game
February 15, 2010 @ 11:10 pm
> how do you play this game
press q to go left
February 16, 2010 @ 12:39 pm
> how do you play this game
If you’re using Linux try following the instructions above to compile it yourself.
If you’re using Windows then it would be best to wait for the next release.
The game isn’t really in a playable state at the moment – it’s more of a demo.
February 17, 2010 @ 7:57 am
> When the approximate date of the new release?
A few months?
February 17, 2010 @ 7:58 am
When new release?
May 26, 2010 @ 12:23 am
> When new release?
I released 0.2 a month or so ago but forgot to update his page. See this post for more details: http://www.doof.me.uk/2010/04/18/train-game-0-2/
May 29, 2010 @ 4:49 pm
Train Game 0.2.1 works great, thanks
June 13, 2010 @ 4:16 pm
[…] been quite silent about TrainGame recently, but it’s not dead! I have been working on it a little bit – here’s an […]
February 19, 2011 @ 5:13 pm
Very nice game but TrainGame-0.2.1 don’t compiile on FreeBSD
[ 51%] Building CXX object CMakeFiles/TrainGame.dir/src/SkyBox.cpp.o
/usr/bin/c++ -O2 -pipe -I/usr/local/include -DBOOST_FILESYSTEM_VERSION=2 -fno-strict-aliasing -O2 -g -I/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1/include -I/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1/src -I/usr/local/include/SDL -I/usr/local/include -I/usr/local/include/GL -I/usr/local/include/freetype2 -I/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1 -Wall -o CMakeFiles/TrainGame.dir/src/SkyBox.cpp.o -c /tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1/src/SkyBox.cpp
/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1/src/SceneryPicker.cpp: In member function ‘void SceneryPicker::changeActive(const std::string&)’:
/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1/src/SceneryPicker.cpp:140: error: no matching function for call to ‘gui::ILayout::cast(std::basic_string<char, std::char_traits, std::allocator >)’
gmake[2]: *** [CMakeFiles/TrainGame.dir/src/SceneryPicker.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs….
gmake[2]: Leaving directory `/var/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1′
gmake[1]: *** [CMakeFiles/TrainGame.dir/all] Error 2
gmake[1]: Leaving directory `/var/tmp/ports/usr/local/ports/local/work/games/traingame/work/TrainGame-0.2.1′
gmake: *** [all] Error 2
*** Error code 1
or
[ 50%] Building CXX object CMakeFiles/TrainGame.dir/src/SceneryPicker.cpp.o
/tmp/TrainGame-0.2.1/src/SceneryPicker.cpp: In member function ‘void SceneryPicker::changeActive(const std::string&)’:
/tmp/TrainGame-0.2.1/src/SceneryPicker.cpp:140: error: no matching function for call to ‘gui::ILayout::cast(std::basic_string<char, std::char_traits, std::allocator >)’
gmake[2]: *** [CMakeFiles/TrainGame.dir/src/SceneryPicker.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/TrainGame.dir/all] Error 2
gmake: *** [all] Error 2
Please correct this, thanks
May 10, 2012 @ 8:31 pm
I want to play this game too, but i heavnt any plan how to instal.
I am german. i mean i cant read the description so good.
you should make an video about this an “how to instal The traingame” or so.
Nice Holydays :D
October 12, 2012 @ 6:35 pm
Is possible have the source code in a tipical visual studio projects ?? Cmake don’t work ( i don’t know how use it).
January 26, 2014 @ 1:13 pm
I think you can use the cmake GUI to generate a Visual Studio project file. I don’t have a Windows PC or Visual Studio to try on unfortunately!
January 28, 2014 @ 9:59 pm
Hello, This game looks so nice!
I have a question: Are you going to publish it also for windows users?
BCS: this game is worth it !
April 7, 2014 @ 9:55 pm
hi
i wanted to run this on Microsoft visual c++
can you please guide.
April 30, 2015 @ 9:12 pm