Developing a multi-player game - How should I approach this?

Recently I have started to work on a multiplayer game in Libgdx with the help of AppWarp. Now, this is my first time in the multiplayer scene. I have developed several games in Libgdx but none of them had a multiplayer feature.

From a general aspect, how should I start working on it? Should I start with the core engine(the game itself) and then adding the multiplayer or should I do the opposite?

If I may, I would like to hear some experienced developers who have experience with such game Smiley

P.S The game is going to be in real time. It’s some sort of a race game.

What’s with the double post?

a way to get the post ignored.

“Some sort of”? I recommend you to first think about the game itself rather than mechanics.

If you have to ask yourself “How would I go about doing xyz” before you have even tried anything, then you are not even remotely ready to attempt what you are trying to do.

I suggest making a game with single player then add multiplayer.

A few month ago i had an idea about a multiplayer game and i also did not know how to start.
I then decided to create a singleplayer game out of the idea, just to make sure, i am able to implement the game mechanics.
As soon as i finish that game (will take a while :P) i guess i will rewrite the whole game (with some copy+paste), with multiplayer in mind, as it will change a few things.

So basicly i started with the “core game”, just to know how to implement that things.
Then, when i start with the multiplayer, i will start with thinking about the structure. There are a few ways to implement multiplayer, you need to be sure what exactly do you want.
So you need to ask yourself:

  • Who handles the logic (clien or server)?
  • How the data will be sent (UDP or TCP)?
  • What data will go in which direction (client to server and server to client)?

The implementation of the game mechanics will depend on the answers to those questions, for example, if the server handles the logic, the client will just send it’s input, no real logic needed.
If the client handles the logic itself, the server will only foreward and check the data he gets. So the server doesn’t really need much logic.