Skip to main content

Running with the Backend

Launching the Backend

warning

Currently the Standard License option only works for Windows development machines. We're working on getting MacOS and Linux supported.

Modify RedwoodBackend/config-settings.json so the defaults.env field uses the configuration environment you created earlier (e.g. project-name):

{
//...
"defaults": {
"dir": "config/node",
"env": "project-name"
}
}

You can run the dev-initiator.exe file in the RedwoodBackend directory via the terminal or double click on the Run Dev.bat script from File Explorer.

If you run the dev-initiator.exe program from a terminal, make sure to start it from the RedwoodBackend directory.

Several logs will print to the console as the backend initializes; wait until you see All services ready.

Running the Game

It's time to start the game, connect to the backend, and join a match!

  1. Once the project is created and shaders are compiled, you will see the default Lyra level selected:

    Match Template Default Level

  2. Open the Content Browser and open the level /Content/Redwood/Frontend/L_RW_LyraFrontEnd:

    Match Template open Redwood Frontend Level

  3. Make sure you've selected Play Standalone under the PIE Net Mode (it's the default) and are still in the L_RW_LyraFrontEnd level:

    Match Template select standalone

  4. Press the green play button:

    Match Template play button

  5. You should see the Lyra frontend widget with the LOGIN/REGISTER buttons enabled:

    Match Template frontend

    warning

    If you see these buttons greyed out/disabled and a label saying Connecting to backend..., there are some a few common issues:

    • You have another application bound to the port 3001
    • You did not configure your hosts file properly to include director.localhost
    • You did not change the Director Uri project setting to include :3001
    • You started PIE before the Dev Initiator hasn't finished initializing. The connection retry logic will get exponentially slower after each retry, so you may need to restart PIE
  6. Register to create an account; any username/password works here. We use test and test for quick iteration.

  7. Login using the same username/password. The Remember Me functionality is part of the Redwood plugin. It will save a RedwoodSaveGame.sav file in the SaveGames folder with an authentication token to automatically login when the game starts the next time.

    warning

    If you were able to register but the login process seems to hang for more than 5 seconds, you're likely having issues connecting to the Realm Frontend service. The common issues for that are similar:

    • You have another application bound to the port 3011
    • You did not configure your hosts file properly to include realm-default.localhost
  8. You should be able to see a PLAY button now:

    Match Template logged in

  9. Select PLAY; from here, you can either select MATCHMAKING or START LOBBY to create a match. The JOIN LOBBY button will show a list of existing public lobbies.

    note

    It may take awhile for the server to load the first time. You may get a timeout and need to try again. If your ticket keeps going stale, you can increase the ticket-stale-time-ms variable you set earlier and restart the Dev Initiator.

    info

    Server initialization is shorter in a packaged/cooked game. When running with the local game server provider, you're using uncooked content through UnrealEditor.exe. Using the agones game server provider will have the shortest initialization time due always having a warm server already started waiting to get the match details. Hathora's startup time is also quite fast, with their Enterprise tier having the best performance.

success

That's it! You're using Redwood to start your servers and route clients into those servers via matchmaking or queueing! Let's learn how to run things without the backend running for faster development iterations.