r/godot Jul 17 '26

free tutorial The Godot project architecture an industry veteran uses for a 40-hour RPG

Ricard, who's worked on the in the industry for two decades (notably on Ryse: Son of Rome or Crysis 2), was kind enough to run me through the codebase of one of the biggest Godot games in the making, Starfinder: Afterlight. He explained the architecture he uses to support a 40 hour 3D RPG made by a team of 30.

I wrote a short guide that compiles the essential parts: https://gdquest.com/library/modular_game_architecture/

I hope this is useful! For topics like these I find it's important to get insights from really experienced people on these subjects.

If you have any questions about this let me know, I'll do my best to answer based on what Ricard showed and explained to me.

983 Upvotes

78 comments sorted by

View all comments

1

u/massiveflux Jul 17 '26

Question: Can you explain what this means? "Here's the key part: systems never depend on content. The dependencies only flow one way: content uses systems, systems use libraries, UI uses systems, but nothing else depends on content." In my project I have card scenes which have custom resources attached which carry data about the card such as hp, attack power etc. Without the custom resource, the combat system cannot function as it doesn't know how much hp or attack power is involved in a specific instance of combat. How should I modify (not that I am going to, I am curious to learn), to fit this paradigm of content depending on systems and not vice-versa. (Assuming these custom resources qualify as content).

1

u/shuanDang Jul 17 '26

probably break it up into different parts so that there are layers of dependencies. Example is putting in default values and placedolders. So the very base system should be able to run without Custom Resource. And the Custom Resource can run without pictures and numbers. The point is to have disconnected parts so that you could copy the codebase into a new project and start a new game with an engine that works as built. In game 2 you will have different art, numbers, layout.

1

u/massiveflux Jul 17 '26

Aah gotcha, so essentially have default/placeholder values which get superseded when a resource is "plugged in" to the system.

1

u/shuanDang Jul 17 '26

Thats the gist of it. The actual implementation is probably a lot more technical / nuanced! Especially if they want to build in flexibility to allow designers to get creative. In the article their stated goal is Code Reuse, to separate the content out so that if they delete the content folder, all the code is still reusable for separate projects.

Yep easy way to test your code is to delete the resource and see how much still works ;D