I've solved my own issue.
If anyone in the future is looking for the same answer below is the code witha short write up.
def get_angle(e, f, p):
:param e: Entity we're measuring from
:param f: Fov arm endpoint
:param p: Point we're getting the angle to
a = np.array([e.pos.x, e.pos.y])
b = np.array([f.x, f.y])
warning: I don't know any python programming but I may help you a little bit?
As per your code example it seems that the only thing you are missing is the b2ContactListener which will tell you when two fixtures collide:
Now, we want Box2D to tell us when the contact state changes. Make a
subclass of b2ContactListener and implement the
If you are trying to keep the number of turns per player close to equal while making the order random, you could try a couple things:
1. Randomize the order of turns each round.
For each round of play, create a random ordering for the group of players you have. They all play through, and then for the next round you create another random ordering. So each ...
So you have a "one-button" gameplay and it's not engaging enough? Have you played NFSU? It had a drag race mode, which is basically pressing one button in perfect timing to outrace other competitors.
Why not try to replace turns with cooldowns. Whenever someone's cooldown reaches zero - they can have their turn and try to press the button in perfect time. ...