Folder Structure
All informations about folder structure used by us
Introduction
There are some ways out there how to structure your gamemode. The simplest an easiest way, create one resource folder and create your code in it.
Easy Setup
The benifit about this structure, you have no trouble with imports, assets, classes and so on. But this is not what we are looking for
Advanced Setup
The benefit about this structure, you have splitted your gamemode into small pieces. All this peaces can combine to your master resource with the help of DI-Container. The only you thing you must be understand if your resource contains a package.json, the ResourceManager would be bundle it up in it's own resource. In most cases, this is not needed. You can split every pieces you want, every piece can have it's own components, services and submodules if you want.
How to register the modules
This is the easiest part of it, create your module and add to @Module Decorator import section in your main resource.
Keep in mind, you don't need the client and server folder both for each splitted module. Create only what you need. Keep it simple and stupid.
Last updated