New answers tagged

1 vote
Accepted

Infinite scrolling with mouse

My solution: ...
Intice's user avatar
  • 31
0 votes

Infinite scrolling with mouse

I would consider the following to lock the mouse into the screen based on size that way they can't click out of it. import pyautogui import time Set the coordinates of the window you want to lock the ...
Krystal Fong's user avatar
0 votes

How can I generate random lakes and rivers in my game?

On the topic of rivers ... I came across some articles that mentioned modelling erosion from rain and use the resulting map as a base of a water flow map. The original article is gone now, sadly, but ...
Wolfgang Schreurs's user avatar
0 votes
Accepted

Pygame code/file structure

Creating many files is not bad practice in personal projects. It allows you to keep your code easily maintainable. However I would recommend planning what is game stuff and what is engine stuff (in ...
Cherestes Radu's user avatar
1 vote
Accepted

Sprite chasing a target using move_towards_ip does not move

pygame.sprite.Group.draw: Draws the contained Sprites to the Surface argument. This uses the Sprite.image attribute for the source surface, and Sprite.rect for the position. So we need to update ...
Mangata's user avatar
  • 2,451
2 votes

How do I mix an image with a specified color?

Code: ...
Mangata's user avatar
  • 2,451

Top 50 recent answers are included