Grid controller simulator banner

Grid controller simulator

7 devlogs
13h 12m 37s

My most ambitious project. This has been a project of mine for years but I finally have the ambition and skills to complete this. What this promises to be is a realistic video game with intricate simulation mechanics and interesting challenges for…

My most ambitious project. This has been a project of mine for years but I finally have the ambition and skills to complete this. What this promises to be is a realistic video game with intricate simulation mechanics and interesting challenges for the player. It is going to have realistic simulation, sandbox mode, campaign mode, custom map support and even achievements and custom scenarios, could add a market if I am feeling spicy. I hope you find the premise and execution fun as I try to balance realism with complexity and enjoyment.

This project uses AI

Used claude to help with some advanced vector math for the icons

georgegk

I did not in fact add controls. I was about to but I got side tracked cause my simulation script has a lot of bugs. First of all I had to readjust the demand tick function to gradually move from hour to hour instead of instantly changing and making the grid collapse. I also had to add a clear alarms button since alarms just kept pilling on without being removed and I realized that load never got shed, since I have made a typo when reading the node data and the script thought that no nodes could shed. It took me a long time to find all those and there are probably way more I just haven’t noticed yet. This is more complex than I thought but I am still having a lot of fun.

Attachment
0
georgegk

log time, no log (or whatever the saying is). I finally made the Simulation Engine™ for the game and let me tell you it was a lot of math/physics. The only thing that saved me was pen and paper where I manually organized the formulas I was gonna use for this. I won’t get into it here but it’s a lot of math, swing equations and so on and so on (some I didn’t even know myself, google saved me). I kind of haven’t connected it to the interactive menus (or created any controls), expect for the HUD, so I don’t exactly know if it’s functioning or not, I guess we will find out soon enough once I connect everything together. I fear that I haven’t written _tick_dispach() correctly to account for wind and solar so I will have to correct that like right now.

Attachment
0
georgegk

I completed the rest of the HUD. It has a gen VS load bar in the bottom middle that shows out difference in production/ demand, a panel in the top left to show the time, season, day, and some production statistics and lastly an alarm panel that shows how much we are exporting/ importing and a few important alarms whenever they happen. This project is going really well however the complicated math is starting to get to me.

Attachment
Attachment
Attachment
0
georgegk

So I designed this analog meter to display the current grid frequency to the player, but then I realized that it is a bit hard to read so I also added a digital display and a label to describe the current state. I will also have those warning displayed elsewhere in the HUD but it’s nice to have them right below there too. I like this design a lot I feel like the colours just pop

Attachment
0
georgegk

So I made this nice info screen. It might not look like much but it took quite some time to have it all functional and displaying text (I just noticed that the label text can overflow, I only fixed the overflow in the content area), after all I had to make the program that read the saved map file and rendered the data. I haven’t talked about the map at all. So I want it to be totally customizable and be able to include custom scenarios that’s why I have decided to save the maps as .json files that the player can choose from.

Attachment
0
georgegk

So update time! over this 1.5h I decided that I didn’t want to load the icons as files but instead have them generated using python, so with some help from claude I designed this system that creates an icon for each type of node. Now it did take quite some time to figure everything out but overall I like the new look, it feels very pygamey which is what I am going for with this project. I have zoomed in a bit so the labels are visible (I will probably need to fix that overlap won’t I)

Attachment
0
georgegk

So I mostly worked on getting everything basic setup, I have brain stormed this project quite a lot and I have decided to base the main map around oakridge alaska (shoutout: Oakridge Nuclear Power Station you have been a great inspiration in this project that’s why I am giving you the main map). It is a “small” exporter city with nuclear, hydro, solar, wind and gas peakers a perfect combo to implement a variety of features. Plus the subarctic location allows for weather features and interesting ice/temp related challenges. This is nothing too complicated yet just some transmission lines, a pannable map and some random nodes.

Attachment
0