Also, i have a few questions, for better understanding...1. When entity expels droplet - what is initial position of droplet?2. When entity very close to wall expels droplet in wall - what is initial position of droplet? what is happened with a droplet?3. When one entity very close to other entity expels droplet in last entity - what is happened with a droplet?4. When one entity very close to other entity expels droplet in last entity and the radius of a droplet is equal to other entity's radius - what is happened with a droplet?5. Let's suppose the following situation: my and opponent entities, with equal radiuses, are both moving to a neutral chip, with smaller radius, from the same distance with equal length of velocity vectors. Who will eat them all? In other words: what are the order of inconsistencies processing?Picture:O -> o <- Oiam neutral opponent
Is the rule "but the engine move it immediately to a valid position (x<800-11.254541)" also applied on collisions between chips ?
Thx leon_id & loic_mangeonjean1 for answers !
I was speaking of same size chips. So we use the point in the line that join both centers and adjust it position regarding both radius ? (because distance_C1_C2 != C1_radius + C2_radius)
No, there is no mechanism like that between chips! I understood what you meant!
So what point should we consider as collision point ?
Why do you need it ? You just need the normal of the collision !
So the droplet is still inside the chip, then, right? How come it is not absorbed either immediately or during the next 1/500th frame substep (if it is still inside)? Is there a specific rule regarding this?Thanks,
Exactly, a chip cannot eat its own droplet before the droplet hits a wall or another chip/droplet of the same size.
For those who got frustrated by the 500 steps engine, note that a new physics engine is implemented in the PokerChipRace training.
How does it works ?
It just compute the exact time for each collision using linear algebra ! There is no more "steps"
What's the new position of the entity after expelling a droplet ? Does it keep its original one ?
Yes, an entity doesn't move when expelling, only the speed is modified.
What happens if an entity consumes another entity, and the growth in area would put its border beyond the bounds of the map? For example. Entity 0 is at Y = 10 and its radius is 8. It consumes another entity which makes its radius 12. Now its upper border is -4. Does the engine immediately move the larger entity somehow?
The remaining entity will be set right next to the edge.I have published some parts of my simulation on github.
Thanks! This is a very handy reference. Although I noticed that your edge collision detection has a minor bug if the entity is heading toward a corner and would hit both edges. Your code would return a collision with the Y edge, even if it hits the X edge first. Your code is very clear, though. Thank you!
Wow, indeed. Thank you for telling me.I played about 10 matches and compared the gamestate with my own calculations, without any differences.That bug seems to be relevant in the rare case, that there is a collision with another chip between both edge collisions.
Hi. I'm trying to build the simulator. In order to simulate a move, I know the speed vector, and I want to know the future position. Is there a way to have the turn duration? Or maybe the speed is given in unit/turn?
As a base to improve upon, I suggest your look at simulators for CSB for example, they'll be a good base to build from.