You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is something that is useful for client prediction and lag compensated shots, where the world state needs rewinding.
currently this is possible on a per-component basis, you can store all the data for <n> frames:
conste=ECS.createEntity(world)// store position data for the last 60 framesconstpositions=newArray(60)for(leti=0;i<60;i++)positions[i]=vec2.create()ECS.addComponentToEntity(world,e,'lagCompensated',{
positions
})
This is a little cumbersome though; you have to manually walk through each component and grab the data you're interested in. It would be really nice if there were a more convenient interface, something like:
constw=ECS.rewindTo(world,tick)// w is now pointing at what was in the ECS world at simulation tick <tick>constpos=ECS.getEntity(w,['hero']).transform.position
It's unclear if this would be better to offer as a feature internal to this ecs, or if it should be in some wrapper layer.
The text was updated successfully, but these errors were encountered:
does the entire ECS world just get stored per tick? or is there some way to register intent and only store certain entities/components per tick in the collection?
is there some way of making a change to a previous tick, and then simulating forward? going back to the input prediction, one needs to rewind back to a specific tick where we received authoritative server input, and then simulate forward to the current tick. would this be handled implicitly by a simulate forward function, or is that left to the implementor?
this is something that is useful for client prediction and lag compensated shots, where the world state needs rewinding.
currently this is possible on a per-component basis, you can store all the data for
<n>
frames:This is a little cumbersome though; you have to manually walk through each component and grab the data you're interested in. It would be really nice if there were a more convenient interface, something like:
It's unclear if this would be better to offer as a feature internal to this ecs, or if it should be in some wrapper layer.
The text was updated successfully, but these errors were encountered: