Hey everyone!! I am using bevy and bevy_rapier plugin for my dedicated headless server for a third person shooter game, that will handle multiple sessions in parallel. I am spawning multiple bevy apps in separate threads for horizontal scaling. The issue is, in the bevy app i have a big collection of collider/rigidbodies that are Static level objects needs to be included for physcis simluation. However i do not want to use memory for those static objects in different session. Is there a way to make rapier use the reference of those static objects? If not, do you think is it ok to have those static object data for each session. Lastly for anyone with a similar experience, is there a way to parallel processing of different session without creating separate bevy apps ?
#Handling multiple sessions for an online shooter!
3 messages · Page 1 of 1 (latest)
One way you could do it is to have all your sessions interact in the same Bevy world (where static objects are instantiated only once); then you can add some marker components on each object that is session-specific such as SessionId(usize) and you make sure that objects from 2 sessions don't interact + aren't visible to each other; and that only objects from a given session are replicated to a given user
My networking library has the concept of interest management (https://github.com/cBournhonesque/lightyear/tree/main/examples/interest_management) where you can specify which entities are networked to each client