5 ms·
I'm thinking to add online multiplayer to my game: http://store.steampowered.com/app/363670 http://store.steampowered.com/app/363670 ...so this was very intere
by babuskov 11y ago
I'm thinking to add online multiplayer to my game: http://store.steampowered.com/app/363670 http://store.steampowered.com/app/363670
...so this was very interesting read. I investigated a little bit, and found that there are more protocols than just pure UDP, and now I can't decide which one to try. I narrowed it down to these three:
* PCC http://modong.github.io/pcc-page/ http://modong.github.io/pcc-page/
* NORM http://www.nrl.navy.mil/itd/ncs/products/norm http://www.nrl.navy.mil/itd/ncs/products/norm
* ENet over UDP http://enet.bespin.org/ http://enet.bespin.org/
What do you think?
- Mithaldu 11y agoSince your players don't seem to be affecting each other a lot, you might even be able to go with simple TCP. UDP is needed when latency matters a LOT, which is mainly when people fight one another.
- TazeTSchnitzel 11y agoI believe World of Warcraft and some other MMORPGs use TCP, since latency isn't too big of a deal. Note that they do some things to compensate for this, however, like making players not collide with each other.
- deleted 11y ago[deleted]
- corysama 11y agoI've worked with enet and I'm a big fan. It is definitely well suited for games. I'm not familiar with the other two. A non-obvious feature of enet is that you can create two channels on a single connection then send permanent info (item 3 has been collected by player 2) reliably on one channel and send short term data (player 2's position is xyz) unreliably on the other channel. The point is that the packets with a channel are ordered but different channels have separate timelines and retry queues. That means even if a reliable packet needs a lot of retries and takes long time getting through, it won't stall the packets on a different channel.
- highCs 11y agoENet is precise, bug-free and easy to use. There is a python version [0] as well which I find usefull server-side. Love it. [0] https://github.com/aresch/pyenet https://github.com/aresch/pyenet
- BatFastard 11y agoIf your target market is gamers at HOME. Then ENet is a good way to go. Of the three different ways 1) Custom Protocol - Great, but the internet doesn't support it. So this is not viable. 2) Defined Protocol - Again, even though there is a spec for this protocol, if you try to use it you will find its not well supported, meaning its going to work intermittently or slowly at best, at worst not work at all. 3) Supported Protocol with added layers. This looks like your best bet, they just add a reliability layer on top of UDP (done that myself). The reason I eventually abandoned UDP on my project (a virtual world) was I needed my app to work within corporate environments, and many corporate routers do NOT support UDP with out IT departments support.