Skip to content

klemola/liikennematto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

liikennematto_itch_cover_wide

Build the roads and the town comes to life

In Liikennematto (Finnish for "traffic mat") the gameplay is simple: you only build the roads. After a short while, lots appear. With the lots come buildings and their residents. The residents drive around the road network you've created and visit other lots.

liikennematto_promo_720p.mp4

Playful design

Liikennematto is inspired by children's traffic mats. The design of the game follows the traffic mat basics: mixed perspective buildings, plenty of color, clear dark outlines.

Liikennematto is meant for players of all ages and abilities. The UI is free of text and everything's quite large and easy to comprehend.

Detailed simulation

Cars move and turn smoothly, avoid collision with each other, follow traffic signals and park on lots. Drivers plan their routes ahead and follow them the best they can - rerouting when necessary.

liikennematto_pathfinding

🕹️ Play Liikennematto on itch.io 🕹️

Features

Simulation

  • a two-lane road network (graph based on the tilemap)
  • a* pathfinding
  • collision prevention
  • signal intersections (traffic lights)
  • yield sign based intersections
  • parking
  • procedural generation of lots, buildings and decorations
  • debug tools
    • spawn cars
    • show road network visualization
    • show car debug layers
    • show lot parking spots and parking lock

Map editor

Draw roads of all kind with the smart editor

  • left click / tap to add a road tile
  • right click / long tap to remove a road tile
  • zoom and pan the map (with touch support)

Read more about the project from Liikennematto dev blog #1: prototyping traffic simulation with Elm

...or skip to: Part #2 | Part #3 | Part #4 | Part #5


Instructions for local development

To run Liikennematto, you need elm 0.19.1, which you can get from NPM or possibly your system's package manager.

Additionally, you need elm-format, elm-test, and elm-review for devtools, which can all be installed from NPM.

Run elm reactor on the project root to start a dev server. You can then navigate to http://127.0.0.1:8000/src/Main.elm to build the game. If you make changes, a full reload of the browser window will re-compile it. If you're on a UNIX-based system, you can use make to run this command and many others. See Makefile for reference on what's possible.

There's one thing, though. I have moved all assets out of the source into a private project that pre-processes and transforms the original assets to work with Liikennematto. As such, if you try to compile Liikennematto, you'll get an error for missing Assets module. If you add a dummy module to fix this, you will not be able to render anything meaningful. Sounds will be missing as well. I intend to eventually offer a free asset package for development, but currently, due to time constraints, I can't. Get in touch if you really want to take Liikennematto for a spin.

Updates

Follow me on Bluesky or Mastodon for updates!

Attribution

Thanks to Kenney for the free game assets used during the development (subset of the "Road Textures" and "Racing Pack" collections).