pyinstaller is awesome! For quick testing of a game, nothing can beat typing:
pyinstaller scripts/scriptname.py
and getting an exe in 30 seconds.
py2exe you need to make a file that has all the info for what you wish the game folders to look like and whatnot. I would use py2exe for a full distribute and pyinstaller for testing.
It is pretty easy to hit some lag time in python, "load a 300 or 400 module package will take a second or so, cycling through 5000000 times in a for statement takes about 1 second with single level checks, but you can always go to c++ for everything intensive.
see this code for example:
import time
def main():
starttime = time.clock()
for j in range(5000000):
f = j
if j == "f":
print "yes"
elif j == "s":
print "yes!"
endtime = time.clock()
print starttime-endtime
main()
to check the same thing in cython, change the range to xrange.
There is about a 0.2 second difference.
But accessible_output makes life worth the trouble!
I have created a little module that you can import into your scripts that will make dealing with pygame super easy. Easy like:
import pygame_scripts as pg
def main():
pg.screen("my test game")
pg.speak("You are running through the forest! There is a dragon, press the space bar to kill it!")
play = True
num = 0
while play:
n = pg.key2() #key1 is the normal intensive key check, but key2 is basicly rest till key input
if n[0] == "space":
pg.speak("Great, you killed it!")
play = False
else:
pg.speak("hurry, the dragon will eat you!")
num += 1
if num > 7:
pg.speak("The dragon blows out a nice bit of flame right into your face... Oh, are you not pot-roast? Sorry...")
play = False
main()
#the key function returns a tupal (key_name, key_mods) key name is like "space" "return" "f" "d" and mods have numbers that I just use right now, but will add in as words later...