A game programmer for 20+ years, but my day job is fiber network design. Feel free to talk to me about anything. I am into game development, music, reading and politics. My current games are Factorio (Pyanodon's mod), Far Cry 4 & GemCraft Frostborn Wrath
mindstorm8191
Loading...
Well, that was an easy fix.
Turns out I had already planned to manage structure IDs, I even had a field in the database for it. I just hadn't... applied it yet. #gamedev
bsky.app/profile/mind...
should get to the last used structure ID (43). Somehow... it's not. So the next step is to fix this to work correctly... whatever that'll be.
That's where I'm at in coding this.
I'm making good #gamedev progress with my Settlers & Warlords game. But I have been waiting for my workers to send items to a new structure, but they never do. The game even gives me a reason: the structure doesn't need any items to work.
But that's not right. It's also referencing the wrong ->
I was listening to a song today (A Lifetime Rolls By by annasara Rework - give it a listen if you can), and got thinking: In this country we've had millions of people go thru college, invest their time and savings to get a degree. Only to graduate and discover the job markets they're skilled in ->
the ID that the Item Mover is holding, so why is it picking the wrong structure?
It turns out there are TWO structures with id=43.
I use a lastStructureId to help determine what ID to use next. When I refresh the page (and load a fresh copy of the game from the server), the lastStructureId ->
structure name (it should be Farmer's Post, not Item Mover). Why is it getting the name wrong?
The Item Mover (that's responsible for giving items to the Farmer's Post) stores the structure as only its ID (it's easier to store & fetch that way), and the ID of the Farmer's Post is 43. This is ->