A web game inspired by Dinosaur Polo Club's Mini Motorways, created for Js13kGames 2023
- the total size of the zipped index.html is under 13,312B!
- Touch or left click and drag to build paths between your yurts and farms to keep the animals happy!
- You get points for your total number of settlers (2x your number of yurts), plus a point for each animal.
- Fullscreen is highly recommended for mobile.
- All the graphics are SVG-based, with CSS transitions and transforms. There is no canvas, and there are no asset files. It's HTML-CSS-SVG-in-JS all the way down.
- JavaScript packer Roadroller by Kang Seonghoon.
- Kontra.js game engine by Steven Lambert.
- Karplus-Strong via the Web Audio API, from xem's MiniSynth, based on Keith Horwood's audiosynth.
- JSZip and advzip-bin for zip compression.
- Vite and Terser with a messy, unstable, project-specific custom plugin for maximum minification.
(Click to show - minor spoilers)
- You can build paths while the game is paused, if you need a little more time to think.
- You can delete the path that comes with the starting farm!
- Paths cannot be build over water, so to connect a fish farm you have to join a path to the end of the stepping stones.
- Distance is the most important factor when determining how well a yurt can cope with a farms demands.
- You don't have to connect every yurt!
- You can send your settlers through other farms. If the farm is of a different type, it won't interfere at all, however if it's a farm of the same type, the settlers are more likely to head there than travel through it to the further away one.
- Your settlers may get stuck at farms if they have no way home. You'll have to re-build a path for them to get back to their own yurt before they can help out again.
- Diagonal paths use fewer path tiles to go a further distance, but because they are further, it will take settlers longer to get to their destinations for the same number of grid-cells traversed.
- Farms have a "needyness" based on the animal type, times the number of animals minus 1, times a subtle difficulty-over-time curve. For example a farm with two adult oxen and one baby, will have 2 × [ox demand number] × [difficulty scaling].
- Farms issue capacity is based of the total number of adults, times 3. For example a farm with two adult oxen and one baby, will have 2 (adults) × 3 = 6 capacity, which is represented by the two starting (!) and then 4 segments in the pop-up issue indicator. This means you have to deal with farms with only two adults quickly!
-
Clone this repository
git clone git@github.com:burntcustard/tiny-yurts.git
-
Install dependencies
npm install
-
Run dev command to start up hot-reloading with Vite at localhost:3000 (you will need to open that URL yourself!)
npm run dev
-
Compile the output index.html file and game.zip files (this will take a minute or two!)
npm run build
-
See package.json for other scripts