Listening to packets with UDPServer
Welcome to our Godot Engine server scene! This scene is where our game’s server logic is implemented.
The server is the backbone of our game, responsible for authenticating players and providing them with data about their avatars, such as their name and texture file. This node is called Server
, and it has a pre-written script that includes some essential variables. Among them are two vital variables: database_file_path
and logged_users
.
The database_file_path
variable is the path to the FakeDatabase
JSON file, which represents a fake database that holds the players’ data. The logged_users
variable is a dictionary that stores players who are currently logged in.
These variables are crucial to our server’s functionality, and we will use them to authenticate players and provide them with the data they need.
Let’s implement the Server
node’s most important feature, which is to listen to packets. Proceed...