Westward dev log #12: World Map and Battles

Over the past few weeks, Westward has seen significant progress on two fronts: creating and accessing the world map on the one hand, and the battle system on the other hand. The latter now introduces and adversarial component to the demo, making it finally fit the definition of a game!

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

World map

The northernmost of the two buildings available in the demo is the Fort. The purpose of this building will be to manage a settlement, by displaying all the important information and providing menus to perform certain tasks. The central element of the Fort interface will be the map of the area surrounding the settlement, as shown below:

This is a first iteration; the final version will probably feature a bigger map, and several menus will surround/overlap it. You can drag this map around to see beyond the area initially displayed. The blue pins represent existing buildings. Clicking somewhere will open the menus allowing you to place new buildings. As of now, creating new buildings works immediately; in the future, it will have the effect of creating a building site, which will eventually become a fully built building after some players have committed to it.

Although the general look of it could be greatly improved, I quite like the result already, and especially the fading-out of the edges of the map. This was accomplished by superimposing a bitmap mask on top of the map corresponding to a black-to-transparent gradient.

The world map itself was created by displaying the whole game world (that is, all the chunks that compose it) at a certain zoom level and exporting the picture. It’s a very crude approach at the moment (especially to have the clients load the whole map if they can only see a bit of it), but it does the trick. It took several minutes to load, since the world is quite big, and before a recent fix in Pixi.js (which I use for behind-the-scene tools), it would consume too much memory and crash. If/when the world becomes bigger, these issues will only be compounded, so I’ll probably need to make smaller maps of areas of the game, and stitch them together in-game if need be.

Buildings, and the Fort in particular, will be an important component of the game, so expect to see more about it in future dev logs!


I’m glad to present the first iteration of the turn-based battle system. The principle is simple: if you click on an animal, a fight will start. A grid of colored cells will appear around you and your opponent. When the yellow arrow is above you character, it’s your turn, and you have 5 seconds to take an action (a countdown is indicated in the bottom-right corner of the screen). You can do any of the following:

  • Click on a green cell to move there (clicking on red cells or outside the grid does nothing)
  • Equip something or use an item from your inventory
  • Click on an enemy. If you are in a cell next to it, your character will perform a melee attack. If you are further away, but have a ranged weapon equipped (as well as the corresponding ammo), then your character will perform a ranged attack. Otherwise, nothing happens.

Each of these actions will end your turn and start the enemy turn.

Note that all battles are visible to the other players in the area in real-time. For now, only 1-vs-1 battles are possible, but the system is intended for multiplayer battles in which any other player (or enemy!) can jump in, allowing for team fights and cooperation. This should be particularly interesting against group of more elaborate enemies attacking the settlements.

Moreover, the grid-like system, designed to constrain movement, is intended for location-based mechanics, such as leveraging distance with ranged weapons, using bombs that affect the fighters located on multiple cells (including allies), or setting traps in the way.

The introduction of the battle system finally makes other systems relevant. The stats of your character have a meaning and a direct impact in battle, and the items that modify these stats become useful. Try fighting with or without a sword for example, or craft yourself a red potion to replenish your health. It’s basic, but it’s a small game already!

What’s next

Now that buildings are a thing, and that you can shop, craft, use items and fight, it opens the door to many possibilities. In the coming weeks, I’ll keep working on the battle system to allow multiplayer fights, which will be an important (and hopefully fun) feature. After that, we’ll see, but I’m likely to start working on the aspects of the “economic loop” of gathering loot and resources and converting them in new equipment.

If you share my enthusiasm about the progresses of Westward and would like to contribute, consider having a look at my new 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!