Struggling with larger scale games

Godot Version

4.6

Question

I am struggling with managing and working with larger scale games. I can make any small game very well. But the moment there are too many systems working together, scripts, nodes, signals, etc. the project becomes a complete mess and I can’t remember or manage much of it. I can trace them and fix things here and there but it is a pain and I forget it all quickly afterwards.

I assume it is due to a lack of good structure, whatever that means or looks like I don’t have a clear picture of it yet. Eventually I always end up abandoning these larger scale projects and start new projects hoping to do better. And while I am slowly getting better which each, I wonder if there are any resource that try to help game developers design and work better with larger scale games.

It’s definetly related to resources you have (either your experience or your time or possibly both).

I’d suggest to add systems one by one to your game.

If you add one thing and it makes it complex, then go back to your foundation and change it before adding more systems.

There should be some guides about scaling up, but I think it’s mostly theoretical. My guess is you wouldn’t know how to solve it unless you try and fail and try and fail…

everyone will struggle if there was no organization or too much of it, try making few simple rules like you name everything specific way, or make folder for every system ect. this way you will not be so lost

How familiar are you with OOP and SOLID?

Divide into independent sub-systems, then develop each sub-system separately as it was a small game.

Write tests for those sub-systems to ensure they aren’t broken by other changes

Sounds about right if a feature or system is added later. But I am sure some would say it would be more ideal not to add anything after the initial design. But changing what you already have to work with what you want to add is definitely an option aside from the other way around where you make what you want to add work with what you already have (this probably what I usually do).

I do use prefixes for most of my code to distinguish from the default code aside from other things. I think the thing I struggle with is how to structure the folders and files. But that might not be the issue.

I am somewhat familiar with OOP, probably like classes, inheriting, and such, but not sure what the difference is. Dont know about SOLID.

Yes Iv been doing that. But that can also get messy where every piece sort of relies on another and one change can break the overall system. I am sure there is a way to do it better so that does not happen.

Iv never gotten the idea of writing test. Probably should look into it.

-

I feel like I just can’t manage anything at a larger scale. I dont know if the issue is having 1 script that has too many things in it or if breaking it into too many scripts and pieces is the issue. Seems like its just whenever there is too much.

Iv made about 3 to 5 games that are relatively large scale. Not just a simple 2d side scroller with basic things, or a pinball game, etc. Something like that I can do. Even simple 3d games.

But if I want to add a few things to them, like inventory, dialog, weather system, some complex interactions, etc, make things “nicer”, or make them a bit the way I want them which might mean it becomes more complicated than they need to be, it all becomes too much to keep everything working. Each of them can be complex already depending on how you make them. I’ve experience building those things. But then tying them together and making sure everything work seems to be the hard part.

Its probably a combination of me making certain parts too complex. Maybe I need to simplify things. But Iv tried that too.

I recently built a dialog system using branching choices. It was simple at first. But even with just adding more dialog branches it starts to become hard to manage. Then I’ll usually decide to include something like ‘stats’ or relations, maybe some world context, to make the dialog a bit more dynamic. The idea and design works well and even works at first. But then as each part scales, it becomes harder to work with each part and all the parts together. And that’s just one system. I think it is manageable. But maybe its just my lack of experience so everything becomes messy. Maybe I just haven’t practiced enough to get a better idea how to integrate those things together well.

It is, isn’t it?

Hard doesn’t mean impossible though. Have some faith in yourself. if you keep working at it you will get there.

OOP was designed to make larger projects manageable. SOLID is a set of OOP best-practices. SOLID Principles with Real Life Examples - GeeksforGeeks has a reasonably gentle introduction to the SOLID principles.

Well, yeah, you need to have some competencies in systems design. It’s a skill learned by study and practice, so you can’t expect to just be good at it on the first try.

Make sure you add plenty of comments in your code too.

Is this a software architecture question or a project organization question?

I have a standard organization structure. It varies a bit by project, but it looks something like this.

I know where to find things. One of the worst pieces of advice I see in beginner tutorials is grouping all scripts in one folder, and all scenes in another. There is absolutely no benefit to that, and it makes things hard to find later.

If you’re talking about architecture, I prefer to keep things small and atomic. Which is why my addons folders always look like this:

The folder structure looks great and is very clean. Additionally, the Godot engine itself is well-structured.

Could it be more along the lines of mental overload then organisatory?
The Brain is only able to juggle and connect so many things at once and if you try to make a big connected picture bigger and bigger it seems to just stop working at a point.

Well said.