Penjee.com 's Blog

Mouse Clicked on Image in Pygame

So, now that our image can animate and wrap around the screen, let’s try to click on it! First, though we should just take moment to learn about how the mouse itself works in pygame. The important new lines which are now part of our game loop is to constantly look to see if the mouse click … Continue reading Mouse Clicked on Image in Pygame →

How to animate an image II- Wrap around screen

One of the problems with our prior pygame animation is that once the red square goes to far to the left, we don’t do anything. It just seems to be gone forever ! What we want to write is the python code that says, “Hey if the image goes all the way to left, off of … Continue reading How to animate an image II- Wrap around screen →

How to negate two things

A lot of students, when they’re first learning to program,  are surprised when they’re code doesn’t do what they want.  We are going to explore why that is .   Newby programmer trying to write “hey as long as these two things are false”…do some stuff hmm… how do we write that. It might actually … Continue reading How to negate two things →