drake7707 / dwarvenanno

Engine experiment for dwarf fortress / Anno like behaviour

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dwarven anno

Example engine to simulate Anno or Dwarf fortress like behaviour with tiles, "workers" and their behaviour, storage of buildings, etc. Uses discrete event simulation (DES) to queue up events. Because everything is predetermined and in order on a "world time" in the queue, you can do fun stuff like speeding up the simulation or skipping ahead whole chunks of time.

I originally started experimenting with it in my Typescript editor but as a single file it quickly became slow and unwieldy so I broke it up into parts and moved everything to its own file. There's still some remnants to be found from the original structure, like the globals.ts that used to be just global variables.

The simulated annealing portion has nothing to do with the engine, it's just an experiment that I wanted to test out to see what the result would be based on a trivial scoring system.

Demo

Try it out here

Screenshots

Screenshot

Class diagram

Class diagram

Running locally

I used VSCode, which has built in typescript support. To debug it uses a tiny webserver to host the files on localhost.

To run do npm install to restore packages and then npm start to start the webserver

About

Engine experiment for dwarf fortress / Anno like behaviour

License:MIT License


Languages

Language:JavaScript 51.7%Language:TypeScript 41.0%Language:HTML 7.0%Language:CSS 0.3%