If I just have C++ and say SDL or Raylib, how do I structure game code to keep it scalable (ie not a huge mess when I add more levels, items, mechanics, etc)? I have been able to make very simple stuff but the moment I try to add to it, it always gets out of hand and I can’t really refactor it without starting fresh.
As someone that has been a professional developer for 20-ish years, and has always dabbled in game development since I was a kid, I can share a couple bits of advice. I’ve written a couple different purpose built engines, and have used a few of the current popular ones as well.
I know none of this is specific to any particular language or tech stack, but that’s the point. Don’t get bogged down in the minutia of it, and instead focus on the big picture. I hope that at least helps a bit - and be sure to share your progress!