Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

​Last on Land: Devlog #3 - Steam Network Lobbies

A topic by DawnsCrow created May 25, 2020 Views: 450
Viewing posts 1 to 1

Last on Land: Devlog #3 - Steam Network Lobbies

Networking Options:

The Godot engine provides very useful but somewhat basic high level networking options built right into the engine. This is very helpful and easily functional using simple RPC master and puppet calls in order to replicate in game situations across all users connected to a game server. This was my first trial of game networking with Godot in which I got basic player an map replication working allowing two separate players to see each other move around the map and also see the tiles they have shot get removed from the map, this forms the base for the in game networking that is being developed with more on that coming in a later devlog. The main issue with this built in high level networking is the hosting of and inviting to servers, as this method required direct IP connecting meaning anyone wishing to play with friends would need to send over their IP address and most likely would need to port forward the port they wish to host on. This method obviously is not ideal and in my opinion is quite simply not an acceptable method of playing with friends. The end goal is to get this game on steam so I thought why not just look into Steamworks integration for Godot sooner rather than later and so after doing some research I discovered the GodotSteam module by Gramps (GodotSteam Github repo).

Steamworks Integration:

The first stage to using the GodotSteam module was to download both the latest stable branch of Godot 3.2 and GodotSteam, then compile the engine with the GodotSteam module and the Steamworks sdk compiled into the engine code, then using this new Godot compile I could generate the export templates which allows my game export to utilise the Steamworks functionality.

With the GodotSteam module fully integrated into the Godot engine the Steamworks functionality can now be used and the first thing is to have Steamworks initialise itself on the games load, once the initialisation is complete the game will perform a quick check to make sure the user is connected to a steam account and if the connected user has access to the game (game has been purchased). If either of these are not true then the game will terminate.

If the user is connected and is permitted access to the game then the game will grab the Steam ID and current Steam Name of the connected player.

Lobby System UI:

The lobby UI was designed to be clean and concise, providing all the information and functionality without the need to jump through several menus. The main menu will likely contain a few options one of which (Play) will lead to this scene providing the ability to create and join lobbies. The UI is currently plain and rather bland but this is simply for testing purposes. Although the UIs layout will likely remain relatively similar to its current state varying slightly over time the look and feel will be updated as the games UI gets a theme design.

Lobbies and Chatting:

With the Steamworks integration users can now use this lobby menu. At the top right of the screen the users Steam Name will be displayed, users can create lobbies providing a lobby name if they wish, this lobby will then show up in a lobby search (at a later date users will be able to set their lobbies as private or friends only), with a lobby created users will be able to use the steam overlay to invite their friends or friends will be able to join as long as a they are currently in a lobby. The players menu on the left displays the current number of players in the lobby as well as displaying the names of the users in a list. The main Lobby display in the centre shows the user lobby related information such as players joining and leaving as well as being the chat box for players in the lobby to communicate while waiting for the game to be started.