Code Monkey home page Code Monkey logo

Comments (2)

elementbound avatar elementbound commented on September 15, 2024

Ok so If I read you right, the proposed fields are:

  • Player ID
  • Session ID
  • Joined at tick
  • Avatar

I'll consider these given the way netfox is structured:

  • netfox itself is the core, with features that are required for responsive multiplayer sync, that you can't live without, e.g. RollbackSynchronizer, StateSynchronizer, etc. Also provides base classes for higher-level things ( like the tick loops or interpolators )
  • netfox.extras has features that can be useful for some games, like weapons. They may not be needed for every game ( in contrast to synched time for example ), but people can optionally download and use them if it makes sense for their game.

The other two addons are not important in this discussion atm.


Player ID

This is pretty much game specific - some games need it, some don't. For example, Forest Brawl doesn't need it either, even though it has a score board. I wouldn't include it in core, as it would introduce another concept that is barely different from what Godot already provides. If we want to refer to specific peers, Godot has the peer ID's for those.

In some form, it might make sense to be included in netfox.extras.


Session ID

This is extremely game specific. And even then, the server can generate a random ID and share that with peers as they join. Of course, I understand that it would be best if netfox just had everything out of the box :) But atm I don't see a session ID needed frequently enough to warrant it being implemented.

With that said, I'm happy to include it if there's considerable need from the community.

session_id is useful for the server, to store replays, or save files.

In that case, the replay system can manage the session ID :) Not sure what you mean with save files though.


Joined at

is required for the replay system, and for implementing state diffs

I imagine the replay system as its own, separate thing, that extracts all the data it needs from netfox's other APIs. However, I'll check your state diff PR to see how it relies on this data. Until then, consider this being considered :)


Avatar

Again, game-specific. Some games have avatars, some have lots of units moving around, some have things with shared control, etc. Similarly to Session ID, definitely wouldn't include in core, maybe in extras if there's need for it.

Another example for it being game specific, is that games may handle player concepts differently. For example in the game I'm currently building, I started off with an Avatar(-adjacent) concept, but eventually I'll move to Players who join games, and who have avatars. So the local avatar is not very useful, the local player is. And for that I'd prefer my own system.

This is not to say that nobody would prefer a system provided with netfox.extras, just that I have an example :) Anyway, I'm open to people commenting on this, whether this is something they'd find useful or not.

from netfox.

TheYellowArchitect avatar TheYellowArchitect commented on September 15, 2024

Yes, this isn't meant to be in the same level as NetworkTime and other crucial components. It's for Netfox.extras.
joined_at is unused thus far, but it was useful for my specialized use-case so I had to bring it up. Though I wouldn't suggest it in its implementation because it bloats the code a lot, so I now argue against it instead for it :P

Avatar, yes, you are right, that's why it's just 1 line in the OP 😅


To synopsize, basically the PR #269 to be implemented in Netfox.extras (assuming the ID thingy is settled)

from netfox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.