Hash calculator burst9/3/2023 Further, each of my systems applies the SharedComponent.ID filter (AddSharedComponentFilter) and processes everything 2 times in a loop (for SharedComponent.ID = 0 and SharedComponent.ID = 1). For example: by creating 100 capsules with ID = 0, I also create 100 capsules with ID = 1. Any action I duplicate for SharedComponent.ID. When hit, the capsule and ball disappear. I spawn the capsules and shoot them with balls. Moreover, in the last frame, after all my systems, the queues were equal. Desync in the queue always occurs at the very beginning of the frame: before calling all my systems. I cache every system and almost every Job. And this will violate the rest of the system (in particular because of the order in the HashMap), and two identical parts of SharedComponent.ID = 0 and SharedComponent.ID = 1 will produce different results. I thought this would not be enough, but it shows excellent results.Īnd I found the problem, but I can’t figure out if this is a mistake, or it should be like this:ĭestroying two entities with a different SharedComponent.ID using the command buffer, but with the same data for other components, at some point (with a huge number of entities) creates a different order of entities for SharedComponent.ID = 0 and for SharedComponent.ID = 1. It is really convenient! I found in an hour what I was looking for half a day yesterday. I made a check for almost every Jobs for the number of agents, the data itself and the order of the data in the array. Or am I wrong and my code does not allow determinism? Is there DOTS determinism now? Perhaps with some reasonable restrictions? Maybe I can’t use some math operations? Or do I need to wait while FloatMode.Deterministic will work? I know that FloatMode.Deterministic is not ready yet, but should be soon (according to forum posts). The more time has passed, the more calculations are done, the greater the difference. It can be seen that at the beginning all the input data are the same, but after a while the capsules are in completely different places. It is expected that after N iterations, enemies with different IDs will be in the same positions. The system performs separate calculations for each group with one ID (as in the BoidSample example).ģ. All enemies go to the center, trying to avoid collisions (Steer Job). All yellow capsules have the same positions as the purple capsules. As a result, yellow and purple capsules are created. Each spawner has an enemy prefab that has its own ID in SharedComponentData. Each spawner creates 1000 enemies in random places. Then I started making a simple simulation of enemy movement based on BoidSample and in the process decided to check the determination. On simple tests (random, division, addition, even LookAt), I saw complete determination and the same results after hundreds of iterations. Clients send each other only messages about their actions (button is pressed, spell is used, etc.).īut this requires a complete determination of the calculations. Simulation is carried out with a fixed step on each client. I make simple multiplayer RTS (lockstep) just for my training.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |