This is the repo for the demos in this article on writing a turn-based game loop for a roguelike.
The code here is written in Dart. To get it up and running locally, you'll need to have the Dart SDK installed.
Once you have Dart installed and its bin/
directory on your PATH
, then:
- Clone this repo.
- From the root directory of it, run:
$ pub serve
- In your browser, open:
http://localhost:8080
Pub will automatically compile the Dart code to JavaScript if you hit that URL with a production browser. Leave pub serve running, and whenever you change the Dart code, it will notice that and recompile the JS on the fly.
You can also run the Dart code natively using Dartium, which comes with the Dart SDK. Just hit the same URL and it is smart enough to serve the raw Dart code instead of the compiled JS.