u
This commit is contained in:
parent
f129866f2c
commit
fca089fcda
1 changed files with 38 additions and 0 deletions
38
vis2.py
Normal file
38
vis2.py
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Example file showing a basic pygame "game loop"
|
||||||
|
import pygame
|
||||||
|
# pygame setup
|
||||||
|
pygame.init()
|
||||||
|
screen = pygame.display.set_mode((1920, 1080), flags=pygame.FULLSCREEN)
|
||||||
|
clock = pygame.time.Clock()
|
||||||
|
running = True
|
||||||
|
|
||||||
|
screen.fill("black")
|
||||||
|
X=128
|
||||||
|
Y=8
|
||||||
|
maps = [(x%X)+1920*(x//X) for x in range(X*Y)]
|
||||||
|
maps += [x+1*X for x in maps]
|
||||||
|
it = iter(maps)
|
||||||
|
#for _ in range(8*8*16*16*(15*8)+18000*5):
|
||||||
|
# next(it)
|
||||||
|
#for _ in range(8*8*16*16*(15*8)):
|
||||||
|
# next(it)
|
||||||
|
while running:
|
||||||
|
# poll for events
|
||||||
|
# pygame.QUIT event means the user clicked X to close your window
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
running = False
|
||||||
|
|
||||||
|
# fill the screen with a color to wipe away anything from last frame
|
||||||
|
|
||||||
|
# RENDER YOUR GAME HERE
|
||||||
|
|
||||||
|
# flip() the display to put your work on screen
|
||||||
|
i = next(it)
|
||||||
|
screen.set_at((i % 1920, i // 1920), 'white')
|
||||||
|
pygame.display.flip()
|
||||||
|
|
||||||
|
|
||||||
|
#clock.tick(120) # limits FPS to 60
|
||||||
|
|
||||||
|
pygame.quit()
|
Loading…
Reference in a new issue