Shields and the color of heat

As sometimes happens I took a bit of a break from Spaceroom work to deal with other things in life. However last week I as able to get back to coding again. This time I added a new Shields component to the ship. I am appreciating the event interface system because it was very easy to add the new component and instantly have it sending data to the console application. I also added a new page plugin named Tactical which will provide controls and monitoring of the Shields as well as eventual weapons systems.

The model for the shields is pretty simple. There is a maximum power consumption, with an efficiency factor that determines the usable power in the shields. The power factor is adjustable using a proportional control. The shield will be able to block an equivalent amount of energy (pure or inertial) for the power cycle. Anthing less than the shield power will remove that amount from the shield amount. Anything exceeding the amount will be converted into a damage factor applied to the ship. The power range is from 0 to 1 MegaWatt (MW). At the moment the power system produces 1 MW per cycle. The engine at maximum consumes 100 KW per cycle. Currently, in the system, the engines get first priorty when allocating power for a cycle. One interesting question is what happens to the energy in the overall system when an outside force encounters the shields? Does some of this come back to the ship as heat? Is the other energy redirected somewhere?

For monitoring power draw, I added a new feature of the power system to record power requests by the requestor and deliver this information to the console as a data event. This is handy to have a list of all the devices drawing power and what amount for each.

This starts to get me thinking about how to manage weapons and battle in the simulation. On the list of things to do is create an “enemy” ship that has shields and weapons that can test the offensive and defensive capabilities. Worthy of a later discussion.

On a different note, I had implemented a heat radiation model from the engine and the temperature of the engine is modified as the engine is used (or not used). I am always interested in looking at ways to display information in a meanful way so I was thinking about how I might show a color representing the heat level. Depending on the temperature a body will radiate heat in different frequencies. I have found some information converting colors defined by frequency into RGB values (which make it possible to show on the computer). With this I can create a display which would be the color of the light coming from the engine. This could also be used to show an appropriate color of the exhaust from the engines depending on the energy produced. More fun things to play with.

So, as usual, I wind up with more things to figure out how to do, rather than making the work list any smaller.