Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instances #11

Closed
Vrekt opened this issue Feb 2, 2023 · 2 comments
Closed

Instances #11

Vrekt opened this issue Feb 2, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request in-progress Feature or an issue is being fixed. network General network issues protocol protocol changes or issues world World related issues

Comments

@Vrekt
Copy link
Owner

Vrekt commented Feb 2, 2023

Instances within Lunar describes an interior that is networked. For example rooms, interiors, dungeons, etc. They exist within a world.

As such a few issues come up:

  • worldFrom should it still be loaded and receiving/updating data?
    • If not, when entering the instance it could be slow to load back in. This could be combated with a loading screen but may not be desirable.
  • Should probably intiliaze a new LunarWorld but a very barebones implementation to prevent too many resources being used from a simple interior.

Client Design

  • Simple implementation of LunarWorldSkeleton.
    • Separate box2d world and entity/player lists.
    • worldFrom should probably stop updating itself while in interior, implement some kind of lock/pause state for that.
      • (unless desired)
    • Network server should send packets indicating a player has enter the interior, not the parent world.
    • Possibly include a max player capacity for interiors (configurable) (eg. "This room is already full")
    • Will need interior spawn flag and events.
    • Once player leaves interior, keep the interior around in memory until they walk X distance away? (configurable)
      • Alt, X seconds after destroy, or, destroy immediately depending on how large the interior is.
    • If player gets within X distance of interior, load it in depending on how large it is? (configurable)
    • Remove player from parent world, once left, add them back.

Server Design

  • remove player from parent world. Once left, add them back.
  • Max player capacity for interiors. (configurable)
  • Only send the player updates from within the interior, not from whole world.
  • ...
@Vrekt Vrekt self-assigned this Feb 2, 2023
@Vrekt Vrekt added enhancement New feature or request world World related issues network General network issues protocol protocol changes or issues labels Feb 2, 2023
Vrekt added a commit that referenced this issue Feb 6, 2023
@Vrekt Vrekt added the in-progress Feature or an issue is being fixed. label Feb 6, 2023
Vrekt added a commit that referenced this issue Feb 6, 2023
Vrekt added a commit that referenced this issue Feb 17, 2023
@Vrekt
Copy link
Owner Author

Vrekt commented Feb 17, 2023

Current progress as of dcd18f6

  • Added base Instance classes that extend their respective worlds from client and server
  • Added protocol infrastructure to support entering instances
  • Added a new method for handling creating new Box2d bodies (EntityBodyHandler) and (EntityBodyCreator)
    • This allows for multiple bodies to be created for when entering instances and worlds

TODO:

  • We need to separate worlds and instances more, its all too cluttered and confusing to understand where data is going.
  • Server needs to be heavly refactored, janky and cluttery mess of code.
  • Instances need more work and implement the configuration values for them
  • Leaving instances, and other actions within them.
  • ...

@Vrekt Vrekt pinned this issue Feb 17, 2023
@Vrekt
Copy link
Owner Author

Vrekt commented Apr 12, 2024

Old.

@Vrekt Vrekt closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in-progress Feature or an issue is being fixed. network General network issues protocol protocol changes or issues world World related issues
Projects
None yet
Development

No branches or pull requests

1 participant