GithubHelp home page GithubHelp logo

revenantx / liteentitysystem Goto Github PK

View Code? Open in Web Editor NEW
185.0 6.0 21.0 4.66 MB

Pure C# HighLevel API for multiplayer games

License: Apache License 2.0

C# 99.96% Batchfile 0.03% Shell 0.01%
csharp game-development litenetlib multiplayer udp dotnet gamedev mono unity

liteentitysystem's People

Contributors

chrisnobrega avatar logerfo avatar revenantx avatar s-rayleigh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

liteentitysystem's Issues

Can't get entity previously constructed during the same client tick

ClientEntityManager#Deserialize(byte*, int) calls ConstructAndSync(true) only after constructing every pending entity, which is a problem when my entity constructor calls GetEntities<T> looking for a previously constructed entity during the same client tick. Would it be possible to sync every time after constructing each entity? I cannot postpone entity search because it's a dependency for Sync vars, which should be readonly! Am I using a bad practice here? Am I suppose to achieve the behavior I want in a different way?

RefMagic on Android + .NET

Hello! I'm having mostly a good time integrating with your library, thank you for making it available!
But now I'm having problems with it :(

I have a game client that runs fine on Windows. Now I'm trying to run on Android and I'm having trouble with RefMagic. Do you have it documented anywhere, by the way?
First of all, Utils.IsMono doesn't seem to be enough for the conditional RefFieldValue call. Check if what I'm doing makes sense:

public static readonly bool IsMono = Type.GetType("Mono.Runtime") != null
                                  || RuntimeInformation.OSDescription.Contains("android");

After that, I'm getting the following error:

[libc] Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x40 in tid 23914 (.Client.Android), pid 23914 (.Client.Android)

Does this look like anything to you? I debugged it and it's not the first call that fails, but one of the first ten. I tried to move only this specific crashing call from RefFieldValueMono to RefFieldValueDotNet (probably insane) and got "arith type mismatch" (as expected). I also tried adding IntPtr.Size to the offset for this specific crashing call only, which passes the breaking point, but the returned reference is null, so it crashes somewhere else at call-site.

By the way, I'm running the last version of MonoGame on .NET 7 and x64 everywhere, but I've also tried every architecture I could and the repro seems the same. I'm using an Android emulator.
Thanks!

Matchmaking servers

Right now, this library doesn't seem to have a good support for matchmaking, because the server allocates memory beforehand for each one of the maximum player number, which restricts this very same maximum number, right now at 255. Also, each match being hosted on their own server means that each match allocates one UDP port. Because of those reasons, although It is possible to host a matchmaking server, they tend to scale poorly.
I think it would be a good idea to implement a real support for matchmaking. Much of the server load can be lifted considering that the matchmaking only needs one entity per player, always of the same type. And, of course, everything have to be not pre-allocated. And more scaling-oriented implementations could be considered.
Another feature that would probably be a rewarding effort is to allow the matchmaking server to act as a relay, so only one UDP port gets allocated and players are restricted to their matches more easily.

Host migration

Implement support for automated host migration(if the host player disconnects, another client will take over server role)

прости, что пишу таким способом. иначе не знаю как с тобой связатся

использовал chat gpt чтобы узнать о создании сервера для archeage. оно мне предложило репозиторий archecore. но этот репозиторий уже удален. благо ии имеет доступ к старым данным и я попросил его названить ники людей, которые вносили вклад в разработку. оно выдало твой ник. если это действетельно ты - напиши свой эмайл.
если у тебя просто такой же ник - прости за неудобства

Support for different transports

Hello,

Firstly thanks for your effort to develop this project. Could you change it to transport-agnostic architecture?
For example, you added LiteNetLib as default transport (I know it's tightly coupled now). If you can change this to a changeable transport structure. We as community can add all other transport systems like SteamNetwork, self-hosted relay, enet etc.

Regards

Enable nullable reference types annotations

This will be quite an effort, because I already tried before and know that it wasn't easy, but it would bring more null safety to both the development of the library as the development of the consumers games.

Switch & Future?

First of all, this looks great! :)

Im currently using your LiteNetLib in a c# gameserver and implemented the rest of the logic by myself.
E.g. Once an entity moved, its written to the NetManager using .SendNetSerializable<T>(...) and similar calls.
Sending the stuff is happening once during the frame.

This is already working fine, however this add on looks very promising.
I wonder how those two compare. E.g. are there any performance benefits from using LiteEntitySystem?
Or does LiteEntitySystem allocate garbage or is even slower/faster in particular situations? ^^
When does it make sense to switch? And how long will you support this, what are the plans for the future?

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.