PokerChipRace physics explanations

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 <- O
    iam neutral opponent
1 Like

Hi,

Is the rule “but the engine move it immediately to a valid position (x<800-11.254541)” also applied on collisions between chips ?

Thanks :wink:

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?

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 <- O
iam neutral opponent

  1. Initial position is on the “border” of your chip (distance = chip_radius - droplet_radius) in the direction of expulsion
  2. Since the droplet touches the wall, it will be directly eaten by your chip.
  3. Is there even a problem here ? the other entity just absorbs it.
  4. see 2. (but it seems very unlikely to happen) It just bounces off it.
  5. In this very specific case (I mean, it has to happen in a precision of 1/500 of frame), the first chip in the list (the first player) has the priority.

Is the rule “but the engine move it immediately to a valid position (x<800-11.254541)” also applied on collisions between chips ?

No (:

1 Like

Thx leon_id & loic_mangeonjean1 for answers !

No (:
[/quote]

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! :wink: 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.

1 Like

For those who got frustrated by the 500 steps engine, note that a new physics engine is implemented in the PokerChipRace training.

1 Like

Whatttttttttttttttttttttttttttt :stuck_out_tongue:

How does it works ?

It just compute the exact time for each collision using linear algebra ! There is no more “steps” :wink:

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.

2 Likes

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!

1 Like

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?

Correct.

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.