mirror of
https://github.com/quantum5/punyverse.git
synced 2025-04-24 13:11:57 -04:00
Added support for older launchers.
This commit is contained in:
parent
3b221e4339
commit
08c12d3b4d
|
@ -5,16 +5,21 @@ WIN_TITLE = 'Punyverse'
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import argparse
|
try:
|
||||||
parser = argparse.ArgumentParser(prog='punyverse', description='Python simulator of a puny universe.')
|
import argparse
|
||||||
parser.add_argument('-t', '--ticks', help='Ticks per second for game, more means more responsive, but '
|
except ImportError:
|
||||||
' may run slower, default is 20.', default=20, type=int)
|
args = False
|
||||||
args = parser.parse_args()
|
else:
|
||||||
|
parser = argparse.ArgumentParser(prog='punyverse', description='Python simulator of a puny universe.')
|
||||||
|
parser.add_argument('-t', '--ticks', help='Ticks per second for game, more means more responsive, but '
|
||||||
|
' may run slower, default is 20.', default=20, type=int)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
import pyglet
|
import pyglet
|
||||||
from punyverse import game
|
from punyverse import game
|
||||||
pyglet.options['shadow_window'] = False
|
pyglet.options['shadow_window'] = False
|
||||||
game.TICKS_PER_SECOND = args.ticks
|
if args:
|
||||||
|
game.TICKS_PER_SECOND = args.ticks
|
||||||
|
|
||||||
game.Applet(width=INITIAL_WIN_WIDTH, height=INITIAL_WIN_HEIGHT, caption=WIN_TITLE, resizable=True, vsync=0)
|
game.Applet(width=INITIAL_WIN_WIDTH, height=INITIAL_WIN_HEIGHT, caption=WIN_TITLE, resizable=True, vsync=0)
|
||||||
pyglet.app.run()
|
pyglet.app.run()
|
||||||
|
|
Loading…
Reference in a new issue