/Townly

A CLI city building game

Primary LanguageTypeScriptOtherNOASSERTION

Townly

CLI city building game inspired by TheoTown and Cities: Skylines

Powered by Teng


If you have questions or wanna chat, feel free to join my Discord server



Download:

If you want to download and play this game, please check out the #builds channel on the Townly Discord server.



Why?

Good question. Let me just make up some totally legitimate reasons, hold on...

I challenged myself multiple times to create games in the Command Line Interface.
The goal was for me to be able to play the games on my server via SSH.
This is my biggest challenge yet, a fully fledged city building game that runs in the command line.

You can find my other CLI games here.



The story behind Townly:

Initial vanilla JS version:

Townly was first made in pure Node.js because I couldn't get my Qt Creator to work on my PC for a whole year.
The legacy JS version's code can be found here.


C++ Rewrite:

After 2 months of work I started rewriting it in C++ (with Qt).
The thought behind the rewrite was native compilation to executables, more stability and performance and lower-level access to the system.
The legacy C++ version's code can be found here.


TypeScript Rewrite:

Two months later I quickly burnt out because C++ is fucking difficult (who would've thought).
So after about a month of pause, I decided to go with the best of both worlds and rewrote it again, but in TypeScript.
It offers both the quick and easy coding of JavaScript and the type safety and extensive features of a language like C++.
I also wanted to separate the game and the engine so that I can eventually reuse the engine or publish it separately.
More info on the engine can be found here.



Some helpful resources:





Build Instructions:

If you can't find a compatible version of Townly, you can follow this guide to build Townly:

First, make sure you have Git, Node.js, npm and TypeScript set up and working, then:

  1. Clone the repository
  2. Pull the Teng submodule by running git submodule init and then git submodule update
  3. Install dependencies by running npm i
  4. Run the command npm start to compile and run the code
  • To create an executable, use the command npm run compile-pkg





Made by Sv443 with Teng
♥ Click here to support me ♥