🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Which network model should I take for a hobbyist small project?

Started by
9 comments, last by 8Observer8 5 years, 4 months ago
 
Hi, I am in the planning phase of making a small project that’s designed mainly for multiplayer. A top-down pixel art party game that support 6 player.
For a multiplayer game I would have to design the game base on that from the beginning.
Since I don’t have much knowledge on networking, I’m trying to find the easiest solution possible.
Here are few of option I can think of but can’t decide.
1.GMnet - This seems pretty easy but I’m not sure, should I switch engine to GM just for this purpose?(I don’t need 3d anyways)
2.LAN - Is it possible to implement a Virtual LAN model Like how GameRanger/Garena/Hamachi works but has it built-in in the game itself and make a UI that player could access to my own matchmaking server? If possible how hard is this option, is there any asset that could make this easier?
3.Network Engines like Photon – This is way too costly for a free hobbyist game.
Advertisement

You didn't say anything about your general level of experience with programming.  But if you don't have much general programming experience I would suggest sticking with a pre-built solution.  GMnet seems like the easiest of the above choices to see some return on.  And, yes it looks like it will only work with GameMaker.

I strongly recommend reading everything that relates to multi-player gaming on this site: https://gafferongames.com/

Even if it's not directly related to what you are doing, the explanations and diagrams they use are top notch.  They will give you a much better understanding of the task you have ahead of you, and may help you make a more informed decision about which route to take.

Best of luck!

 

Thanks for reply.

 

Indeed i do not have much programming experience,i came to game design as an artist,and trying to make game just for hobby.GMnet seems very interesting to me that its a network engine that doesn't require code.I was making my game with Unity using playmaker asset(which does not need coding). I think i should consider change to Game maker instead.

 

By the way,if i were to learn coding,specific for game development(not general programming,ust for game),what course should i take so that i could save time?

There are several kinds of game coding, really.

There's engine coding, which builds "networking" and "graphics" and "sound" and "art tool plugins" and so forth, typically in C/C++.

There's "scripting" coding, which builds GUIs and game logic and so forth, typically in some scripting language like Python/Lua/Blueprint or something like it.

There's "shader" coding, which builds the specific 3D light/shadow/material solutions, typically in shader code like GLSL or HLSL or in shader graphs for specific engines.

Even within each of these kinds, people often end up specializing as budgets go up -- there are people whose only job is to make fire and smoke shaders for FPS games!

So, "which kind of coding" should you learn? It depends on what you want to do, and which game engine you're using.

By the way, the simplest possible networking model for a party game that's only played on a local network, is to have each player send their actions 20 times a second using a UDP broadcast packet to a known port. Make each game client listen on the same port, and assume that any packet received is from another player. This would make it trivial to cheat, but party games aren't particularly susceptible to this. And the cool part of this is that there's no match-making needed, no server needed, no set-up needed. Just start the game, and you end up joining in with everyone else!

 

enum Bool { True, False, FileNotFound };

I think the simplest network model is to setup a TCP server that receives input from the clients, processes it locally and only tells the clients what to update or to show. Turn based games or maybe even some slow paced games would work.

Once you have a simple game like that with TCP, try to get it working with UDP, you'll see it's a different kind of beast (even for people with programming experience).

12 hours ago, hplus0603 said:

By the way, the simplest possible networking model for a party game that's only played on a local network, is to have each player send their actions 20 times a second using a UDP broadcast packet to a known port. Make each game client listen on the same port, and assume that any packet received is from another player. This would make it trivial to cheat, but party games aren't particularly susceptible to this. And the cool part of this is that there's no match-making needed, no server needed, no set-up needed. Just start the game, and you end up joining in with everyone else!

 

Hi hplus0603,Is it possible to making this LAN model playable online?

No, for online play you need a client/server architecture.

Go with an existing game engine that has networking built-in would be the easiest.

In general, gameplay implementation needs to take networking into account from the ground up, it's not usually possible to "bolt on" networking afterwards, which is why using an engine with networking from the start is a good idea.

enum Bool { True, False, FileNotFound };

Thanks hpplus0603 and everyone else,i know where to start now

Just a quick update to this thread for anyone still looking for a viable networking solution, GameSparks is free and works well with Unity and Uneal

On 12/29/2018 at 6:17 PM, starforce2005 said:

I’m trying to find the easiest solution possible.

You can find free hosting with Node.js and use WebSockets or SocketIO library. You can find a lot of tutorials. You can use it with Unity. It is the simplest way to publish your game server for free and test it in real time with a real latency.

This topic is closed to new replies.

Advertisement