Skip to main content

New answers tagged

1 vote
Accepted

How can I improve vector collision algorithm?

OP here. I realized I should follow up on this question, since there were no formal answers. The advice from @DMGregory seems solid, but for the project in question I actually did none of that. I took ...
Sad Robot's user avatar
0 votes

How to detect when a keyboard arrow key is held down in turtle graphics?

The tail end of the existing answer is good, suggesting an update loop with decoupled event handlers. But I'd go a step further. Instead of applying movement in the key handlers as done in that answer,...
ggorlen's user avatar
  • 142
0 votes

How do I add collision between two player controlled turtles

The existing answer neglects the builtin turtle .distance() method which trivializes this: ...
ggorlen's user avatar
  • 142
0 votes

Avoiding Global Variables in Event Driven Programming

First off is "procedural event driven programming" a thing? Sure, since you just did it! And it does seem appropriate for a program like this. I have written a simple Snake game in Python ...
ggorlen's user avatar
  • 142
0 votes

How would I make my Python game Moddable?

Even if we're OK with the approach being totally unsafe, OP's answer still doesn't offer a sensible solution, since loops and functions, or anything multi-line can't be used in the mods file, and the ...
ggorlen's user avatar
  • 142

Top 50 recent answers are included