As some of you may have known, we have had plans to remove the old EV-style accuracy model. It’s a bit forced in the sense that it’s the future and stuff like laser cannons can’t hit the broad side of a barn. This has been discussed before and finally it was decided to use heat to determine the accuracy. Heat in this sense meaning that as you shoot weapons they heat up and start losing accuracy.
This changes radically how forward weapons react (not as much turrets) and makes them much more usable as they’re more accurate. This has also the side effect of making the AI much more deadly, but since the AI has always been pretty awesome at killing you it’s not that big of a change (we’ll deal with AI post-0.5.0). We hope this will make playing fighters and other small craft more fun.
To sum up how it works: when you shoot your weapon heats up, this heat is then moved to the ship that heats up and starts dissipating. Basically it means that weapons that use more energy have a tendency to heat up more, however the more mass they have, the less they will heat up. So just don’t hold down weapons forever. This shouldn’t really be a major issue in all combat situations but will be something to take into account.
Now since I’ve implemented and I’m pretty happy with it, I’m going to talk about the implementation. For you non-math/physics lovers you might want to abstain from the following.
In our simulation models we are taking into the following to simplify the heat-transfer model:
- The weapons generate heat through 1% energy loss of each shot.
- The weapons can only lose heat through conduction with the ship body.
- The ship body is subject to thermal radiation.
- Each weapon is a node only attached to the ship node.
- The ship node is attached to all weapons.
The reasoning is that you cannot have convection in space due to absence of medium. However you could argue that the interior of the ship could have convection. We consider that the interior is isolated from the hot part of the ship (chassis) and therefore it is not able to affect anything (not to mention the pilots would boil up). The model is also very simple since it’s run constantly on all the ships and we do not want it to slow down.
Now onto the formulas and then we’ll explain more details on how we calculate all the parameters for the formulas (yeah, we installed a LaTeX plugin just for this post).
As you may know, the formula for conduction is:
- q being heat flux (W/m^2)
- k being conductivity (W/(m*K))
- grad T being the gradient of T (in our case dT/dx because we consider it to be a one-dimensional problem)
The formula for radiation is:
- sigma being the Stefan-Boltzmann constant (5.67×10−8 W/(m^2 K^4)).
- epsilon being the emissivity parameter between 0-1 (black body radiation).
- T being the object temperature.
- T0 being the black body temperature of space.
The final and most important effect we have to consider is the heat capacity. Heat capacity represents the ability of a material to “store energy in the form of heat”. This is important because it determines how ships heat up. It’s pretty simple to calculate:
- E being energy (J).
- C being heat capacity (J/(kg*K)).
- M being mass (kg).
So you ask how are we handling the parameters? Well currently we are modelling the ship as a steel sphere and the weapons as steel spheres with half their surface in contact with the ship. For the materials we’re considering it’s all made of steel with the following constants:
- Conductivity of 54 W/(m*K).
- Emissivity of 0.8 (pretty for steel).
- Heat capacity of 0.49 J/(kg*K).
- Density of 7.88e3 kg/m^3
- Space temperature of 250 K
You may argue that the space temperature should be 3 K and not 250 K. However that depends heavily on the proximity of stars. In “deep space” it’s about 2-3 K, however around earth it’s approximately 250 K. This varies a lot so we’re just using 250 K for now as the numbers turn out quite pretty.
After inputting all the values we wind up needing no parameters since we can calculate everything dynamically. This makes the system really easy to maintain as long as the parameters are sane, which they are. Here are some images to show off the results with the new NAEV Heat Simulator written up for the occasion: