How to Combine RTS & FPS (Part 2)

11 July, 2023

Cover image of How to Combine RTS & FPS (Part 2)

Dear Silica Community,

This week we're back with the second part analyzing some of the challenges Dram faced when creating Silica and how he managed to overcome them. 

Realistic ballistics

There are definitely situations where you can experience how the realistic ballistics work during the battles on the scorching deserts of Baltarus! You can see an example when tanks are firing against each other, especially in range. For standard shells, they will bounce off the top of the armor. This can influence gameplay quite heavily because you need to find the right angle to hit the tank and the right spot, for example under the turret of the tank, or "the neck" where if you manage to hit that, it will deal a lot of damage. It's all about tactics at the end of the day. 

Ricochet

As soon as a bullet ricochets, there is a simulation on whether the projectile is deformed, based on the angle and force. There is also a possibility that a projectile can spin out of control after it ricochets, and it could still land on something causing impact damage but not exploding, as it's been deformed. 

Alien swarms

Letting the aliens have the ability to swarm, proved why going with physics-driven was a good idea. Doing this, with anything but physics, just makes it much more complicated. The way the aliens work, they have a sphere collider so you can imagine them as a ball moving on the terrain and reacting with the terrain so when it bumps into something, especially on the ground, it gets the normal of that, and it knows which direction is "up". So if there's a point beneath and a point across that creates this wall, then it knows that input going into it, is forward into the wall, so logically, the vertical surface is more important than the horizontal, therefore it starts to angle up and it goes up the wall.

And the important thing is that even though the crabs can climb over each other, they can't climb onto each other by themselves. That's why Dram has put limitations to the movement so if they're on top of each other, they can climb on top of each other but they can't climb up onto each other. Therefore, when there's a lot of them, they just naturally push each other on top which creates this "pile of bugs" which looks really cool!

Multiplayer synchronization

For this topic, Dram decided to go against the standard tactic of having everything server-side. The reason for this is because it's a lot of data. When there's a huge amount of units, that causes a problem in synchronization. Instead, Dram decided to implement client-hosted servers. So anyone can host a game and have their friends join their server. If it required a really strong connection, then it would limit who can actually start a server. Or it would limit how many units they can have in the server.

Dram always had a goal to go with around 100 - 200 max in the game. He ended up not putting a unit cap and it resulted in everyone spawning about 500 to 600. So Dram has been working on optimizing that in terms of performance but he also wants to optimize it in terms of bandwidth because right now, when there are 600 units, it's a lot of data that has to be sent per unit.

Another more personal reason, was to support really high ping rates. Dram's brother lives in Australia, and whenever they played, there would be a 300ms ping, making it extremely difficult to play together. So in the end, Dram wanted to be able to support this sort of high ping. The approach is old school, and the old school thing which you have to do is sanity checks. These sanity checks are able to combat players who might be hacking and autoban them. 

Fog of war

From an RTS perspective, one would expect that whatever is outside of the vision range in the fog of war, would be concealed. That causes problems with FPS though as it relies on line of sight. At the same time, Dram couldn't use line of sight for RTS so he decided to implement the best of both worlds.

He added a feature called concealment. So there's the vision range of the fog of war and anything within that is revealed. Units, however, can be concealed if they're near large rocks, cliffs etc. It also depends on the unit as it would be hard to conceal a hover tank compared to an infantry soldier. 

There are multiple ways to detect a unit. Audio is always a way to go - if a quad starts shooting, then if most certainly be more audible. So in essence, the audible range can reveal a unit.

And that's it for this week's part. You can still check out the video interview with Dram to learn how to combine RTS & FPS:

The last part should be coming out soon so stay tuned and we'll see you on Baltarus!