|
Post by johnno56 on Dec 7, 2020 18:48:10 GMT -6
Tbird,
You must have read my mind.... Coffee indeed DOES improve EVERY situation... lol
Rosy,
Playing against the computer is how I play... I'm not an online or network player. But, you are correct, in as much as it may be pointless to play against the computer... unless one is an AI guru....
J
|
|
|
Post by rosy on Dec 13, 2020 8:42:32 GMT -6
|
|
|
Post by rosy on Mar 7, 2021 8:57:47 GMT -6
1. You don't need to be an AI guru. You can make a nice simulation with simple methods. 2. The error is trivial - X is replaced with Y. It should be:
pa = atan2(px - psx, py - psy)
and below:
pa = atan2(px - csx, py - csy)
Although the puck movement before the flip is still not accounted for. The difference between the ball travel angle and the above angle PA should be added to PA (deflection angle = incidence angle).
Also, the offset (SPEED) is too large. It's better to set it to 1 and increase the speed by UPDATE not at every step of the loop, but e.g. every 15th.
|
|