Code Monkey home page Code Monkey logo

Comments (7)

alex-moonlitgames avatar alex-moonlitgames commented on May 19, 2024

Bump

from entitas.

mchamplain avatar mchamplain commented on May 19, 2024

To me Option 2 means rewriting everything, you need to think differently when you want to handle multiple matches. there's a risk of interference between matchs... scaling is a pain also.

Option 1 is probably your best bet
will offer a more stable gameplay experience, any issue or crash would technically affect a single game.
it's easier to predict ressource usage and easier to scale by just spawning more game servers.
but being server-authoritative you might need to implement lag compensation and client prediction... but with movement and bullet speed seems slow enough that you might not need it at first... coop can probably work fine without it, but PvP will prolly need it.

from entitas.

WeslomPo avatar WeslomPo commented on May 19, 2024

Entitas works fine in console application and don't need unity. Also, you can have as many copies of context in one instance as you want. In our project we have two copies of contexts in one game at same time for local and global data. You just need to manage that copies by hand or dependency container.

If I have to make a multiplayer game, I will choose 1 option.

from entitas.

alex-moonlitgames avatar alex-moonlitgames commented on May 19, 2024

Thank you for your thoughts! My second issue is physics, as it's a shooter game with collisions. It's got to be server authoritative but also I have to move core gameplay there as well, while at the same time having it in singleplayer game modes too.

Should I have a pure C# collision library both backend and frontend?
Or use a UI-less Unity instance for each match?

from entitas.

SidiaDevelopment avatar SidiaDevelopment commented on May 19, 2024

You can use a UI-less Unity instance as a server, handling multiple games at once, tag each networked entity with an id what game it belongs to and only broadcast those that belong to the game the current player is in. You can load multiple maps, aslong as you offset them by a generous value so their physics objects do not collide

from entitas.

mchamplain avatar mchamplain commented on May 19, 2024

you can use Unity in headless-mode I think, my understanding is that it will simply work without rendering anything.
a very simple implementation would be to have clients only send input to the server, process physics on the server, and sync position and stuff back to the clients.
But lag will probably feel bad for players so you also run the physic on the client to control the 'local' player, but then you always take what the server say the position is so that clients can't cheat. on slow-ish movement it should work pretty well

from entitas.

alex-moonlitgames avatar alex-moonlitgames commented on May 19, 2024

@mchamplain Ha, I remember rubberbanding in shooters. Due to large amounts of physics layers, I probably would have to create a new instance for each match, rather than all games in the same instance

from entitas.

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.