I’m working on a python text-based adventure and I can’t figure out how to stop a character from doing damage once they die. The program works fine when I run it, but even after a character dies, they can still attack the other characters. I’ve looked on google but I can’t find any relevant info Here’s a snippet of my
Tag: game-development
How to handle vector based movement and x axis tile map collisions in pygame
I have a problem with my pygame script in which the way I check for collisions doesn’t seem to work with the x axis and presents some very frustrating and downright stupid errors. The way it works is I first check for movement in the axis of choice, here is an example in the y axis. I then get a
Line is detected as diagonal of rectangle while using collidepoint function in pygame
I am working on a graph based project. I am drawing lines to represent the edges. My goal is to change color of line when I click on the specific line. the problem is pygame treats line as diagonal of virtual rectangle. so when even if I don’t click on the line but the mouse position is in the projected