Coder Social home page Coder Social logo

spaceriskgame-flax's Issues

Custom `Entity` replication

Current implementation initially syncs stuff over common INetworkedObject interface. This makes a lot of sense for stuff like System's that require server to client syncing, but when it comes to Entities this concept fails, due to the fact that you would need to send RPC calls for EVERY SINGLE NETWORKED COMPONENT. If you have an NPC which has like 15 components that only have 1-2 networked variables, you would need to sync scene up with NpcCount * 15 RPC calls. This is unacceptable, and has to be changed immediately. For Entity we have to make a custom exception with a custom replication mechanism that would involve gathering replication info of each of the networked component, and then sending them all bundled up per each Entity. This would lower down the amount of sent RPC calls significantly, while also improving compression rates due to the fact that we are now compressing replication data of the entire Entity, and not each component individually.

P.S. Also, sending replication data can be done on a single frame without any issues. From what I've saw in the sourcecode, Flax already supports and works over internal buffers for sending messages, so it should be handled automatically somehow, I hope...

Move state changes caused by camera switching to camera scripts

Currently, when we change cameras we also have to manage stuff like player movement in like so:

entity->GetComponent<PlayerNetworking>()->Camera->SetIsActive(false);
entity->GetComponent<PlayerMovement>()->CanMove = false;
Cameras[0]->SetIsActive(true);

This is super bad and was initially written to test out stuff. This has to be automatically handled by the player camera OnEnable()/OnDisable() instead.

Precompile terrain type array

Currently, using tools to get splatmap data relies on editor only code, and having a precompiled static grid with terrain types would also be beneficial to speed up game's initialization.

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.