January 10th, 2014, 10:11 AM
Best IDE for Pygame?
So I'm currently using Pyscripter 3.3 with Python 3.3, but the thing is, whenever I try to import Pygame and actually draw something on screen like a fullscreened window, it will open a window upon execution though if I click on it, the top title bar says Pygame (not responding)
Is this an IDE problem or my computer having problems?
This one's a dinosaur in comparison to modern standards.
Its got a single core AMD 3800+, Radeon X1650XT, 3 gigs of ram, and 7 gigs of hdd space left on the windows drive.
Any ideas on an alternate IDE to use Pygame with to test out what's wrong with what I'm doing?
Here's some example code that causes this issue, which could open up a screen normally without stalling from Pygame:
# Creating a window with a specific size ex:
size = (700, 500)
screen = pygame.display.set_mode(size)
January 10th, 2014, 10:14 AM
Wow, as soon I was done writing the above post, I looked at the next paragraph down and the "Programming Arcade Games with Pygame" book told me that it should stall since I have to code in user input and prevent it from hanging.
Sorry about that, either way, does anyone have a preference for the IDE they use?
I currently use PyScripter but am willing to switch to a better IDE regardless if anyone has suggestions.
January 11th, 2014, 02:25 AM
Yes, until you have an event loop, your game will stall.
Here is a basic template for a pygame program:
import pygame as pg
os.environ["SDL_VIDEO_CENTERED"] = "TRUE"
self.screen = pg.display.set_mode(screen_size)
self.screen_rect = self.screen.get_rect()
self.clock = pg.time.Clock()
self.fps = 60.0
self.done = False
for event in pg.event.get():
if event.type == pg.QUIT:
self.done = True
while not self.done:
if __name__ == "__main__":
app = Control((500,500))
As for IDEs PyScripter should do fine (I find it occasionally unstable though). Check out a few others if you want but don't worry too much about it.
January 12th, 2014, 03:23 AM
Thanks a bunch!
Yeah, I'm getting the hang of drawing stuff on the canvas, but following the overall suggested layouts pretty easy so far.
Ah your example's in object orientated style programming. I have always struggled with that. How did you learn it because for some reason all the self.() sections always confused me, but this time around, I really want to get the hang of it.
January 12th, 2014, 05:39 AM
I learned it by doing things wrong; and doing them wrong for a long time. Eventually wrong turned into right (or at least less wrong).
Here is my repo of object oriented pygame examples if you are interested:
January 13th, 2014, 10:52 AM
Hey Thanks a bunch for the links, much appreciated, bookmarked and will check out later.