New answers tagged python
1
vote
Accepted
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 ...
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 ...
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 ...
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 ...
2
votes
Top 50 recent answers are included
Related Tags
python × 630pygame × 336
collision-detection × 57
2d × 31
opengl × 30
sprites × 26
c++ × 21
pyglet × 19
physics × 18
mathematics × 16
unity × 15
3d × 15
scripting × 14
animation × 13
architecture × 13
movement × 13
c# × 12
procedural-generation × 11
vector × 11
image × 11
graphics × 10
tilemap × 10
algorithm × 9
rotation × 9
performance × 9