This demo shows how to use Nakama with the Nakama Godot client.
It showcases the following Nakama features:
It also shows good practices to design user interface and structure your Godot projects.
There are two Godot projects in this repository:
godot/
directory, you have the complete demo.tutorial/
directory, there is a Godot project showing basic code examples to get you started. There, you will also find written notes for an upcoming series of video tutorials, with code snippets.Here is a view of the game world, where players can chat, move around, interact with one-another, or change their color.
The character creation screen allows you to pick a color from a predefined color palette.
To test the project, you need first to install the server and get it running, then run two instances of Godot.
To install and start the server:
sudo apt install docker.io docker-compose
.nakama/
directory.docker-compose -f docker-compose.yml up
or run boot.bat
in Windows.Docker should automatically download, then install Nakama and CockroachDB for you before starting the local server. The server should emit the message "Startup done".
Then, to test the project in Godot, you need to open or run the project in the godot/
directory in two separate instances.
Double-click on the Docker Quickstart Terminal shortcut created by the docker toolbox installer.
Run the Command docker-machine ip
to get your IP and save it for future use.
Extra settings if not running project from C drive
docker-compose.yml
change the volumes path under nakama services to"/Folder Name define in the VBox settings(step 4i)/path to docker-compose.yml file:/nakama/data"
To log into the game, you need first to register a dummy local account. To do so, on the initial game screen:
[email protected]
. For example, [email protected]
would work.Once you registered an account, you can log in, create a new character, and enter the game.
Nakama's server provides a web admin interface to see, modify, or purge users and other game data. To access it:
docker-machine ip
to get the IP if Windows 10 Home and belowadmin
and its password is password
.This project is dual-licensed: