• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Design Battle Royale in GM:S

I'm interested in creating a (2D) battle-royale style game. I've only ever dabbled in online multiplayer before. I have a few questions:
  • What are some things I'm going to have to deal with in GM regarding online MP compared to other engines/languages?
  • How should I handle the server? Would it be best to have the server written in another language and only the client written in GM?
  • What are some common pitfalls with beginners using GM networking, and how can I avoid them?
 

Pfap

Member
I think determining how "real-time" you need the network operations to be would be a good starting place. What is the maximum amount of latency you can deal with in your game? The networking design should be easier if you design the game to be forgiving as possible when it comes to latency. For a battle royale style game you might be able to use a database like Redis to maintain the play state.

If you are building a mobile based game network sockets are pretty much off the table, so you will have to find some creative way to make your game stateless. Which is a good idea in general when dealing with mobile networks I suppose.

The server should definitely be written in a different language whatever you are familiar with should be fine, again depending on your latency requirements I would recommend Node.js or Golang. I've heard good things about Golang being really fast and Google pretty much designed it for networking and a lot of the clouds have sdks for it, also the documentation seems pretty good. I really like Node and the node package manager though and javascript is everywhere, so it's a useful language to know.

The topic of networked games and other languages and ways to design things is really broad, so answering your question is kind of difficult.

If I were to build a mobile 2d battle-royale game I would set up a local node server with a Redis instance and just start prototyping with that and see how it goes. Deciding exactly how to structure your data would then be the next step.
I'm working on a game where I have the data structured into JSON lists for being sent over the network.

Code:
var send_list = ds_list_create();
   // add data here
   ds_list_add(send_list, direction_locker);
   ds_list_add(send_list, net_startx);
   ds_list_add(send_list, net_starty);
   ds_list_add(send_list, x);
   ds_list_add(send_list, y);
Each move takes 5 "pieces" of data to perform and the above data is sent to the other client. You can use as little or as many "pieces" as you need per list, but the more you can have the client handle the less you will need to send over.

If you need any other help or something more specific I'm pretty happy to help when I have the time and if I'm able. I should probably state that the above is just some stuff I hacked together and probably not efficient at all, but it works.
 
I'm interested in creating a (2D) battle-royale style game. I've only ever dabbled in online multiplayer before. I have a few questions:
  • What are some things I'm going to have to deal with in GM regarding online MP compared to other engines/languages?
  • How should I handle the server? Would it be best to have the server written in another language and only the client written in GM?
  • What are some common pitfalls with beginners using GM networking, and how can I avoid them?
Add me on discord N_George#0733
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Add me on discord N_George#0733
You should consider providing convincing arguments or some kind of explanation as to why you want someone to add you on Discord - as far as I can tell, most of your online presence consists of telling people to add you on Discord.
 

Yal

🐧 *penguin noises*
GMC Elder
They should also consider not reviving a topic that's been dead for over a year... when this much time has passed, chances are the original poster either gave up on the project or solved all the problems already (and if neither of those happened, you probably don't want to get dragged into their project full of 1 year's worth of bugs and incomplete solutions...!)
 
Top