Creating a Multiplayer headless lobby server in Godot

Introduction to creating a headless lobby server in Godot

Hey fellow devs,

today I would like to add some more advanced words to my Tutorial on my YouTube-Channel. If you haven’t already please make sure to follow me on YouTube to receive updates about my upcoming Tutorial videos.

Why do we need a lobby server?

We could of course making just a peer to peer connection. The Problem? Most devices are behind routers and you won’t get the public ip from the device to connect them together.

For this reason we use a routing server aka lobby server which handles the connection to the devices. The lobby server also offers more control and we have the possibility to monitor things like concurrent users online. Opened games and other statistics.

Is MultiplayerEnet the only variant for this server?

No! Godot offers a wide range of Multipler implementations. It is maybe a better idea to use websockets if you would like to have a more dynamic server as a lobby server.

I used the Enet because it feels like it makes the most sense for my type of game, but maybe I will change this later.

If you have any questions regarding my blog or tutorials please feel free to comment below and share your feedback. I still have a of posts to do, but I hope I get the blog up to date as fast as possible.

Create a Game with Godot – First lessons learned

I would love to share my first steps and first learnings with Godot 3 with you guys 🙂

Export Blender Models as .dae files

As one of my first tasks I tried to export models from Blender to Godot. For my first approach I used .obj files and imported them into Godot without any problems so far. After a while I realised, that my artist also created some materials, which weren’t included in the import.
I figured out that Godot advices to use .dae files, which includes the materials correctly. So we exported the files as .dae. Surprisingly every model was imported as a Scene in Godot, which first confused me, but it is the right workflow. I will explain it within the next chapter.

Use Scene instancing

Having each Model as a scene has one big advantage: We can instantiate them. In UE or Unity this is called a “Prefab” as far as I know. In Godot we can use a Scene as a prefab, this is why .dae files represent a scene. It is a good practice to have everything as a scene and then in your game scene instantiate all the other scenes just like that:

Game (Scene)
  Human (Instanciated Scene)
  Landscape (Instanciated Scene)

You can read more about that here: http://docs.godotengine.org/en/3.0/getting_started/step_by_step/instancing.html

Use Unity Tutorials, if you can’t find any for Godot

Actually there are more tutorials available for Unity than for Godot, but nevertheless just watch the Unity ones. Most likely it is really easy to transfer the knowledge from Unity to Godot, since most options have the same names or working in kind of the same way.

GD Script is not Python

Even if they look quite similar GD Script is not Python, it is just inspired by Python. Why is it worth to know that? I was confused, because I encountered some ‘What the fuck’ moments when writing GD Script for the first time, since I have a strong Python background. So you should definitly check out the GD Script syntax first to get an overview. 

You can read more about GD Script here:
http://docs.godotengine.org/en/3.0/getting_started/scripting/gdscript/gdscript_basics.html

Next steps, next big idea

I decided to start a Vlog (it will not replace the Blog) on YouTube within my project (Remastering MegaLoMania). I will record the first introduction video within the next days, so make sure to follow me on my social media channels to get informed.
In the Vlog I would like to share all learnings and progress I made day by day.

Thanks for reading!