Pavan Hd
Pavan Hd @pavan_buildsAl ·
#100daysofpython #pythondev Coding is not about writing more lines of code , It's all about how you express it in a better way So other people can also understand it .
24
Pavan Hd
Pavan Hd @pavan_buildsAl ·
#pythondev #100daysofpython I was having trouble with the classic bug of the snake game , where the snake collision with wall was not working Classic bug😅: I actually forgot to add snake.reset() At the collision with wall code, i figured it out with the help of chatgpt 🤣
53
Pavan Hd
Pavan Hd @pavan_buildsAl ·
#100daysofpython Day 23 part-4 Fix: - Reduce speed - Increase updates - Use distance check if car.distance(turtle) < 20: game_over = True
47
Pavan Hd
Pavan Hd @pavan_buildsAl ·
#100daysofpython Day 23 part-3 This is called the “tunneling problem” Objects move so fast they pass through others between frames......
44
Pavan Hd
Pavan Hd @pavan_buildsAl ·
#100daysofpython Day 23 part-2 At higher levels → cars move faster 🚗💨 But collision detection runs frame-by-frame. So sometimes the car literally skips over the turtle......
40
Pavan Hd
Pavan Hd @pavan_buildsAl ·
#100daysofpython Day 23(turtle-cross-over )part-1 The major problem I faced while testing my output ⏬: Why does collision work in Level 1… but fail in higher levels? 🤔🐢 I thought my code was broken. It wasn’t.......
38