1. Invasion Machine
  2. News

Invasion Machine News

Testing a new pathfinding system in an experimental build of the game

I'm testing a new pathfinding system

If you switch your game to the testing branch (you can do it in the "properties" tab of the game in your Steam client app), you'll be able to play with a _completely_ rebuilt pathfinding system.

The original pathfinding in the game had numerous issues, with the most annoying of them - being the units walking directly into parked cars, and failing to see many other obstacles on the map. The system I've been using was a closed library, built into the game engine, and was very cumbersome to work with and try to extend. This meant I had to basically live how it worked, and very little I could change when it didn't.

In the new build, I'm using a different, custom solution. All the human units in the game now use it, and from what I was able to test so far - it makes them much smoother, and they generally choose their paths in a much smarter way.

[h2]What changed:[/h2]
* you'll no longer have to wait for a few seconds on a crowded map, before your unit decides on a path to take (before, there was often a lag in between your move order, and the unit starting to move. this was because the pathdinging system was calculating the path for your unit, first)
* the system is multithreaded, and can handle hundreds of units
* local avoidance is much better, the human units should no longer walk right into parked cars, like they often used to do, before

[h2]Changes for vehicle units:[/h2]
The new system also supports the cars (to some degree), and it means they should also get improved pathfinding as well, but there's still a bunch of issues with them.
The main thing that got improved already, is that the cars now are able to navigate crowded spaces better. It's still not a perfect solution, though. Cars are harder to tune than people, because of the turning radius they need, and generally much more awareness around them because of the higher speed they move at.
So - it's still a work in progress, but it's gonna get better.

[h2]What's next[/h2]
After the new pathfinding is finished and moved to the main build of the game, I will continue making other quality improvements. I'd like to take the nearest month and make as many fixes to the existing gameplay as I can, before continuing with adding more, original content.

Plans for the upcoming month, what will be added in the next update

What's happening with the next update?

My current big development task in the game is adding politics and more interactions with the civilians. This is a long and somewhat tedious development, so far this is proving to drag on for much longer than I thought it would.

Which is why:
1) the most recent update to the game has been released silently a week ago. It includes a new feature where you can set up meetings with the locals ("shuras") in the villages. I chose not to advertise the change publicly, because for now it's just a single part of a much bigger, still not finished feature. The meetings do already work, and you can get a nice boost in relations with the civilians if you organize them, but I plan for them to be of much more consequence in the game world once I'm done with the rest of the changes around them.
2) the rest of this "project" will keep on coming in parts as well, with the immediate next one being the addition of politicians ("local leaders") to the game. The politicians will travel the map, observe your actions and possibly make your life more complicated if they don't like what they see. The civilian relations will now depend on them as well. Later, I will also add new buildable structures (and probably change the build menu a bit), so you can start creating your own infrastructure projects in the villages.

But for this entire feature to make some sense, I need to finish adding a lot of new systems and interactions. For example, you cannot have a local politician struck with CAS, and the locals ignoring the incident. You shouldn't also be able to stop and arrest a politician for no reason, either. And the people should listen to what a leader thinks of you, maybe he should be able to rouse them against you... and so on, and son on. All these small details keep on adding up, so in the end - I'm still not yet close to being able to release the feature.

Currently, I plan to have all this finished and tested in the next 2-3 weeks.

And afterwards?

After the politicians are added to the game and the new build released, I will dedicate some time solely to improving quality, with no new features at all. I will (again) look into pathfinding, quality of life changes and performance.

All in all, I probably keep doing the same mistake - I try not to post news here until I have something big to share, but at the same time I'm probably creating the impression that the game is dying. Let me say this clearly, then - the project is not dead and not abandoned. It's just that I'm trying to add an ambitious feature, and the time needed to finish it keeps mounting up.

pixel

What's in the next update, and when?

[h2]What is happening with the development this month?[/h2]
The last time I wrote an update, I said there were major changes being made to the AI. That's still the case, the development is still in progress, and the first batch of these changes is already live in the current game build (some of you noticed that the enemy became more aggressive - this is because the enemy can actually see you better now, in some cases).

The update in AI will be noticeable in your engagements with the enemy units, but I also need it to finally start building more interesting interactions with the civilians. Why don't the locals remember the troops you post in front of their houses? Why don't they expect compensation when you damage their property? Why don't they have leaders? These are examples of things I'd like to start simulating a little better in the future, starting with the nearest update.

[h2]Planned new features[/h2]
In other words, I will soon be adding various new interactions with the civilians and villages. The idea is to let you work on a longer term hearts and minds campaign, and be able to see how the locals are affected by your actions.

Some of the new things that will soon appear in the game:
* a proper statistics window for the entire villages (as opposed to specific houses) - showing you all the major events, what the people think of you, and what their leaders think of you.
* a new UI section, letting you track the requests and promises you've made to the locals (similar to the missions you get from your command). If you work with the civilians, you'll eventually gain their trust
* a new order (and lots of new UI) for the interpreters, allowing you to organize meetings (you might know them as "shuras") with the locals. Here's where grievances and issues will be solved, and maybe new relations built.



This is just a start, this entire "nation building" aspect of the game should eventually become a big part of what you do in Invasion (talk to locals, find out what they need, provide security, build infrastructure) in the future. However, since this entire new feature will take a lot of dev time, I plan on rolling it out in phases. First, the new stats windows and the shuras. Then, new social projects. Then, political leaders. Then, something else, and so on.

[h2]Bonus - the MRAP is now in the game[/h2]
I know many of you asked for the MRAPs, so finally - I added one to the game. Just a note, though - you don't get to have it in your default roster, when starting a new game, because this is the most powerful land unit you can get. If you want one - you'll have to spend Command Points on it (it's available from the unit buy menu).


[h2]tl;dr;[/h2]
There will be a new update in about two weeks, adding new interactions with civilians. You'll be able to better track the progress of your hearts and minds efforts. You'll also be able to organize meetings ("shuras") with the locals.

What's happening these days? What about the next update

[h2]What's with the updates[/h2]
The last time I spoke here, I promised to focus on developing a more fleshed out hearts and minds interaction for the game (more social projects, political leaders, more lasting consequences to how you interact with the villages). This hasn't changed, and will still remain the main task for the nearest future.
I have, however, reached a limitation in how the AI brain works. I initially made a somewhat simple system, where each actor senses the events around him, and tries to pick the most suitable action for his current mission. This works fine, but the problem is - the more complicated a mission is, the more unreadable the code that manages it becomes.
For example, if the enemy units are doing a foot patrol, their goal is to move from point to point, looking for anything interesting they might wanna check out. So far, so good. But, what if they should check out a village, instead of a random map point? What if they stumble upon and unguarded enemy car? What if they get enegaged in an unexpected place? What if their allies need help? What if they're in cars themselves? They then need to stop, exit them and continue the mission.
All these things are being tracked by the mission script, making it more and more hellish to manage and read. I cannot continue writing the AI this way, cause it completely discourages me from making any more complex interactions (whenever actors leave their cars, I need to remember why - is it the location they were going to, are they stopped in traffic, is it something else), and in general - if at any point the AI gets engaged by your troops - it has to abandon the original mission completely, because it has no way of remembering what it was trying to do.
The solution I'm currently working on, is switching to a more modern and robust way of writing this code - a node based system, similar to a behavior tree. The AI will now always remember at which stage of it's mission it is, and after I'm done writing the "nodes" for various interactions, I can start making really complicated plans for it.
The same system will be used for other parts of the game, starting with behavior in combat, to the in-game politics.

[h2]How will the AI be different when I'm done[/h2]

This is a sample view of an AI mission, where instead of a single monolith of unreadable code, I now have a structure I can track, and think of as "point to point" interactions for the AI. This lets me plan entire behaviors, like: 1) go to an area 2) exit cars 3) enter a building 4) if engaged, abort and return to this plan later 5) etc.

[h2]What does this mean for the game[/h2]
The AI will get smarter, and I will again start making new interactions for it. The first thing I'll do will be adding political leaders to the game. The leaders would be moving from village to village, changing the civilian sentiment in favor or against you, promoting their local allies, maybe organizing protests. As the player, you'll be getting new missions related to them, new demands to meet, and so on.
This sort of complicated interaction would be impossible to make with the old system.

[h2]What's coming next[/h2]
The next big update will add politics and more hearts and minds strategies for the player, like new social projects for you to develop, and more interesting interactions with the locals.

[h2]When is it coming[/h2]
With the summer season in full swing, I'll take two weeks off by the end of August (gonna be my first time getting any downtime since 2019). Before I leave, I plan on finishing the switch to the new system for all existing AI missions. This might not be immediately visible for the players (after all you rarely see what the AI is planning to do, and why), so I also plan on implementing smaller, unrelated changes as well. Expect new units, as well as some QOL improvements.
Planned release date - end of September.

Small fixes for the testing branch released

[h2]Second development update of the helicopters release[/h2]
The helicopters update is still in public testing, and I've just released an update for it. The update addresses a bunch of issues related to broken saves, a bug introduced in the previous patch (where you could no longer take anything from the cars, because the game thought the vehicles were never parked) and other smaller stuff (like the stupid issue of cars rolling down hill, any time you loaded the game).

Also, upgraded the underlying game engine, so there is a bunch of noticeable performance upgrades under the hood.

[h2]When will this be in the public branch?[/h2]
I'd like to take the next couple of days to continue gathering any further issues people can find, related to the helis (or not). By the end of this week, the helicopters should go public.

[h2]And after that?[/h2]
The next update will address the almost non-existent interactions with the locals. It's always been one of the promised features of the game, and is supposed to be a major part of what you do in the game. I want to add local leaders for you to deal with, more social projects, more stats for you to review on how your dealings with a village go, etc. This is gonna be fun.