top of page
Space Exploration Prototype July 22, 2021

July 22, 2021

I updated the display for resources, added a progress bar for work being done, and made the resources into structs to give me better control.

The new resource display came as a part of the changes to resources in general. I made some simple icons for each resource and plugged them in.

The progress bars took me a while to figure out how to implement properly. For a while I had each workstation tracking and drawing their bars. Each bar was then also using division to get their percentage every frame (I know, I know). I Eventually got the percentage updating on intervals based on if the station was claimed and the game speed (if unclaimed, it updates less often). The bars themselves are just a pair of rectangles.

Making the resources into structs was definitely a challenge for me. I had not used structs in a heavy capacity before, so I took the opportunity to dig deep. Each resource uses the same constructor and identifies itself. They can then update their value if they are draining and be given an instant change or be set to a specific value. I have simple interactions in place with workstations for testing the resources.

Next steps are going to be focused around setting up proper jobs for workstations. Some jobs should consume resources when work starts, others when it finishes. They should also be giving feedback for what the job will do, and show what the results are when finished.

© 2018 by Peter Muir. Proudly created with Wix.com

bottom of page