Westward dev log #23: world making 2.0

It has been a while since the last Westward dev log, but it doesn’t mean I have stopped the development. In this post I discuss the reason for the delay, what are the changes in the new update, and what is the plan until next time.

Professional commitments

Aside from game development, I’m also extremely interested in artificial intelligence, and machine learning in particular. This also happens to be the field in which I have been earning a living since I finished my studies, and it’ll likely remain so for the foreseeable future. In that context, I have started a great new job as a machine learning engineer and consultant. It goes without saying that it takes its toll in terms of time and energy, hence the longer than usual delay since the last dev log.

Rest assured however that my commitment to Westward remains unchallenged, and I’ll very much keep developing it. The game is really starting to get close to something interesting, I have no intention to give it up now. The timetable may be a bit extended, but that’s all. 😉

Hand-drawn scenery

Click here to play the demo and discover the changes discussed in this post.

If you log in to the game, the single change you may notice is… the grass. The grass is different; much prettier to the eye in my opinion. The trees look the same, but they are actually different to: the pixel art versions have been ditched in favor of hand-drawn ones. And, there is also a new kind of tree, just for the sake of variety.

Eventually, all the assets of the game will be hand-drawn in a similar fashion, which should make it much prettier. For now, it’s only the decor, but the rest will follow. New decor elements have also been created, but they are not yet visible in the game; coming soon!

World Making 2.0

In addition to this visual change, under the hood I have completely rewritten the way the maps are displayed. They are now lighter and faster to display. Not only that, but I have also completely remade my world making scripts I was telling you about in the first few dev logs to streamline the world creation process. All of this in order to be able to introduce nice cool features in the future.

Previously, the world making pipeline was as follows:
* Draw the map of the world in some image editing software, use that same software to compute a SVG path of the world, export it;
* Have a script read and parse the SVG path to create the shape of the world;
* Have other scripts take over to create lakes, forests, etc.

Moreover, the algorithms I had come up with had some shortcomings and I had to do a lot of manual fixing, which I quickly grew tired of. Many of the glitches that some of you reported with the “bug” button were related to that.

Now after a few weeks of tinkering, I don’t need to manually export an SVG. As soon as the world map is drawn, one single script can compute the contours of the world and create it. Moreover, the newer versions of the algorithms involved are simply better and produce less glitches.

This was quite interesting to work on, as it required to solve the following problems:
– How to programmatically compute the contour of irregular shapes in a PNG image
– How to decompose a contour into a series of straight lines
– How to apply these straight lines to create coastlines
– How to find where lakes should be located, and how to fill them with water tiles
– How to create clusters of trees (forests) based on the locations of green pixels in the initial template image

The input of the pipeline is what I call a blueprint, a PNG image representing land masses and forests, and the output is several thousand JSON files corresponding to the chunks of the game world. Pretty neat!

Other improvements

In this age of “devops” and speaking of pipelines, I also significantly improved my deployment pipeline. Now, a single git repository manages all the code base, both for the game itself and the related tools. The master branch is replicated on Heroku while the other branches serve for development. I’ve started adding unit tests, and logging events for most actions that you guys do in the game, in order to get an idea of what is used and how often.

All of the above brings little visible changes, but it does have a lot of value as it will really pave the way for future improvements. And it was super cool to work on, too! 🙂

Organic settlements

I was talking about organic settlements in the last dev log, and I have been really happy to see that arise, somehow, in the game. Even though most buildings are pretty much useless at the moment, several of you have built a few(for a total of 37 building across two regions). Moreover, these buildings have started forming natural clusters, some near the starting zones, some further away, which is what I was envisioning. This trend should become even more prevalent once the buildings start to fill actual needs.

What’s next

There are still quite a few things that used to work or that should be working now, which are not. For example:
– The minimap doesn’t properly reflect the new world, and will need to be updated (and actually created in a different way, too). Moreover, it’s time that the minimap starts showing buildings again.
– Trees and lakes are nice, but there are still a lot of big boring empty spaces in the game. Working on it.
– Shops are workshops are essentially unusable at the moment because of their interfaces; this is one of the next things I’m going to work on. Once this is done, this should be a big plus to the game.
– For now it’ll be possible to build lumber camps anywhere, the restriction of building them near forests has been temporarily lifted.
– New interactive decor elements will appear in one of the next updates. They will contribute to the diversity of the environment and introduce the very first iterations of ecosystem mechanics.
– The enemy civilization is still completely absent, but it’ll definitely be back at some point.

See you for the next update!

If you’d like to support Westward, consider having a look at my donation page. In particular, take a minute to have a look at my Patreon page, where you can find a listing of rewards for various levels of recurring contributions!

Jerome Renaux

I'm an independent game developer, working mainly on browser-based multiplayer online game (HTML5 & Javascript). I love to discuss about all aspects of game development so don't hesitate to get in touch!

More Posts

Follow Me:

Jerome Renaux

I'm an independent game developer, working mainly on browser-based multiplayer online game (HTML5 & Javascript). I love to discuss about all aspects of game development so don't hesitate to get in touch!