Robot War Engine

Robot War Engine is an open-source real-time strategy game engine that supports Total Annihilation data and mods. Read more on our About page or view the project on Github.

Development Status

RWE is currently incomplete, read the blog posts to find out about the latest progress.

With TA data files, the Skirmish menu path works and you can load into the game, walk your commander around and fire your laser at other commanders until you both explode. You can also do this to other players on the internet, using the included launcher application to host or join a multiplayer game room. Work is currently focused on implementing the in-game UI.

Latest Posts

Progress Update 2019-10-06

Hi all. It’s been a very long time since the last update, so here’s a new one for you all.

Despite the lack of update posts, I’ve still been working on things on and off, so a lot has happened since last time. Here’s a summary of the major improvements:

  • Metal extractors work now
  • Multiple units can be selected using bandbox selection
  • RWE can now detect when a network game has desynced
  • Launcher now works on Linux
  • Launcher will use IPv6 when available (can more reliably connect to other players)
  • Launcher supports the concept of “mods” that can be turned on and off and ordered
  • Launcher offers to set up a “TA” mod for you if it is not already present

Let’s go through these in more detail:

Metal Extractors

RWE understands the metal value of terrain and how metal patches contribute to that. Metal extractors yield the correct amount of metal wherever they are built.

2019-10-06-progress-1-mex

Bandbox selection:

Not much to say about this. Here’s the gif.

2019-10-06-progress-2-bandbox

Desync Detection

When you play a network game of RWE, the state of the world on each person’s computer needs to always match the rest of the players. To check this, RWE implements a very primitive, incomplete checksum of game state. Network players swap these checksums during gameplay, and if two players’ checksums don’t match at any point then the game is considered desynced, and stops.

This is mainly a bug-hunting tool and ideally you shouldn’t see this, as a desync means you can no longer continue the game. Unfortunately you probably will see it as desync bugs are notorious to track down, but having the means to detect when they occur is the first step.

Launcher Linux Support

The launcher is already built on top of electron which is cross-platform, however it previously had some Windows-specific behaviour for e.g. launching RWE. I’ve now considered Linux here so it’s possible to use the launcher on Linux. This will be more interesting once RWE gets Linux packages.

Launcher IPv6 Support

IPv6 is the “new” internet protocol that primarily fixes the global IP address shortage. If all players in a network game support it, the launcher will start the game over IPv6.

IPv6 is good because it’s easier to connect to other players – you don’t have to worry about NAT or port forwarding – so this should mean that network games “just work” a reasonable percentage of the time.

I actually implemented this because I found that I couldn’t start a network game between two machines on my own LAN using the launcher, as my current ISP’s router doesn’t support NAT loopback, which I used to rely on.

Launcher Mod Support

One thing that has always been a problem for TA is the lack of infrastructure surrounding mods. Players find it difficult to install and manage mods, make sure they have the right version, etc. It’s particularly important for RWE because players need to have the same data, or risk causing desyncs in the simulation.

It’s also tough for modders, because there’s no easy way of e.g. overriding the contents of rev31.gp3, so modders have to come up with their own mechanism (e.g. exe hack) for achieving this.

The launcher now has a “mod” as a first-class concept. A mod is essentially a folder full of data files, plus a file called “rwe_mod.json” that contains a little bit of metadata which describes the mod.

The launcher lets you pick mods for single player, and in multiplayer the host of the room gets to pick the mods for that particular game.

Launch TA Mod Auto-Setup

When the launcher starts it will check to see if you have a “TA” mod already. If you don’t, it will offer to create one for you. The created mod currently contains TA + CC + 3.1 patch.

It creates the mod by finding existing TA files on your system and copying them into place. It will initially try to search common install TA install locations (disc, Steam and GOG installs) for the files it needs. If it can’t find TA automatically, it will ask you to tell it which folder to look at.

2019-10-06-progress-3-mod-setup

Note that the mods feature is still very new and everything is subject to change as I discover problems that need to be solved. Documentation about how it works, how to write RWE-compatible mods, and how to install RWE-compatible mods, will appear once more of the details have been worked out.

What’s Next

Work to detect and remove network desync bugs from the engine is still ongoing, and I expect this to be a major focus for some time so that we can get to the point where a full network game is playable without technical issues.

I also expect to continue polishing basic mod support in the launcher. This work will probably stop at TA + “straightfoward” mods (i.e. no big mods that use exotic exe hacks, like esc/mayhem/zero) so that I can return to working on engine features.

Progress Update 2019-05-26

It’s been a long time since the last update, but that doesn’t mean there hasn’t been any progress! Since last time, RWE has learned lots of new things:

  1. How to display information about the currently hovered-over unit in the bottom bar, including resource production and consumption info
  2. That factories have a build queue and that you can queue up units to be built
  3. That factories have a yard map, that the yard that can be open or closed, and that sometimes parts of the yard can be driven over by other units
  4. How to activate and deactivate factories to start and stop building
  5. That units being built by a factory are attached to the factory at a specific point

The culmination of all these bits of progress is that, for the first time, it is possible to use factories to construct mobile units in RWE!

The next goal is to make metal extractors work. Once commanders are able to secure a reliable supply of metal, they will be well on their way to expanding across the map.

If you’ve been following progress in the #robot-war-engine channel on Discord, you’ll have seen a few new gifs showing off these new features. Here they are again, showing the bottom bar, build queues, factory activation and finally building.

2019-05-26-progress-1 2019-05-26-progress-2 2019-05-26-progress-3 2019-05-26-progress-4

Progress Update 2019-04-21

Hi all! It’s been a long time since the last update. Sadly real-life things have prevented me from giving the project as much attention as it deserves, but I’ve recently found time to work on RWE again and I’m pleased to present a new progress update once again.

Since last time, RWE has learnt a few new things!

  • To show a red square and disallow building things at invalid locations
  • To read TA font files (FNT), which are used for in-game text
  • To render the top bar, containing the team colour, metal and energy bars
  • That buildings can produce and consume energy, either constantly or when activated
  • That building (nanolathing) drains resources, and pauses if resources are not available

I have spent some time observing how TA does resource calculations and I have come up with a system that appears to work similarly to TA. Here are some interesting observations:

  • TA’s resource counts update only once per second, and this gives rise to the familiar stop/start nanolathing effect when stalled for resources
  • The data you see on the metal and energy bars appears to be for the previous second, so by the time you see it, it is already one second out of date
  • When you run out of a resource you will actually “go into debt” by a small amount, i.e. below 0 metal and energy (though TA will say you have 0)
  • Builders can continue to consume a small amount of energy when stalled for metal, even when no build progress is being made. I have not yet observed this the other way round (consuming metal when stalled for energy)
  • It is possible to slightly overpay on resouces (e.g. 1 metal) due to small rounding errors during building

For today’s gif, here’s a demo of the resource bars working as the commander builds a solar collector. You will notice they update instantly – I have yet to implement the animation/tweening that TA does between states, but it’s on the to-do list.

Next the focus is going to be on rendering the bottom bar, which shows information about the hovered over unit or build button. After that, I will move on to factories.

2019-04-21-progress

See All Posts