def __init__(self): super(TestWindow, self).__init__(256*SCALE, 48*SCALE, caption="\'blong Cong") testmap = tilemap.load('data/m_stage1.json') self.map, self.mapv = testmap self.map.setup() self.mapv.setup()
'7': 7, '8': 8, '9': 9 } font = text.Font('data/font.png', 16, 6, f_bindings) texts_raw = json.load(pyglet.resource.file('data/texts.json'))['texts'] texts = {} for t in texts_raw: texts[t['name']] = t['text'] opening_1 = scene.TextScene(None, texts['opening-1'], font) opening_2 = scene.TextScene(None, texts['opening-2'], font) opening_3 = scene.TextScene(None, texts['opening-3'], font) title = scene.TextScene(None, texts['title'], font) town_0 = scene.GameScene(*tilemap.load('data/m_town.json'), hero_position=Vect(200, 4), nextdir=None, override_properties={'offscreen_obstacles':'rl'}) town_0.npcs.append(npcs.WiseOldKing(8, 4)) town_0.npcviews.append(npcs.WiseOldKingView(town_0.npcs[-1])) king_giveQuest = scene.TextScene(None, texts['king-giveQuest'], font) town_0_0 = scene.GameScene(*tilemap.load('data/m_town.json'), hero_position=Vect(14, 4), nextdir='r') stage1_0 = scene.GameScene(*tilemap.load('data/m_stage1.json'), hero_position=Vect(4, 4), nextdir='r') intermission1_2_0 = scene.TextScene(None, texts['intermission-1to2'], font) stage2_0 = scene.GameScene(*tilemap.load('data/m_stage2.json'), hero_position=Vect(4, 36), nextdir='t') intermission2_3_0 = scene.TextScene(None, texts['intermission-2to3'], font) stage3_0 = scene.GameScene(*tilemap.load('data/m_stage3.json'), hero_position=Vect(244, 8), nextdir=None,
def __init__(self): super(TestWindow, self).__init__(64*SCALE, 48*SCALE, caption="The Quest for the Oblong Conglomerate") testmap = tilemap.load('data/m_stage1.json') map, mapv = testmap self.scene = SCENES.pop(0) self.scene.setup()
import pyglet from src import tilemap, pluckylass from src.shapes import * from pyglet.window import key from pyglet.gl import * pyglet.resource.path.append('data') pyglet.resource.reindex() testmap, testmapview = tilemap.load('testmap.json') testmap.setup() testmapview.setup() player = pluckylass.PluckyLass() playerview = pluckylass.PluckyLassView(player) playerview.setup() SCALE = 2 w = pyglet.window.Window(13*15*SCALE, 13*15*SCALE, 'Prismatic Zealotry') glScalef(SCALE, SCALE, SCALE) @w.event def on_draw(): w.clear() glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST) testmapview.batch.draw() playerview.sprite.draw() @w.event