Is there a go to solution for multiplayer now?

A long time ago everyone use Photon, but now UNET been out for a time, is it mature enough yet? What people usually use for multiplayer game now? Does big company like Supercell share info on what they use?

Photon still blows UNET out the water.

Photon is like 0.05 cents per gig and Unity last time I checked was like 0.49 cents per gig.
I’ve never used UNET, I hate to say it’s bad, but Photon is still in my opinion the top dog in the scene.
If the price doesn’t get your attention I don’t know what will.

But from what I can tell, Photon has definitely gotten more advanced, even buying out Bolt. Even has now the option to use their relay servers for UNET, so you can still get the good cost effective pricing of 0.05 per gig.

What if I want to use my own server? Can photon do that?

I think so

Maybe there’s not a go-to solution in the same-way that there’s not a go-to solution for people wanting to make the next Facebook. If it was too easy to make a MMORG then they wouldn’t be worth making if you see what I mean?

A go-to solution for multiplayer does not make creating multiplayer game easy, the same way Unity does not make creating game easy.
All I want to know if photon have any competitor worth looking into now

Forge Networking looks good
but yeah … looks … i dont really know

but doesnt Photon have pay per concurrent users ?? and you have to use their servers or something? … seems REALLY LAME to me… but guess i dont know know for sure…
is offline LAN a thing your players could do if you use Photon??? … i dont think so… ???
i dont like the always online middleware BS Photon had … from what i seen when i tried to look into it…

pretty sure that was one of the main reasons the dude that made Forge made Forge … ?

Photon Bolt is a thing too… but i dont like the idea of Photon from what little i looked into so screw em, Bolt looked really good when it was owned by the dude that made it, but he sold it to Photon

but all said, if you were to use Forge, you’d have to rent servers from somewhere…

but the functionality I am looking for is LAN, and player to player connections they handle themselves, first and foremost
… i want my game to be able to be played, say 50, 100 years from now, if you were to assume/keep the same hardware, etc…

The best server will be always a server developed by you, specially for your game.
With a RTS game you have to manage 1000 units, buildings…
With a FPS game you have to manage only some units , synchronize animation, and weapons.

Photon, Bolt, Unet are for me just a solution for bad developers or no developers.

I created my server with System.Net.Sockets in a pool of threads, I can handle 1000CCU on a 5$/month Linux VPS or on a my Windows computer.

7 Likes

Photon has CCU to use their relay, matchmaking, etc. UNET is similar but more expensive.
Bolt is still “really good” :slight_smile:

For Forge you either need to use their master server for hosting and punchthrough, or host your own dedicated servers. However punchthrough fails fairly often, so your players will often not be able to connect to a host.

If you are looking for basic LAN functionality, pretty much everything but PUN will let you do that.

Bolt is also based off of .NET sockets, it took years to develop by a very skilled developer. Not everyone has the time and skill to do something like that, but if you do you probably have a leg up on most other Unity developers.

i dont know much about networking…
is Master Server … a required thing??
what is with the OLD games like say the original command and conquer?
it just does, you type in an IP address and thats all there is to it… ? i mean… theres DEFINATELY no master server still existing for that game, but it still works over the internet

i guess you guys are mostly focused on mobile multiplayer games??
iam more interested with making a timeless, totally (admittedly, stupidly) ambitious PC game

Photon sucked if you tried to use hundreds of photonviews, which is the default way of doing it.

Please share your knowledge and ability. Make it a product and sell it to developers who are not networking gurus. :wink:

2 Likes

I have no problem to share my knowledge, but I don’t want to sell my server code because as I already said each game need a specific server:
-RTS server will be different than a FPS server, and different than MMO server.
-MMO server needs to divide the world in 10 servers for example
-RTS server needs to use more Socket to manage more units
-FPS server needs to predict movement, calculate if a bullet hit a player, calculate the physics.
-Local server will be different than a web server
-Maybe you need encrypted data, maybe not(increase a lot CPU usage)
-Maybe you need to compress data, maybe not(increase a lot CPU usage but decrease bandwidth)

Then, if I sell my code, many hackers could find a solution to hack my system.
My RTS server use only 400 lines of code, and my FPS server only 350 lines.

2 Likes

I just realize I never think of C# as a language in Unity :slight_smile: Never stepped my foot too far outside of Unity’s dll and System.Collections. This looks like a great side project. Can you elaborate more on this? Do I create a .NET app as the server for Unity player client to talk to? Will the client work cross platform? Will Mono 2.0 Unity is using put any restriction to what we can do?

Edit: Unity use Mono 4.4 now. Shouldn’t make any different thought

You just have to create 2x C# class in Unity.

Server.cs where you have to create your System.Net.Sockets object + 3 methods .
-InitServer (create socket + bind the socket)
-PacketR (to read the socket)
-PacketS (to write in the socket)

ServerControler.cs where you process all data
In the Start you have to create a Thread and create your Server object, and call InitServer.
In the Thread you have to call PacketR and PacketS
In the Update you have to get and set all datas used in your Thread.
OnApplicationQuit , stop your Thread

My games work on Android, iOS, WindowsPhone, Linux, MacOS and Windows with the same server and client, so yes it’s crossplatform

3 Likes

I have heard many people say the same thing about Unity developers. I don’t agree with them.

Let people use what works for them. Small developers can get more done by using tech that is already available rather than developing their own stuff from scratch. It doesn’t make people bad developers if they want to focus on making gameplay rather than tech.

6 Likes

It seems to me that you see networking frameworks as a simplification for less experienced programmers while in fact you need to learn much more than if you just used a simple tcp socket.
This is because a socket only has Send and Receive functions that work the same way as Write and Read functions on files. While a framework like photon has several components and 10’s of classes that you need to learn and understand before you could make anything playable.

@zugsoft tried to explain how to implement this, but I doubt anyone will understand it unless they already know what he’s talking about. I’d advise that you google for Socket programming in C# on YouTube and see the actual working code.

If you need to calculate physics on the server then you’ll code the server in unity, because of it’s physics engine. Unless it’s simple enough physics that you can code it yourself. Otherwise create a .net or mono app.
Using unity app as a server implies a big overhead, so only use it if you have to.

Unity runs on mono, which is why it’s cross-platform. So if you use mono then your server will work cross-platform as well.

Unity uses Mono 4.4 COMPILER, which could not be less important. Unity’s version of RUNTIME is equivalent to .NET 2 (with some additions), but the Socket class was introduced in .NET 1.1, so you’re still covered here.

Game engines and networking frameworks are 2 very different things.
If you didn’t use a game engine you’d have to write code to draw each model from it’s vertices and textures.
But if you didn’t have a networking framework you’ll just have to serialize your strings and numbers when sending them, instead of having the framework do that for you.

1 Like

I guess it really depends on what you need to do. If all you need is a client to host an authoritative server with a number of clients connecting and playing together then you’re basically set to do it for free with UNET and its pretty stable (and easy) from what I have seen.

Rooms, matchmaking, dedicated servers, NAT, etc… All extra as services and from what I hear Photon still rules that department but Unity seems to be trying to build their own tools for that.

Networking - is very alien to me. I’m hear googling away on what seems to be common terms to ya’ll about networking for games, spending 60+ minutes a day just understanding the basics, in hopes of learning enough when I need it for a simple turn based game - to get the game setup correctly.
This is my schooling - for an artist - it’s like learning a difficult foreign language. One slow step at a time.

Off to google tcp socket. :wink:

Is a simple networking solution something that’s in demand for private server implementations?

If it is, I would be totally happy to make a simple server script and rake in some cash. Really, I would have no problem doing that.