Project Structure
Best practice for structuring your Cardinal game shard code
Once you have created the starter project using the Quickstart guide, you will see a cardinal
directory with the following structure:
starter-game └── cardinal ├── component ├── msg ├── query ├── system └── main.go
This is the basic structure of a Cardinal project. The component
, msg
, query
, and system
directories are where you will be spending most of your time. The main.go
file is where everything is wired up together and is the entry point to starting your game shard.
While the component
, msg
, query
, and system
directories are not required, we encourage you to follow it as a best practice so your project is easier to organize and navigate.
In the next page, you will learn what goes into each of these files and directories.