from kivy.app import App
from kivy.core.window import Window
from kivy.uix.widget import Widget
+from kivy.logger import Logger, LoggerHistory
from kivy.uix.relativelayout import RelativeLayout
from kivy.uix.scrollview import ScrollView
from kivy.graphics import Color, Rectangle
from erdslangetjie.level import LevelList
from erdslangetjie.player import ThePlayer, Nemesis
+from erdslangetjie.constants import TILE_SIZE, QUIET
-if platform() != 'android':
- TILE_SIZE = 40
-else:
- TILE_SIZE = 64
class GameWindow(RelativeLayout):
def main():
""" Erdslangetjie, a maze game of eluding nemesis
"""
+ if QUIET:
+ for hdlr in Logger.handlers[:]:
+ if not isinstance(hdlr, LoggerHistory):
+ Logger.removeHandler(hdlr)
GameApp().run()
--- /dev/null
+from kivy.utils import platform
+from kivy.config import Config
+
+QUIET = False # kivy logging - change for release
+
+if platform() != 'android':
+ TILE_SIZE = 38
+ Config.set('graphics', 'width', '1026')
+ Config.set('graphics', 'height', '760')
+else:
+ TILE_SIZE = 64
+ Config.set('graphics', 'fullscreen', 'True')
from erdslangetjie.data import filepath, load
from erdslangetjie.level import Level
-
-
-TILE_SIZE = 24
+from erdslangetjie.constants import TILE_SIZE, QUIET
class EditorWindow(FloatLayout):
level = sys.argv[1]
else:
level = 'level1.txt'
- # Uncomment to silence excessive logging
- #for hdlr in Logger.handlers[:]:
- # if not isinstance(hdlr, LoggerHistory):
- # Logger.removeHandler(hdlr)
+ if QUIET:
+ for hdlr in Logger.handlers[:]:
+ if not isinstance(hdlr, LoggerHistory):
+ Logger.removeHandler(hdlr)
EditorApp(level).run()