This step gets you to a runnable project layout.
The fastest way to start is the ompgo CLI.
Create a new project:
go run github.com/ompgo-dev/ompgo/cmd/ompgo@latest init -name freeroam -module github.com/you/freeroamThat creates a folder named freeroam with:
- a
go.mod - a
main.go - a minimal
runtime.Bootstrap(...)setup
If you want the project written somewhere else:
go run github.com/ompgo-dev/ompgo/cmd/ompgo@latest init -name freeroam -module github.com/you/freeroam -out /path/to/freeroamIf you prefer installing the CLI first:
go install github.com/ompgo-dev/ompgo/cmd/ompgo@latest
ompgo init -name freeroam -module github.com/you/freeroamIf you are adding ompgo to an existing module, create a main.go and add the dependency yourself.
Your module only needs a simple layout at first:
your-component/
go.mod
main.go
Then add ompgo to the module:
go get github.com/ompgo-dev/ompgo@latestIn the next step you will replace the scaffolded main.go with a minimal gamemode that:
- logs when the component loads
- welcomes a player when they connect
- registers itself through
runtime.Bootstrap(...)
Move to the next step once you have a project directory with go.mod and main.go.