import game_framework import pico2d #import main_state as start_state import world_build_state as start_state PIXEL_PER_METER = 100 / 3 pico2d.open_canvas(int(40 * PIXEL_PER_METER), int(30 * PIXEL_PER_METER)) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import start_state SCREEN_WIDTH = 1024 SCREEN_HEIGHT = 768 pico2d.open_canvas(SCREEN_WIDTH, SCREEN_HEIGHT) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import main_state pico2d.open_canvas(800, 600) game_framework.run(main_state) pico2d.close_canvas() #완료
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> import pico2d Pico2d is prepared. >>> pico2d <module 'pico2d' from 'D:\\Python\\lib\\site-packages\\pico2d\\__init__.py'> >>> pico2d.open_canvas() >>> pico2d.hide_lattice() >>> pico2d.show_lattice() >>> pico2d.close_canvas() >>> import pico2d as p >>> p.open_canvas() >>> p.close_canvas() >>> from random import randint >>> randint(1, 6) 2 >>> randint(1, 6) 6 >>> random.random() Traceback (most recent call last): File "<pyshell#12>", line 1, in <module> random.random() NameError: name 'random' is not defined >>> from random import uniform as rndf >>> rndf(0.1, 0.5) 0.15403934983703219 >>> r = rndf >>> r(0.4, 0.8) 0.5079230579999989 >>> from random import * >>> randrange(10, 20)
import pico2d import title_state import game_framework pico2d.open_canvas(1200, 800, sync=True) game_framework.run(title_state) pico2d.close_canvas()
import game_framework import pico2d import start_state pico2d.open_canvas(1000, 600,sync=True) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import main_state pico2d.open_canvas(1280, 824) game_framework.run(main_state) pico2d.close_canvas()
import game_framework import pico2d import start_state pico2d.open_canvas(1280,1024, sync=True) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import start_state import title_state import main_state pico2d.open_canvas(960, 640) game_framework.run(start_state) game_framework.run(title_state) game_framework.run(main_state) pico2d.close_canvas()
import game_framework import pico2d import title_kpu_state # fill here pico2d.open_canvas(800, 500, sync=True) game_framework.run(title_kpu_state) pico2d.close_canvas()
import game_framework import pico2d import title_stage pico2d.open_canvas(1920, 1080) game_framework.run(title_stage) pico2d.close_canvas()
import pico2d as Pico Pico.open_canvas() Grass = Pico.load_image('../res/grass.png') Character = Pico.load_image('../res/run_animation.png') x = 0 FrameIndex = 0 while x < 800 : Pico.clear_canvas() Grass.draw(400,30) Character.clip_draw(100 * FrameIndex, 0, 100, 100, x, 85) Pico.update_canvas() Pico.get_events() x += 4 #FrameIndex += 1 #if FrameIndex >= 8 : # FrameIndex = 0 FrameIndex = (FrameIndex + 1) % 8 Pico.delay(0.05) Pico.close_canvas()
import game_framework import pico2d import start_state pico2d.open_canvas(600, 800) game_framework.run(start_state) pico2d.clear_canvas()
import pico2d import GameFrameWork import StartState CANVAS_WIDTH, CANVAS_HEIGHT = 1280, 720 pico2d.open_canvas(CANVAS_WIDTH, CANVAS_HEIGHT) GameFrameWork.run(StartState) pico2d.close_canvas()
import game_framework import pico2d import title_state pico2d.open_canvas(648, 696) game_framework.run(title_state) pico2d.close_canvas()
import game_framework import pico2d import title_state # Play pico2d.open_canvas(1400, 700) game_framework.run(title_state) pico2d.close_canvas()
import game_framework import menu_state import pico2d pico2d.open_canvas(sync=True) game_framework.run(menu_state) pico2d.close_canvas()
import pico2d import framework import state_Start # open_canvas 하고 이미지 로드해야한다 pico2d.open_canvas(800, 800, sync=13) framework.run(state_Start) pico2d.close_canvas()
import game_framework import pico2d import start_state import title_state canvas_sizeX = 1000 canvas_sizeY = 800 pico2d.open_canvas(canvas_sizeX, canvas_sizeY) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import start_state pico2d.open_canvas(1748, 950, sync=True) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import os import main_state os.chdir("Lecture15_AI") pico2d.open_canvas(1280, 1024) game_framework.run(main_state) pico2d.close_canvas()
import game_framework # fill here import pico2d import start_state pico2d.open_canvas(1020, 510) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import main_state pico2d.open_canvas(800, 600, sync=60) game_framework.run(main_state) pico2d.close_canvas()
import game_framework import pico2d import start_state pico2d.open_canvas(1280, 720) game_framework.run(start_state) pico2d.close_canvas()
import pico2d import ctypes import enum import GameFrameWork import GameWorldManager CANVAS_WIDTH, CANVAS_HEIGHT = 1280, 720 pico2d.open_canvas(CANVAS_WIDTH, CANVAS_HEIGHT, False, False) black_background = pico2d.load_image('resource\\black_background.jpg') # Frame 구조체 class Point(ctypes.Structure): _fields_ = [("x", ctypes.c_int), ("y", ctypes.c_int)] class Image_Origin_Size(ctypes.Structure): _fields_ = [("width", ctypes.c_int), ("height", ctypes.c_int)] class Rectangle(ctypes.Structure): _fields_ = [("left", ctypes.c_int), ("bottom", ctypes.c_int), ("right", ctypes.c_int), ("top", ctypes.c_int)] class Block_Type(enum.Enum): BLOCK_NULL = enum.auto() BLOCK_BASIC_STRONG_COLOR_1 = enum.auto()
import game_framework import pico2d import start_state import title_state import end_state_lose import end_state_win import main_state pico2d.open_canvas(600, 1000, True, False) game_framework.run(start_state) game_framework.run(title_state) game_framework.run(main_state) game_framework.run(end_state_lose) game_framework.run(end_state_win) pico2d.close_canvas()
import game_framework import pico2d import start_state import os pico2d.open_canvas(1200, 800) game_framework.run(start_state) pico2d.close_canvas()
import game_framework import pico2d import start_state pico2d.open_canvas(1280, 600, sync=True) # 피코투디로 캔버스를 열어준다 game_framework.run(start_state) # start_state 상태로 game_framework가 돌아가게 해준다 pico2d.close_canvas()
import game_framework import start_state import pico2d # fill here pico2d.open_canvas() game_framework.run(start_state) pico2d.close_canvas()
import pico2d import game_framework import start_state from player import Player # fill here pico2d.open_canvas(game_framework.Width, game_framework.Height) game_framework.player = Player() game_framework.run(start_state) pico2d.close_canvas()