Little Railways

Project Description

Little Railways is a hybrid railroad simulator tycoon game, heavily inspired by Railroads Online. In this game you must drive trains over an existing network and deliver goods and passengers from A to B in order to make money to upgrade your engines and rolling stock.

Project Info

Role: Gameplay Programmer/Games Designer/Games Artist

Team Size: 1

Time Frame: Ongoing development

Engine & Language: Unreal with C++

Project Introduction

This project is a passion project of mine, I thoroughly enjoyed the game Railroads Online, and thought it would be an interesting experience to reverse engineer the mechanics of the game just using knowledge of how they worked from my hours of playing it.

It was also an opportunity for me to finally make a C++ project using the Unreal Engine, something I had not previously done. It was a challenging but fun experience to code all the mechanics, but it did give me a greater understanding of the C++ language and Unreal in the process.

This project is still currently in development as I want to turn it into a full fledged game with a fully developed map and art assets, but the core gameplay mechanics are finished to a playable standard and can be demonstrated. There are still a few bugs to fix however.

Highlighted Mechanics

#1 Locomotive Control System

The main part of any train simulator game is the functionality behind how you actually control the train. Similar to Railroads Online, I opted for the first person character to be able to possess an engine upon pressing the F key and looking at it. When possesed a UI control panel pops up, each button and slider on the panel controls a different part of the engine.

You have a reverser slider which controls direction; a regulator slider which has 4 notches and controls the power/speed of the loco; a brake slider which also has 4 notches and allows you to slowly apply more brake pressure. There is also 3 bars showing coal, water and fire levels as well as a button to press to fuel the fire. If either of these 3 bars is empty the engine won't move. In the code for the UI everytime a button or slider is touched, it calls the functionality in the Loco's code to perform the respective task. Overall creating a somewhat realistic control system.

#2 Shop System

The other mechanic I wanted to highlight was the shop system. In the game I wanted the player to make money and level up, then depending on their funds and current level they can buy better locomotives and rolling stock to make them even more money. To do this I took advantage of Unreal's data table system to create a vast table filled with a vareity of info to tell the player what they are going to buy, as well as to tell the game which blueprint actor to spawn.

To tell the game where to place the blueprint actor, like Railroads Online used to have, I have 3 set tracks dedicated for spawning actors on. However if all of these have an item of stock already on them, the game will not spawn the desired item and throw the player a message telling them to clear the road first. This feature did take some time to develop due to having various technical issues with the data table system itself. However now it works smoothly.

Project Reflection

I still have a long way to go with developing this project but even at the current stage I am proud of what I have been able to make and at how far my C++ knowledge has come along since I started the project. I hope it continues to be a great source of learning for me as I develop it.


  • Project Image