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

Refactor/mutliplayer #326

Draft
wants to merge 30 commits into
base: develop
Choose a base branch
from
Draft

Refactor/mutliplayer #326

wants to merge 30 commits into from

Commits on Oct 6, 2022

  1. Improved multiplayer a bit

    * removed comas, as it is not maintained anymore
    * use pooled memory streams for less gcs
    * register IMapGenerator as it is required for the complex planet
    * fixed wrong nullability on package payload, as it  is nullable and shouldn't use the nullability helper
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Oct 6, 2022
    Configuration menu
    Copy the full SHA
    8ee72ec View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Started implementation of command line for server

    * so that we can have support for starting params and also commands
    susch19 committed Oct 17, 2022
    Configuration menu
    Copy the full SHA
    4101c25 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. Continued work on server command line functions

    * implemented start command
    * did a bit of cleanup in server main
    susch19 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    0e4290c View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. Refactor baseclient started

    * use tcp listener and tcpclient instead of sockets
    * moved to valuetask for less allocations
    * more or less removed some unrequired code
    * removed sync of packages in baseclient, because the async might not need this (atleast in our tests)
    
    Co-authored-by: jvbsl <[email protected]>
    susch19 and jvbsl committed Nov 2, 2022
    Configuration menu
    Copy the full SHA
    0091b1f View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Implemented stop command

    * to stop the simulation during running
    * added configurable  port for start with default 8888, so it's backwars  compatible
    susch19 committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    11a723b View commit details
    Browse the repository at this point in the history
  2. Fixed default port not working

    * because the set default value function seems to not work, so we use the action
    * fixed not compiling, because tcp listener doesn't exist anymore and was just wrongly rebased
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    101718e View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2022

  1. Replace container ressource manager with gameservice

    * because it now has the job to start and stop games
    * removed the old gameservice, as it had no references left
    * replaced planet with planet id at alot of places, because this way we can simplify column loading
    susch19 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    a208482 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. Fixed initializiation order for new gameservice

    * because of dependencies that were introduced by removing the ContainerRessourceManager resulted in errors
    * reworked extension a bit, to support the new initialization order
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    ac6ccb6 View commit details
    Browse the repository at this point in the history
  2. Reworked awaiter for future use

    * so we don't need to know the serializable during creation, but can assign it on the awaiter awaiting side
    * fixed issue, that octo game got disposed twice, because we added it to type container in the past
    * added a simple remove method for the type container, to remove octo game from it, so it doesn't get dispoed twice
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    f6a2ee9 View commit details
    Browse the repository at this point in the history

Commits on Dec 21, 2022

  1. Started refactoring of package management

    * because the network persistense manager shouldn't have to manage awaiter and packages
    * allow null as instance for awaiter, so the type information is atleast known for the generic, when the knownType is set this doesn't make any problems
    * removed nofication requirement from update hub, because we know want to sent more things over it like the real types required
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Dec 21, 2022
    Configuration menu
    Copy the full SHA
    1ec68ed View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. Added first version of the network action hub

    * by registering and storing the action to be called for a specific type
    * added response package flag, so we can distinguish between request and result on serverside
    * made a lot more methods to object, because we don't have a base type anymore for networking
    * added a new serialize method for INoosonSerializable, because we will slowly migrate to this interface
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    cb0d7da View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. Continued the work on multiplayer

    * correctly deserialize the Offical Command DTOs on Client side
    * added a workaround for the dto to always send the serialization id first, will be implemented correctly in the future, it was just a quick and dirty solution for the initial test
    * added possibility to overwrite the deserialize func in the awaiter
    * start the server correctly, by adding the disk persistance manager to the resource manager
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    1c448b6 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. made multiplayer work again with a few workarounds

    * by deserializing only notifications on client
    * don't send guid on who am i, because it doesn't get deserialized on server and resulted in errors
    * added more logging for packages
    * use only one log per day
    * start server on default, because entering start got pretty annoying
    * added new notificaiton package flag for telling the server that we don't want a response
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    3ab5ff2 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Fixed some more network issues

    * added a disconnect of the base client so we can react on this and clean up subscriptions and more
    * added the non sucking framework extension so we can use the enumeration modifiable list types
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    ab8a0d2 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. Integrated nooson

    * so that we don't have to write serialize and deserialize methods anymore
    * added nw interfaces for static serialize and deserialize, so that we don't always have to create the object beforehand, but can also use ctor args and more
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    381ea15 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. Continued work on multiplayer rework

    * fixed deadlock at some starts, because the connected event was invoked to late and therefore sometimes no subscription was present
    * reworked the official command dto processing on the serverside, so that we support different method signatures and also non return type methods
    * removed non used deserialize nooson and renamed the other one to represent the functio better
    * added more trace and error logs for better analysing possibilities  if something goes wrong during network communication
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    c8424ba View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2023

  1. Continued work on mutliplayer and type container

    * started differentiation of notifications and other packages, so that these can be processed optimaly
    * removed the octo type container in favor of the non sucking framework type container, because this is maintained more and is optimized
    susch19 committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    5a52528 View commit details
    Browse the repository at this point in the history
  2. Send network via instance component

    * because it shouldn't be done via simulation and also not in the specific component itself, only in the base, as this has all the requiered information
    * added helper method to register all serialization id types of an assembly
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    ec4129f View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Fixed entity notification transfer

    * by relaying them on server only when the instance is managed on the server
    * added workaround for nooson component list deserialize, because it matches incorrectly with generic on class
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    3a77602 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Configuration menu
    Copy the full SHA
    9f300c8 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. Added possibility for syncing more data

    * send components after change
    * send entities after subscribing to chunk column
    * only send entities to simulation when local persistance manager is active
    * added new interact service, so that we don't have to have the interact logic inside the entities
    * added new components to support the interact without typing
    * added component container to every component, because they can always only be in one container at a time and this way some features are way easier to implement
    * send planet during login, because get planet might timeout otherwise during adding entity to simulation
    * added support to send anything serializable over the network
    susch19 committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    37fe501 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Reworked Components and network communication

    * added globally unique id to components for better identification via network  transfer
    * added verison to all components, so we have an easier and unified way of detecting changes
    * reworked component list to support multiple components of the same type, because now the id is the unique part, so that container components arent always required for things like furnace inventories
    * added serialization ids for all components that are serializable, because this way we don't have to send the full unique type name via network
    * add all types with serialization id on startup from all dlls, so we don't have to register them manually and forget some in the process
    * added convenience method for deserialization and serialization of serilaizables for network usage, so that we don't have to do the same serialize process all over again at different places
    * added the Simulation to the component container, so we always know in which universe it is currently active
    *  turned SerializationIdTypeProvider into static, because the ids are globally unique and not just per game
    *  added global component list into simulation so that we don't have to iterate over the different component container just to get one specific component
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    6ae16dd View commit details
    Browse the repository at this point in the history
  2. Moved the component change handler outside of the handler

    * because is doesn't belong there and was only temporary inside their
    * fixed update hub still having client id,  even though we removed the methods for it
    * added new Network to a waiter, so we can use the network deserialize function instead
    susch19 committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    a3aa566 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Fixed singleplayer with unification of game start

    * because the id manager was not registered and by doing everything via a central method it will be registered in the future and further changes regarding these things will be for both starts aswell
    * added remove mesage for entitites, so other players see the leaving player leave
    * preemptively added open to lan button for when we have the motivation to implement it
    * move some classes to network from game manager, because these will be required for the open to lan functionality in the future
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    8da3935 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. Implement a simple chat

    * Add control from jvbsl to ensure we can show diffrent messages that we received
    * Implement a chat notification that we can send from client to server and back
    
    Co-authored-by: susch19 <[email protected]>
    Co-authored-by: jvbsl <[email protected]>
    3 people committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cbcc926 View commit details
    Browse the repository at this point in the history
  2. Fixed bugs in chat

    * fixed enter opens chat on second press instead of first one, because it was not opened corectly and we only use activate for the hotkey, so we don't need to have a distinction between visible and not visible, because we always turn it visible
    * add name to player, so we can use it in chat messages and maybe later on at different locations as well
    * Turn entity to player in PlayerComponent, because only the player should be contained in there
    * centralized the logout method, so that we can close the connection to the server if required and reduce the amount of code duplication
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d04fccb View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2023

  1. Fixed base client connections

    * because we accidentally blocked the low level read write thread pool  with the async Task instead of Task.Run
    * use seperated send queue, so we don't have problems with multi threading
    * added simple test for create and send package, to try to reproduce a problem
    * removed old and unused tests
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    53e6e6d View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Centralized the serialization id attributes

    * so one doesn't have to search throught the whole project to find the next free id, this may be replaced by a generator in the future, that's why the empty serialization id attribute is still present
    * removed some deprecated todos
    * fixed some todos and hacks
    
    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    5393a68 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Configuration menu
    Copy the full SHA
    38cd67d View commit details
    Browse the repository at this point in the history
  2. Merge branch 'refactor/baseclient' into refactor/mutliplayer

    Co-authored-by: Marcus Aurelius <[email protected]>
    susch19 and Gallimathias committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    feac0e8 View commit details
    Browse the repository at this point in the history