Hi all! It’s been a long time since the last update. Sadly real-life things have prevented me from giving the project as much attention as it deserves, but I’ve recently found time to work on RWE again and I’m pleased to present a new progress update once again.
Since last time, RWE has learnt a few new things!
- To show a red square and disallow building things at invalid locations
- To read TA font files (FNT), which are used for in-game text
- To render the top bar, containing the team colour, metal and energy bars
- That buildings can produce and consume energy, either constantly or when activated
- That building (nanolathing) drains resources, and pauses if resources are not available
I have spent some time observing how TA does resource calculations and I have come up with a system that appears to work similarly to TA. Here are some interesting observations:
- TA’s resource counts update only once per second, and this gives rise to the familiar stop/start nanolathing effect when stalled for resources
- The data you see on the metal and energy bars appears to be for the previous second, so by the time you see it, it is already one second out of date
- When you run out of a resource you will actually “go into debt” by a small amount, i.e. below 0 metal and energy (though TA will say you have 0)
- Builders can continue to consume a small amount of energy when stalled for metal, even when no build progress is being made. I have not yet observed this the other way round (consuming metal when stalled for energy)
- It is possible to slightly overpay on resouces (e.g. 1 metal) due to small rounding errors during building
For today’s gif, here’s a demo of the resource bars working as the commander builds a solar collector. You will notice they update instantly – I have yet to implement the animation/tweening that TA does between states, but it’s on the to-do list.
Next the focus is going to be on rendering the bottom bar, which shows information about the hovered over unit or build button. After that, I will move on to factories.