Question: I’m trying to create a fast 2D point inside polygon algorithm, for use in hit-testing (e.g. Polygon.contains(p:Point)). Suggestions for effective techniques would be appreciated. Best Answer: For graphics, I’d rather not prefer integers. Many systems use integers for UI ...

Question: I’m making a game where you throw snowballs at snowmen. Here are the definitions for the Snowman class and Snowball class: As you can see, the r attribute for the classes is their rectangle. Below is a script that ...

Question: So I have a problem where my enemy cannot be damaged if I’m not using a static variable for their health. But when using static variable if one of the enemy dies, the others die as well. The enemy ...

Question: I’ve been trying to create a simple game in which zombies (represented by purple circles) are attacking a treasure. Here’s my code: However, I want to make it so that every two seconds that a zombie has collided with ...

Question: I can use the function CheckCollisionCircleRec(Vector2{ x, y }, radius, paddleRect) to find out simply if my circle has collided with my rectangle, but I want to be able to find out what side of the rectangle my circle ...

Question: Hello there awesome community! I am writing a discrete 2d multi-agent environment in Python. I want my agents to share information when they are in the vicinity of each other. What is the best way to go about detecting ...