I've started my game with the most basic things: showing a map of tiles, what will become a village. I took some nice hexagons made with CSS, added a little data structure, and there I was with a pretty map! Next up I added more data to handle creating, and upgrading, buildings. The game is turn based, so I also added a very basic turn logic to upgrade buildings, as well as building levels, and there we were:

Village Builder screen 1, mai 2020

Now what would be a village building game without resources? I have no idea, because I've added resources to mine. The 3 basic ones are food (to feed your soldiers and workers), wood and stone (both to build more buildings). There will be plenty more later, of course, but I'm doing things one at a time. I've added some more data structures, added costs and production for each building type, and made a little interface to choose which building to create. It's slowly starting to look like a game!

Village Builder screen 2, mai 2020

Building is cool, but upgrading is cooler, so I added another panel to look at the details about a building (like its production per turn) and upgrade it to a better level. Upgrading a building increases its production, but costs more as the levels go up. It also takes more turns to get to the construction's completion.

Village Builder screen 3, mai 2020

And that's where I'm at after about 7 hours of work today! So far, using Svelte has been quite smooth. I've had to wrap my head around stores, as that's quite different from redux, but things are progressing steadily.

If you want to take a peak at my code, I'm publishing it regularly on a GitHub repo: adngdb/village-builder. And if you're courageous and want to give the "game" a try, you can do so: Play Village Builder - Day 1 Build.

Tomorrow, I intend to add some challenge to this thing, to make it an actual game. You'll have an army protecting your village, and the demons will attack you regularly. Your army will be composed of soldiers of varying strength (the stronger the more difficult those soldiers will be to recruit, of course) and it will take its toll on your food reserves. So you'll have to feed these brave folks, but also recruit more in order to fight increasingly angry, and thus powerful, demons!

/me spams the "End Turn" button to be tomorrow already.