Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tanjunior patch 1 #22

Merged
merged 15 commits into from
May 10, 2020
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ To test the project, you need first to install the server and get it running, th
To install and start the server:

1. Install Docker.
- [On Windows](https://docs.docker.com/docker-for-windows/install/).
- [On Windows 10 Pro](https://docs.docker.com/docker-for-windows/install/).
- [On Windows 10 Home (and below)](https://github.com/heroiclabs/nakama-godot-demo#setting-up-docker-on-windows-10-home-and-below).
- [On Mac](https://docs.docker.com/docker-for-mac/install/).
- [On Ubuntu](https://docs.docker.com/engine/install/ubuntu/): `sudo apt install docker.io docker-compose`.
1. Open your terminal and navigate to the `nakama/` directory.
Expand All @@ -43,6 +44,18 @@ Docker should automatically download, then install Nakama and CockroachDB for yo

Then, to test the project in Godot, you need to open or run the project in two separate instances.

### Setting up docker on Windows 10 Home and below)
1. [Install Docker Toolbox](https://github.com/docker/toolbox/releases).
2. Double-click on the Docker Quickstart Terminal shortcut created by the docker toolbox installer.
3. Run the Command `docker-machine ip` to get your IP and save it for future use.
4. Extra settings if not running project from C drive
1. [Create shared folder](https://docs.docker.com/toolbox/toolbox_install_windows/#optional-add-shared-directories)
2. Edit in the `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"

3. Run the Command "docker-machine restart"

### Registering and logging in

To log into the game, you need first to register a dummy local account. To do so, on the initial game screen:
Expand All @@ -60,6 +73,7 @@ Nakama's server provides a web admin interface to see, modify, or purge users an

1. Start the Nakama server.
1. Navigate to http://127.0.0.1:7351/ in your web browser.
- Run `docker-machine ip` to get the IP if Windows 10 Home and below
1. Log into the platform. The default admin user's login is `admin` and its password is `password`.

## Licenses
Expand Down
4 changes: 0 additions & 4 deletions godot/src/Main/MainMenu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ func join_game_world(player_name: String, player_color: Color) -> int:
# warning-ignore:return_value_discarded
get_tree().change_scene_to(load("res://src/Main/GameWorld.tscn"))
ServerConnection.send_spawn(player_color, player_name)
else:
emit_signal(
"server_request_failed", "Error code %s: %s" % [result, ServerConnection.error_message]
)

character_menu.is_enabled = true
return result
Expand Down
2 changes: 1 addition & 1 deletion nakama/boot.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@ECHO off
docker-compose -f docker-compose.yml up
docker-compose -f %~dp0docker-compose.yml up
tanjunior marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion nakama/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ services:
interval: 10s
timeout: 5s
retries: 5
tty: true
volumes:
data:
data: