1e-11 set my scale to set sprite to the 1 key is pressed ▾ 4 flappy -70 -70 Show Text at set my scale to set sprite to the 2 key is pressed ▾ 0.5 flappy -70 -70 Show Text at set my scale to set sprite to the 3 key is pressed ▾ 2 flappy -70 -70 Show Text at set my scale to set sprite to the 4 key is pressed ▾ 0.9 flappy -70 -70 Show Text at set my scale to set sprite to the 5 key is pressed ▾ 10 flappy -70 -70 Show Text at set my scale to set sprite to the 6 key is pressed ▾ 0.5 flappy -70 -70 Show Text at set sprite to set my scale to the 7 key is pressed ▾ 0.25 flappy -70 -70 Show Text at set my scale to set sprite to the 8 key is pressed ▾ 5 flappy -70 -70 Show Text at set my scale to set sprite to the 9 key is pressed ▾ 2 flappy -70 -70 Show Text at set my scale to set sprite to the 0 key is pressed ▾ 3 flappy -70 -70 Show Text at set my scale to set sprite to the z key is pressed ▾ 4 flappy -70 -70 Show Text at set my scale to set sprite to the x key is pressed ▾ 25 flappy -70 -70 Show Text at set my scale to set sprite to the c key is pressed ▾ 7 flappy -70 -70 Show Text at set my scale to set sprite to the left ▾ mouse was pressed ▾ 7 you win -50 -50 Show Text at set my scale to set sprite to if do if do if do if do if do if do if do if do if do if do if do if do if do if do object default start update create object ui create object default Game start update set sprite to the w key is pressed ▾ 10 change my y ▾ by the a key is pressed ▾ -10 change my x ▾ by the s key is pressed ▾ -10 change my y ▾ by the d key is pressed ▾ 10 change my x ▾ by if do if do if do if do object ui start update the o key was pressed ▾
class default(MonoBehaviour):
def start(self):
self.set_sprite("Flappy/BirdHero.png")
self.scale = 1e-11
def update(self):
if key_is_pressed('1'):
self.set_sprite("Flappy/BirdHero.png")
self.scale = 4
ui_text ('flappy', (-70), (-70))
if key_is_pressed('2'):
self.set_sprite("Dungeon/brick.png")
self.scale = 0.5
ui_text ('flappy', (-70), (-70))
if key_is_pressed('3'):
self.set_sprite("Dungeon/crate.png")
self.scale = 2
ui_text ('flappy', (-70), (-70))
if key_is_pressed('4'):
self.set_sprite("Space/Nebula.jpg")
self.scale = 0.9
ui_text ('flappy', (-70), (-70))
if key_is_pressed('5'):
self.set_sprite("Dungeon/spiderweb.png")
self.scale = 10
ui_text ('flappy', (-70), (-70))
if key_is_pressed('6'):
self.scale = 0.5
self.set_sprite("Flappy/ColumnSprite.png")
ui_text ('flappy', (-70), (-70))
if key_is_pressed('7'):
self.set_sprite("Flappy/GrassThinSprite.png")
self.scale = 0.25
ui_text ('flappy', (-70), (-70))
if key_is_pressed('8'):
self.set_sprite("Dungeon/spider_run.png")
self.scale = 5
ui_text ('flappy', (-70), (-70))
if key_is_pressed('9'):
self.set_sprite("Dungeon/skeleton_move.png")
self.scale = 2
ui_text ('flappy', (-70), (-70))
if key_is_pressed('0'):
self.set_sprite("Flappy/SkyTileSprite.png")
self.scale = 3
ui_text ('flappy', (-70), (-70))
if key_is_pressed('z'):
self.set_sprite("Space/Player.png")
self.scale = 4
ui_text ('flappy', (-70), (-70))
if key_is_pressed('x'):
self.set_sprite("Space/Bullet.png")
self.scale = 25
ui_text ('flappy', (-70), (-70))
if key_is_pressed('c'):
self.set_sprite("Space/Enemy.png")
self.scale = 7
ui_text ('flappy', (-70), (-70))
if key_was_pressed('m_left'):
self.set_sprite("Space/Player.png")
self.scale = 7
ui_text ('you win', (-50), (-50))
class Main(MonoBehaviour):
def start(self):
instantiate(default)
instantiate(ui)
def update(self):
pass
class ui(MonoBehaviour):
def start(self):
self.set_sprite("Flappy/BirdHero.png")
def update(self):
if key_is_pressed('w'):
self.y += 10
if key_is_pressed('a'):
self.x += (-10)
if key_is_pressed('s'):
self.y += (-10)
if key_is_pressed('d'):
self.x += 10
EQ
AND
TRUE
10
WHILE
i
1
10
1
j
BREAK
0
ADD
1
1
ROOT
9
SIN
45
PI
EVEN
0
ROUND
3.1
SUM
64
10
50
1
100
1
100
item
abc
FIRST
text
abc
FROM_START
text
FROM_START
FROM_START
text
UPPERCASE
abc
BOTH
abc
abc
TEXT
abc
0
0
1
1
0
1
90
1
0.5
1
"Hello world"
0
0
5
FIRST
GET
FROM_START
SET
FROM_START
FROM_START
FROM_START
SPLIT
,
#Main Script
from processing import *
import random
import math
import time
### START ENGINE CODE
class Data:
url = "https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/"
#Ivo-Engine stuff
objs = []
#object are only destroyed at the end of the frame
toBeDestroyed = []
inputkeys = {} #dict
gameWidth = 800
gameHeight = 500
refWidth = 800
refHeight = 500
scaleRatio = 1
reloadEndOfFrame = False
main = None
images = {}
#Base-class of every object to enable start & update
class MonoBehaviour:
#REGION variables
x = 0
y = 0
#used for sorting
z = 0
rot = 0
#used for z-sorting internally
prevZ = -1000
#should be changed through setScale only!
scale = 1
currAnim = None
inGameScreen = True
min_x = 0
min_y = 0
max_x = 0
max_y = 0
markForUpdateSize = False
#ENDREGION
def setAnim(self, anim):
self.currAnim = anim
def setScale(self, val):
self.scale = val
#REGION Sprites
sprite = None
def set_sprite(self, url, width = None, height = None):
if (url not in Data.images):
Data.images[url] = loadImage(Data.url + url)
self.sprite = Data.images[url]
if (width != None):
self.set_width(width)
if (height != None):
self.set_height(height)
#self.updateMinMax() should be called after...
def set_width(self, width):
self.sprite.width = width
def set_height(self, height):
self.sprite.height = height
def move_forward(self, value):
self.x += math.cos(radians(self.rot-90))*value
self.y -= math.sin(radians(self.rot-90))*value
def move_right(self, value):
self.x += math.cos(radians(self.rot))*value
self.y -= math.sin(radians(self.rot))*value
#ENDREGION
#REGION Collision
def get_real_width(self):
return self.sprite.width * self.scale
def get_real_height(self):
return self.sprite.height * self.scale
def get_min_x(self):
return self.x - self.get_real_width() * 0.5
def get_max_x(self):
return self.x + self.get_real_width() * 0.5
b
def get_min_y(self):
return self.y - self.get_real_height() * 0.5
def get_max_y(self):
return self.y + self.get_real_height() * 0.5
#TODO only objects inside the gamescreen collide?
def collisionCheck(self, objType):
if (not self.inGameScreen):
return False;
for obj in Data.objs:
if (obj.inGameScreen):
if (obj is not self and type(obj).__name__ == objType):
if (self.intersects(obj)):
return obj
return False
def intersects(self, obj2):
return not (self.get_max_x() < obj2.get_min_x() or self.get_min_x() > obj2.get_max_x() or self.get_min_y() > obj2.get_max_y() or self.get_max_y() < obj2.get_min_y())
def check_in_gamescreen(self):
return not (self.get_max_x() < -Data.refWidth * 0.5 or self.get_min_x() > Data.refWidth * 0.5 or self.get_min_y() > Data.refHeight * 0.5 or self.get_max_y() < -Data.refHeight*0.5)
#ENDREGION
#REGION base functions
def start_INTERNAL(self):
#commented since empty objects can just display nothing
self.set_sprite("Empty.png")
self.start()
def update_INTERNAL(self):
self.update()
#we use translate instead of setting the objects position, to fix rotation issues
posX = (int)((self.x+Data.refWidth*0.5)*Data.scaleRatio)
posY = (int)((-self.y+Data.refHeight*0.5)*Data.scaleRatio)
translate(posX, posY)
rotate(radians(self.rot))
#if (self.currAnim != None):
# self.newSprite = self.currAnim.play()
self.inGameScreen = self.check_in_gamescreen()
if (self.inGameScreen):
image(self.sprite, 0, 0, self.get_real_width()*Data.scaleRatio, self.get_real_height()*Data.scaleRatio)
rotate(-radians(self.rot))
translate(-posX, -posY)
#Base functions to be overridden by any class inheriting from MonoBehaviour
def start(self):
pass
def update(self):
pass
def isMouseOver(self):
return (Data.mouse.x > self.get_min_x() and Data.mouse.x < self.get_max_x() and Data.mouse.y > self.get_min_y() and Data.mouse.y < self.get_max_y())
#ENDREGION
class Anim:
images = None
frames = 0
framesPerImage = 5
imageIndex = 0
timer = 0
#FRAMES OER IMAGE IS NOT THE FRAMERATE... Confusing, sorry
def __init__(self, url, frames, framesPerImage = 3):
self.images = []
self.framesPerImage = framesPerImage
self.frames = frames
for i in range(frames):
fullUrl = Data.url + url + str(i+1) + ".png"
img = requestImage(fullUrl)
self.images.append(img)
#should be called from a MonoBehaviour every frame while playing.
#looks like this: self.newSprite = currAnim.play()
def play(self):
self.timer += 1
if (self.timer >= self.framesPerImage):
self.timer = 0
self.imageIndex += 1
if (self.imageIndex >= self.frames):
self.imageIndex = 0
return self.images[self.imageIndex]
def instantiate(objtype, posX = 0, posY = 0):
n = objtype()
n.x = posX
n.y = posY
n.start_INTERNAL()
Data.objs.append(n)
return n
def destroy(obj):
#Check if objects wasn't already marked as destroyed.
if obj not in Data.toBeDestroyed:
Data.toBeDestroyed.append(obj)
def key_is_pressed(k):
if (k not in Data.inputkeys):
return False
return Data.inputkeys[k] == 1 or Data.inputkeys[k] == 2
def key_was_pressed(k):
if (k not in Data.inputkeys):
return False
return Data.inputkeys[k] == 1
def key_was_released(k):
if (k not in Data.inputkeys):
return False
return Data.inputkeys[k] == 3
def reload_game():
Data.reloadEndOfFrame = True
#SHOULD BE CALLED AT END OF DRAW
def reload_game_immediate():
Data.reloadEndOfFrame = False
Data.objs = []
Data.inputkeys = {}
Data.main = Main()
Data.main.start()
class Main(MonoBehaviour):
def start(self):
print("No Blockly Main class")
class Global:
pass
### END ENGINE CODE
################################################################
#BLOCKLY_REPLACE
################################################################
### START HELPER CODE
#z-sorting
#bubblesort with extra check for each element if it changed
def bubbleSort(alist):
pop = 0
for passnum in range(len(alist)-1,0,-1):
if (alist[passnum].z != alist[passnum].prevZ):
for i in range(passnum):
pop += 1
if alist[i].z > alist[i+1].z:
temp = alist[i]
alist[i] = alist[i+1]
alist[i+1] = temp
alist[passnum].prevZ = alist[passnum].z
#print("Sorted " + str(pop) + " elements")
### END HELPER CODE
### START PROCESSING CODE
def setup():
#SIZE_REPLACE
size(Data.gameWidth, Data.gameHeight)
Data.scaleRatio = float(Data.gameWidth) / Data.refWidth
Data.invScaleRatio = float(1)/Data.scaleRatio
imageMode(CENTER)
frameRate(30)
textSize(32*Data.scaleRatio)
reload_game_immediate()
#run first frame right away
draw()
def draw():
background(0)
Data.mouse = PVector((mouse.x* Data.invScaleRatio-Data.refWidth*0.5), -(mouse.y * Data.invScaleRatio-Data.refHeight*0.5))
#bubbleSort(Data.objs)
Data.main.update()
for obj in Data.objs:
obj.update_INTERNAL()
#printObjs()
#if was pressed, go to is pressed now
for key in Data.inputkeys:
if (Data.inputkeys[key] == 1):
Data.inputkeys[key] = 2
#if was released, go to off now
if (Data.inputkeys[key] == 3):
Data.inputkeys[key] = 0
for obj in Data.toBeDestroyed:
Data.objs.remove(obj)
Data.toBeDestroyed = []
if (Data.reloadEndOfFrame):
reload_game_immediate()
#DevTools.showFPS()
#DevTools.printObjs()
class DevTools:
lastFrame = 0
avg = 0
nFramesToUpdate = 5
nFrame = 0
def showFPS():
DevTools.nFrame += 1
if (DevTools.nFrame >= DevTools.nFramesToUpdate):
m = millis()
deltaTime = m-DevTools.lastFrame
DevTools.lastFrame = m
DevTools.nFrame = 0
DevTools.avg = DevTools.nFramesToUpdate*1000/deltaTime
ui_text("FPS: " + str(DevTools.avg), 650, 50)
def printObjs():
#objs = ""
i = 0
j = 0
for obj in Data.objs:
#objs += str(obj.z) + ", "
i+=1
if (obj.inGameScreen):
j+=1
ui_text("Objs: " + str(i) + ", in screen: " + str(j), 450, 100)
def processKeyOrMousePress(val):
if (val not in Data.inputkeys or Data.inputkeys[val] == 0):
Data.inputkeys[val] = 1
def processKeyOrMouseRelease(val):
Data.inputkeys[val] = 3
def ui_text(txt, posX, posY):
pX = (int)((posX+Data.refWidth*0.5)*Data.scaleRatio)
pY = (int)((-posY+Data.refHeight*0.5)*Data.scaleRatio)
text(txt, pX, pY )
#Processing funcs
def keyPressed():
processKeyOrMousePress(str(keyboard.key))
def keyReleased():
processKeyOrMouseRelease(str(keyboard.key))
def mousePressed():
if (mouse.button == 37):
processKeyOrMousePress("m_left")
if (mouse.button == 39):
processKeyOrMousePress("m_right")
def mouseReleased():
if (mouse.button == 37):
processKeyOrMouseRelease("m_left")
if (mouse.button == 39):
processKeyOrMouseRelease("m_right")
run()
### END PROCESSING CODE
{"main":"<xml xmlns=\"http://www.w3.org/1999/xhtml\"><block type=\"class_object\" id=\"lN!w!rj81Nwn]W^5}0L)\" x=\"405\" y=\"-15\"><field name=\"NAME\">default</field><statement name=\"start\"><block type=\"set_sprite\" id=\"6_(eRP=ZY.8!uIj4cF^1\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"b1UZX5{U+k!C9*pKP^TR\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/BirdHero.png</field></block></value><next><block type=\"set_scale\" id=\")19yIj/p8?BXcQbY#%)m\"><value name=\"NAME\"><shadow type=\"math_number\" id=\")cV0_yCpW6Q?OX(p5:8i\"><field name=\"NUM\">1e-11</field></shadow></value></block></next></block></statement><statement name=\"update\"><block type=\"controls_if\" id=\"JU+XS|E$]g7,{}:-xwM{\"><value name=\"IF0\"><block type=\"key_input\" id=\"gZ[*0eESNw#8Fx]{LcP$\"><field name=\"NAME\">1</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"tvL$1do(/c{U6acaX5gM\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"0PEsmZ=jATDkYc~KE6he\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/BirdHero.png</field></block></value><next><block type=\"set_scale\" id=\"%+lKC#k@M7he6RqKm|JE\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"M$y2*QeQ;Ay-EcjK($Gc\"><field name=\"NUM\">4</field></shadow></value><next><block type=\"ui_text\" id=\"|XzP+Fiv]?aY8?zu*/KG\"><value name=\"TEXT\"><shadow type=\"text\" id=\"gKi/Tvl@L2[2rq58y~q+\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"w%;G(_Aoz*fgkAzt?{9I\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"|MY-bO~8io/|~([}{fo:\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"l%BHhWG?rdny}*ew)u9%\"><value name=\"IF0\"><block type=\"key_input\" id=\"m4Tl@suf@6L(|ZgG|lCD\"><field name=\"NAME\">2</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"c-Z-qHt#1$k+^GMo)Evc\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"JM#BN7Uw=2wA!2kg?U@5\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/brick.png</field></block></value><next><block type=\"set_scale\" id=\"l4j9^]HQTMms2!*b^f;f\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"mh^n_,}xCc1VRio_({y`\"><field name=\"NUM\">0.5</field></shadow></value><next><block type=\"ui_text\" id=\"U+PA_T8t^qAdEB1rdu}$\"><value name=\"TEXT\"><shadow type=\"text\" id=\"qb[cCl-bh^KCO_BDL;nB\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"lL7hhzCvy7nGnd.4w6#N\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"lgDe0Yq`qJyq5V02EJ~!\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"[||p/9ykjB{|1Yd:E`/C\"><value name=\"IF0\"><block type=\"key_input\" id=\"]9ZDFXAa?EV1cbb*RHoN\"><field name=\"NAME\">3</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"W-Lkh89x:DgRI@D^EAL2\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"J3v-$eSMP~}8?d[:?R|1\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/crate.png</field></block></value><next><block type=\"set_scale\" id=\"F[AK#qm#(gj7F07VG*HF\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"#P_ADi%s`c:jv|sqoqYo\"><field name=\"NUM\">2</field></shadow></value><next><block type=\"ui_text\" id=\"I5Ca/(pOUGv8X-{0!U8#\"><value name=\"TEXT\"><shadow type=\"text\" id=\"m9.4q*gEbTYVLk5tVo`]\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"A|SBp35zQs!Vg#A.Aq,Q\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"eg_t3@?#Yg4[xrF+YAkF\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"2K4Vlb05MhhYh7oh$;#(\"><value name=\"IF0\"><block type=\"key_input\" id=\"mRlZRf_KB#M*Er7wP.cX\"><field name=\"NAME\">4</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"QGvNr6z){]wU$(e|xM1;\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"/U:7%VX5CLzZ`@ltgGFk\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Space/Nebula.jpg</field></block></value><next><block type=\"set_scale\" id=\"K~wftN-bPet~fPeMjdK!\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"q6.~~}Q{5lN6ZEt3EFIM\"><field name=\"NUM\">0.9</field></shadow></value><next><block type=\"ui_text\" id=\"+R+[m/yh8[b9~la0S1S_\"><value name=\"TEXT\"><shadow type=\"text\" id=\"$@7XY`}#Iw|1NF]k,Xr6\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"unFD/f}kH,=^ZU,(MTPm\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"4a1yqweBJD@vJk!T.C7_\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"{lzYZ+xbip?+r),gg)]6\"><value name=\"IF0\"><block type=\"key_input\" id=\"OjW]jRUvjB`OL5spL_Ho\"><field name=\"NAME\">5</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"ozA}$^AuZ[H|G:xWJWXT\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"*naW/D?wrr{oGuN#mkyT\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/spiderweb.png</field></block></value><next><block type=\"set_scale\" id=\"tIZ-G/2*}/[`Z_jUZ4ex\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"$~MlC/PVq~+Rmmax~;F1\"><field name=\"NUM\">10</field></shadow></value><next><block type=\"ui_text\" id=\"D@O/%ZJj.qVv),2h)L:d\"><value name=\"TEXT\"><shadow type=\"text\" id=\"DZz@+~.XeA]W}i]Zpfug\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"jQC0+HRr!M12C}!:KS3w\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"*G4g|$GwTq!r?@m7;fxs\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"b*c8*tflt5AGz2vYTbzi\"><value name=\"IF0\"><block type=\"key_input\" id=\"zI6,2^b@[h@Op.n[syJ{\"><field name=\"NAME\">6</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_scale\" id=\"Dv)5CV1=Z4riQkyDB_x2\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"G;y5$KGDuDSDg*3~RfE:\"><field name=\"NUM\">0.5</field></shadow></value><next><block type=\"set_sprite\" id=\"NvHF0;EMF{R5Li$Y3([i\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"bWnP*G^nm8@cUTqkG2,`\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/ColumnSprite.png</field></block></value><next><block type=\"ui_text\" id=\",*r5@1uKAW(wMw(vS%2X\"><value name=\"TEXT\"><shadow type=\"text\" id=\"Z8h+2aE2U~7^??Wt7@:%\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"jpGTSH+DXX{Ld`7@ol{7\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"Y{1O${=PHL+@)$4~P7!m\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"}V7S#It$Yjo1%EV,q-(Z\"><value name=\"IF0\"><block type=\"key_input\" id=\"H}$?,f4cy?Q/U-!Ljs+M\"><field name=\"NAME\">7</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"zvA(1l*m#vxvH.0d#W*N\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"P+RD.-1tuZWxVq)[xC:=\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/GrassThinSprite.png</field></block></value><next><block type=\"set_scale\" id=\"*bZW2F{Lcl/Cz=y-eK-^\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"7sWWVA|o@28NtbAx7DMe\"><field name=\"NUM\">0.25</field></shadow></value><next><block type=\"ui_text\" id=\":X7JXX~-zY.)Q#q-KgqV\"><value name=\"TEXT\"><shadow type=\"text\" id=\".~?)WwG`.7?v]e7q_y8e\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"-G,uNPWRxj8|@Ac#RA}3\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"4dWST|6E=UuiqQKz!:_a\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"atNo*uzCG/wNL=`5tA8,\"><value name=\"IF0\"><block type=\"key_input\" id=\"{@rtQd[Kq`,VwI+|eMap\"><field name=\"NAME\">8</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"(lr*oz=O6d;jEL%n)SPF\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"_M?:Y~8kWV.jIuVLE~V6\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/spider_run.png</field></block></value><next><block type=\"set_scale\" id=\";le1dlq,~9=c`VQDs|7g\"><value name=\"NAME\"><shadow type=\"math_number\" id=\":#VsVVMxDDU@sME:UyqY\"><field name=\"NUM\">5</field></shadow></value><next><block type=\"ui_text\" id=\"*F0Ohu`B]s`ciUDuz4tV\"><value name=\"TEXT\"><shadow type=\"text\" id=\"(G}1ZdS#H2km3J|y!wv5\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\":KO@{(nRb1~4NSO6u$ct\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"EMMDg15a:te5(u#I-IKO\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"4{6F0C*U}|8)HB=#)(J#\"><value name=\"IF0\"><block type=\"key_input\" id=\"%Rz3-${{0eO`Nf,m3aM*\"><field name=\"NAME\">9</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"fgrDPkY[4kRZpUK^U/SF\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"_[iff7~AfW{O4fa}eP;a\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Dungeon/skeleton_move.png</field></block></value><next><block type=\"set_scale\" id=\"QPxzzkpzVQcPY/-?mHhA\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"WWilM#D73}j4OP)H3f`P\"><field name=\"NUM\">2</field></shadow></value><next><block type=\"ui_text\" id=\"%-_rIZ{wc2U}hJZUgJP]\"><value name=\"TEXT\"><shadow type=\"text\" id=\"|p2D*n37m1$ea$/hz!FR\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"m0A).Iy[KG%-Yw7=MYZ7\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"~X!=[_b!7P$UPb_A6L@^\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"D{,.@rK4TA.@K4e^Z3kM\"><value name=\"IF0\"><block type=\"key_input\" id=\"Jls+tiNb_5~NA,E#W5=P\"><field name=\"NAME\">0</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"r__6N!*.(3~rj6pu;0(z\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"-bF;GA`*=+z3H?Hi7P6F\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/SkyTileSprite.png</field></block></value><next><block type=\"set_scale\" id=\"WxV6nE52?:)W!lI?}O75\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"|*K[!=]4KDCo`[1+Hvxl\"><field name=\"NUM\">3</field></shadow></value><next><block type=\"ui_text\" id=\"$!%rDdx|~Ub/4BqHWmFI\"><value name=\"TEXT\"><shadow type=\"text\" id=\"WcI5]-/2e83iL6TtMQQ#\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"*:(0|_vB{r;WfBOf71)h\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"^)g}ecpMo-?Wqgru!2+I\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"9#E7*zUGf?wRiveXiDK|\"><value name=\"IF0\"><block type=\"key_input\" id=\"M8izKVger-^ql#4LymLy\"><field name=\"NAME\">z</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"7Ejw89}88lo7/b^eY$kl\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"exX#,A+-J:.x34JSJ,Y/\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Space/Player.png</field></block></value><next><block type=\"set_scale\" id=\"oXZBhwENKcJ%aZsoUv|v\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"xSJYx^T7N|-.:FC/QjyA\"><field name=\"NUM\">4</field></shadow></value><next><block type=\"ui_text\" id=\"a|y8Tm4AK-uor8-Gq{tx\"><value name=\"TEXT\"><shadow type=\"text\" id=\"u.WvtN^5UG~n1#I=q~zM\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"5:eFM,,t`lGm(Ld6}!oh\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"0GR3=g(z|G/h38|L0]9e\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"P}G]4FE;2Yt5`pV6kDGm\"><value name=\"IF0\"><block type=\"key_input\" id=\"gt.8XQO(Ez_=iyGG!]!e\"><field name=\"NAME\">x</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"SNECb|p(qE[uJZI`?m%Q\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"2Ag54%o.0Sh#9$oea$^B\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Space/Bullet.png</field></block></value><next><block type=\"set_scale\" id=\",i.n!+h@Ec?YRIwF77)S\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"71,*hMf#Xyx8pFv,{F~)\"><field name=\"NUM\">25</field></shadow></value><next><block type=\"ui_text\" id=\"V]7x#R{,sNTIf0(l@4C_\"><value name=\"TEXT\"><shadow type=\"text\" id=\"VuuOSV8jM/eq%6%qF8:=\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"menK|2VG{G7|P2.U_B`-\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"-T/mZz)uxL`Kh:)H1~Lw\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"f90UKWUFi*!j+5f60Ss+\"><value name=\"IF0\"><block type=\"key_input\" id=\"-(X95sCcLRas7vJTa|LG\"><field name=\"NAME\">c</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\"-Ls=@:kK^LXfk`,~E2TE\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"/vVx#6K`I`oKDhLMkv9h\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Space/Enemy.png</field></block></value><next><block type=\"set_scale\" id=\"Acbr/`ihV00nOG3dT`Q-\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"zpL~^;EW/DWBr;^.@L$^\"><field name=\"NUM\">7</field></shadow></value><next><block type=\"ui_text\" id=\"nDtdPTac?QC1rSsbYEFs\"><value name=\"TEXT\"><shadow type=\"text\" id=\"Yt=i6zjOQvX2aM;LrZt!\"><field name=\"TEXT\">flappy</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"mLmoi!@+N8CCX;kc!rPl\"><field name=\"NUM\">-70</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"EEx,Il,`6Be;P(sy$g(E\"><field name=\"NUM\">-70</field></shadow></value></block></next></block></next></block></statement><next><block type=\"controls_if\" id=\"C~AS@QjpCMO^N*qQ87W@\"><value name=\"IF0\"><block type=\"mouse_input\" id=\"PWM8G9|oS+RfC3/$$,pP\"><field name=\"MOUSE\">m_left</field><field name=\"PRESSED\">key_was_pressed</field></block></value><statement name=\"DO0\"><block type=\"set_sprite\" id=\",K6{HLFeO0CpwF8=?_S-\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"/+U%V(f@Twu5B[y(24bO\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Space/Player.png</field></block></value><next><block type=\"set_scale\" id=\"7;_`5v8g~:zK2IM@Zfdo\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"*+%c?G6@zdH9!*-/KNJg\"><field name=\"NUM\">7</field></shadow></value><next><block type=\"ui_text\" id=\"WP7{q}vyZBv0ImuwZ5_{\"><value name=\"TEXT\"><shadow type=\"text\" id=\"tX*HnNxi9!1:L?ZHS9F!\"><field name=\"TEXT\">you win</field></shadow></value><value name=\"x\"><shadow type=\"math_number\" id=\"VN[},F_fK))3|W5hyzO@\"><field name=\"NUM\">-50</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"94Pa{#6ez$zeJZ-I.Brc\"><field name=\"NUM\">-50</field></shadow></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type=\"main_class_object\" id=\"M|TUBcRXfP-zXMfslc+k\" x=\"163\" y=\"113\"><statement name=\"start\"><block type=\"instantiate\" id=\"yQ*tWaAdd@4=w[ei#s7g\"><field name=\"NAME\">default</field><next><block type=\"instantiate\" id=\"905{1Z,4rwJz8+P85L$7\"><field name=\"NAME\">ui</field></block></next></block></statement></block><block type=\"class_object\" id=\"1!cn.LGbW$Y|NCAN,_uD\" x=\"-72\" y=\"221\"><field name=\"NAME\">ui</field><statement name=\"start\"><block type=\"set_sprite\" id=\"8|oKO/JIVAzU$|wDTdje\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"/1#C[ft*eRwHuSdQ%s;h\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/BirdHero.png</field></block></value></block></statement><statement name=\"update\"><block type=\"controls_if\" id=\"Yx/7zlws`xq%VIhBt^Ng\"><value name=\"IF0\"><block type=\"key_input\" id=\"i=@+!UA_LG*N3Ge%M:Wq\"><field name=\"NAME\">w</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"change_pos\" id=\"#@bAJ4VB_]n1V4!O|v#p\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"ODq^Y6v,e/HBhR!*s?jD\"><field name=\"NUM\">10</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"i_:=~!milGNjOaA|8z(4\"><value name=\"IF0\"><block type=\"key_input\" id=\"y?`o$o#K;:XG8RrSUhw8\"><field name=\"NAME\">a</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"change_pos\" id=\"^qs235iT3T4tTiX{OPqt\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"t+6|.@yFna6)n+mgyP5V\"><field name=\"NUM\">-10</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"ZvTp3:a~iu3#5i!,_aK?\"><value name=\"IF0\"><block type=\"key_input\" id=\":|E.%{G5XWLcAWvfr!l?\"><field name=\"NAME\">s</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"change_pos\" id=\"aJeZx;dX#BbJUO.2.nW-\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"DRUZv;v/*+ZMt6lEAN)R\"><field name=\"NUM\">-10</field></shadow></value></block></statement><next><block type=\"controls_if\" id=\"ej;,7[/`mTc[SMO1OFv7\"><value name=\"IF0\"><block type=\"key_input\" id=\"ii9[o5gU[,[JP.cBx5)t\"><field name=\"NAME\">d</field><field name=\"PRESSED\">key_is_pressed</field></block></value><statement name=\"DO0\"><block type=\"change_pos\" id=\"}wQcrv-$DUjO]qi:_5i=\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"T#0c9FUdtv?9cjtLMLyr\"><field name=\"NUM\">10</field></shadow></value></block></statement></block></next></block></next></block></next></block></statement></block><block type=\"key_input\" id=\"Q~6DEFMaBUy#G%:/bCcP\" disabled=\"true\" x=\"675\" y=\"1335\"><field name=\"NAME\">o</field><field name=\"PRESSED\">key_was_pressed</field></block></xml>"}