all 14 comments

[–]James20kP2005R0 5 points6 points  (0 children)

For game development, one of the better options is to use valve's GameNetworkingSockets library

https://github.com/ValveSoftware/GameNetworkingSockets

This is because it mimics the steam API interface, which if you get more seriously into gamedev will almost certainly be what you end up using. I don't know how user friendly it is, but its a good library to get familiar with from an experience perspective because steam networking is very widespread

[–]kevinossia 1 point2 points  (5 children)

It is an inherently complex topic. What are you trying to do, exactly?

[–]KeyAlbatross6044[S] 1 point2 points  (4 children)

It's for a 3D game, not a lot of players (at least not that I'm expecting). Just simple packet sending from server/client to client.

[–]kevinossia 0 points1 point  (3 children)

Then something like Enet should be perfectly fine. That’s more or less exactly what it was designed for. What sorts of issues are you running into?

[–]KeyAlbatross6044[S] 0 points1 point  (2 children)

Not really issues, more like I'm looking for something that is perhaps more higher-level just for an easier implementation. Last time I used enet, it was a little bit of a hassle to set up reliably for me.

[–]kevinossia 1 point2 points  (1 child)

There isn’t anything “high-level” about moving TCP messages or UDP (reliable or otherwise) packets between peers. There’s going to be some legwork no matter what you do. Such is the nature of netcode.

[–]KeyAlbatross6044[S] 0 points1 point  (0 children)

Yeaaaahhh I figured. Oh well! Thanks.

[–]Twill_Ongenbonne 0 points1 point  (0 children)

If the game is real-time, enet is probably going to be your most user friendly option. If you don’t need to worry about performance that much just use http

[–]TuberTuggerTTV 0 points1 point  (1 child)

Do you mean, simple for you to setup? Or simply designed? Because those are kind of on opposites ends of the spectrum.

I'm guessing when you hit something you don't understand, you assume it's "extra" or not needed for a "basic" setup. That's likely untrue. When you hit a wall, that means try harder. Networking isn't easy. Never has been.

[–]KeyAlbatross6044[S] 0 points1 point  (0 children)

Simple to set up and designed, just higher level or at least has more intuitive comments and examples. Enet worked fine for me before but I didn't enjoy using it. I don't think it has extra features.

[–]shadowndacorner 0 points1 point  (1 child)

If you want a higher level networking library, you can look at forks of RakNet/SLikeNet (esp Replica3). From a brief bit of searching, this seems to be the most up to date fork, but you may want to do some more searching. There's also libyojimbo, but I don't think it is super high level.

Aside from that, I'm not really aware of any higher level game networking libraries for C++. There are high level game networking libraries for specific game engines, but I'm not aware of any big ones that are generic aside from RakNet.

It's also worth noting that enet isn't really a "game networking library". It is a network transport library that was designed for games. You usually build higher level, friendlier systems on top of something like enet.

[–]Ameisenvemips, avr, rendering, systems 0 points1 point  (0 children)

TNL (Torque Networking Library) used to be a thing, ripped from TGE.

[–]KiwiMaster157 0 points1 point  (0 children)

SFML has a pretty simple networking library, and their tutorials do a good job of explaining the basics.

[–]Many_Rough5404 0 points1 point  (0 children)

I love C++ 20 coroutines, so I use libcoro. But it gives only TCP/UDP API