124
submitted 10 months ago by Dasnap@lemmy.world to c/games@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] Croquette@sh.itjust.works 9 points 10 months ago

I'm not a game dev, so I am asking naively this: why is networking code for games not standardized?

It's crazy to me that so many companies develop their own netcode instead of pooling resources to create a library once and for all for netcode.

It is a non-trivial thing to develop, so everyone would gain from having a framework and library ready to use that works well and can be implemented into any game.

In the end, the information exchange is done between the client and the server and the application layer can have any packets it needs.

[-] ampersandrew@lemmy.world 12 points 10 months ago

There are just a ton of ways to skin that cat. You can do things like object replication, where the server is authoritative and sends updates states to every player, but even then, you might want to have something like aiming in a 3D game done locally so that it feels responsive and then update it with the server's understanding of what's possible just in case things get out of whack. In the fighting game space, there's rollback, where each player has a complete up to date simulation of what the game is doing, and they only send inputs back and forth; then if something is out of date, it resimulates the last couple of frames, invisibly, until it's done catching up, all within the span of 1 frame. However, this approach tends to be less graceful when it comes to people coming and going, because you need to synchronize the game state before you start sharing information back and forth. The network infrastructure for something like Dark Souls, where you're dynamically pulling in players, messages, and recordings of players' ghosts, will be different still. I don't think there's a one-size-fits-all solution, but the most common ones do tend to be available in one-size-fits-most.

[-] MurrayL@lemmy.world 7 points 10 months ago

There are prebuilt solutions in some common engines, and companies like Multiplay that will help with development and hosting, but ultimately it depends on the specific needs of each game.

What works well for one project might be overkill for another, so studios have to spend a lot of time figuring out their needs and building something bespoke for it.

this post was submitted on 07 Aug 2024
124 points (96.3% liked)

Games

39916 readers
406 users here now

Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.

Rules

1. Submissions have to be related to games

Video games, tabletop, or otherwise. Posts not related to games will be deleted.

This community is focused on games, of all kinds. Any news item or discussion should be related to gaming in some way.

2. No bigotry or harassment, be civil

No bigotry, hardline stance. Try not to get too heated when entering into a discussion or debate.

We are here to talk and discuss about one of our passions, not fight or be exposed to hate. Posts or responses that are hateful will be deleted to keep the atmosphere good. If repeatedly violated, not only will the comment be deleted but a ban will be handed out as well. We judge each case individually.

3. No excessive self-promotion

Try to keep it to 10% self-promotion / 90% other stuff in your post history.

This is to prevent people from posting for the sole purpose of promoting their own website or social media account.

4. Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts

This community is mostly for discussion and news. Remember to search for the thing you're submitting before posting to see if it's already been posted.

We want to keep the quality of posts high. Therefore, memes, funny videos, low-effort posts and reposts are not allowed. We prohibit giveaways because we cannot be sure that the person holding the giveaway will actually do what they promise.

5. Mark Spoilers and NSFW

Make sure to mark your stuff or it may be removed.

No one wants to be spoiled. Therefore, always mark spoilers. Similarly mark NSFW, in case anyone is browsing in a public space or at work.

6. No linking to piracy

Don't share it here, there are other places to find it. Discussion of piracy is fine.

We don't want us moderators or the admins of lemmy.world to get in trouble for linking to piracy. Therefore, any link to piracy will be removed. Discussion of it is of course allowed.

Authorized Regular Threads

Related communities

PM a mod to add your own

Video games

Generic

Help and suggestions

By platform

By type

By games

Language specific

founded 2 years ago
MODERATORS