Networking plans and scalability?

Community Forums/Monkey2 Talk/Networking plans and scalability?

Richard Betson(Posted 2015) [#1]
Hi,

Boy if I had to ask for one thing that I know I would use as well as others is a nice networking framework. I am looking at this from the stand point of having already developed a server and client using BnetEx which really allows for flexibility in it's approach and a smooth language integration. I know a similarly equipped framework would be welcome by more then a few here.

What do you have planed for networking? Will it handle large scale MMO UDP implementations?

Hoping for a path that makes sense and offers more then basic sockets.
Thanks,


Richard Betson(Posted 2015) [#2]
Hi,

I will bump a bit here and suggest Monkey embraces a standard such as Enet or other library. The basic problem with Monkey-X is the lack of viable networking interface that allows for packet management, CRC, and serialization (as far as I know). This is a big reason why I am developing my game MMO project in BlitzMax as there is no real networking option in Monkey-X. IMHO this is where Monkey-x fails to deliver and limits development to one-off non-networked games.

The viable approach I guess would be to embrace Enet for Monkey2. Enet is supported in BlitzMax and supporting it in Monkey2 would provide continuity across the two languages. Since the targets are now limited to desktop, Android and IOS it should be doable. There are other options even "rolling your own". For me an option like BnetEx is ideal where there is no server or client instead a nice data stream with integrated data types.

So I hope this issue gets addressed as it is one thing that just stifles development in Monkey for me.


JoshKlint(Posted 2015) [#3]
Enet is simple and straightforward. If you're serious about a commercial game though, you will need NAT punch-through. The only options there are Recast and Steam networking. I guess there is also something called JingleLib? Good luck figuring that out and testing it.

I think ENet is great for a basic implementation, and it is more consistent with the Blitz way of doing things.


Richard Betson(Posted 2015) [#4]
If you're serious about a commercial game though, you will need NAT punch-through

I think that you can accomplish 'hole-punching" with Enet. Basically all UDP hole punching does is a client contacts a server with a port inbound to server. The server uses that port as a new outbound from server and new inbound port to client. As long as the server keeps steaming over that port it will be open as an inbound port to client ( UDP ports are bidirectional ). Essentially the server is using the port the client used to contact the server as inbound port to the client. The only caveat is that the actual port number will be assigned by NAT.

EDIT- That dose bring up how robust a networking library to use. Raknet is an awesome way to go.


Nobuyuki(Posted 2015) [#5]
Anyone hip to RakNet? It would be nice to have better Steamworks integration; modern games don't expect users to know the first thing about networking, only that they want to press a few buttons and play with their friends. RakNet provides a Steam back-end to help facilitate that, though IDK if Steamworks is a dependency for building (I somehow doubt it, since that would require signing an NDA)

RakNet is free as long as you're not targeting a console -- if you are, prepare to pay a few grand for it...


Richard Betson(Posted 2015) [#6]
RakNet is free as long as you're not targeting a console

As I recall Facebook bought Raknet so I guess the license has changed and it looks for the better (I'll take a look). Since the out of the box targets for Monkey2 are non-console it might be a god fit license wise. Definitely in favor of Raknet as the Monkey2 network option and since support exists for Raknet in BlitzMax Raknet would provide some continuity. The other issue would be integration of the Raknet framework into Monkey2. Mark's stated POSIX'ish design goal would I think lend itself self to supporting something like Raknet.

Edit- This is a good spot to add that really, I would Ideally want to port and support Monkey2 as my base development language as opposed to BlitzMax. Development of Monkey2 has to deal with the issues that keep me and others rooted in BlitzMax.


Richard Betson(Posted 2015) [#7]
It does at first blush appear that Raknet is FREE to use for Monkey2 targets.
http://www.jenkinssoftware.com/pricing.html

Raknet is probably the best choice and would provide a well rounded and capable networking library. Personally the quicker this issue is determined the better. I'm currently stuck in development of my game because there is no clear path for networking in Monkey-X and now Monkey2 (although way early to announce that I guess). So I am in a situation where I have a working server and client in BlitzMax but because the lack of a networking library (Enet, Raknet, whatever) in Monkey-X there is no path to move forward. This will not do and truly if Monkey2 is going to compete in today's coding world access to networking beyond simple sockets has to be adopted, else you end up with Monky-X's state of affairs, simple games and applications with none of it that impressive. Solid networking is a lure for professional development.


Richard Betson(Posted 2015) [#8]
Looking over Raknet on Github.
https://github.com/OculusVR/RakNet

It sure has grown to include quite a lot now. Another interesting thing to look at is Oculus support, although niche something to ponder on. :)