Laser Squad [Day 37] – Brainstorming session part two

Time to do some brainstorming again. I talked already about how some enthusiasts tried to figure out how all the ingame calculations are done by reverse engineering the original code. Well, two things are bothering me the last couple of days, and if I could look into the original source code, I will definitely look how these two thigs are implemented – firing weapons and explosions.

I’m thinking about firing and how to calculate the trajectory of a bullet from one point to another. The Bresenham line algorithm which I am using already for the LOS can be used in this case also, but with much higher precision. If I remember right, the “Cyber Hordes” scenario in the original game introduced units that are different sizes (three of them in total), so even if your bullet is flying to the correct destination tile, there is a chance to miss the enemy unit if this unit is 1/3 of a tile in size. All these calculations should be also mixed with random numbers depending how precise the weapon and the chosen fire mode is.

The second thing are explosions; a real brainstormer. Right now when it comes to explosions all the tiles are blown away. That’s very nice, but that’s not how things work in the real world. Each tile has the constitution parameter which absorbs the total power of the explosion. For example, doors and walls have greater constitution than floor surfaces or furniture tiles. One more problem is that the power of the explosion should spread radial, and if you want to make it very realistic, the power of the explosion, when blocked by concrete tiles, should spread in other “free” directions – like moving fluids.

I think my head started to hurt.

* * * * *