Skip to content

Optimisations

andyblarblar edited this page Feb 21, 2020 · 1 revision

Collision detection

Collision detection in WrapAround occurs every 17ms before updates are sent to the client. In order to optimize calculations, all entities with a hitbox are required to be assigned to a quadrant of the screen. This assignment happens right before collision detection for paddles and the ball, and passively for blocks and goals. Collision checks are then only run on ICollidible implementors that are in the same segment as the ball, massively speeding up updates when a large number of blocks a present.

Clone this wiki locally