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\"><variables><variable type=\"\" id=\"==ymq%gI.c5:7ofe_D9Q\">yVelocity</variable><variable type=\"\" id=\"3;JyAKKJZ2%Dj1FK%c4w\">pipeTimer</variable><variable type=\"\" id=\"l9|+/Ce;3h4)XEu`!R98\">gravity</variable><variable type=\"\" id=\"{I;nV%f5|Utaz9Idx{r/\">TimeAlive</variable><variable type=\"\" id=\"mzO*ht!LY~MV2}qb%*f3\">UpOrDown</variable></variables><block type=\"main_class_object\" id=\"M|TUBcRXfP-zXMfslc+k\" x=\"-705\" y=\"-435\"><statement name=\"start\"><block type=\"instantiate_at_pos\" id=\"rmUd]0|,2RL4]=1|Tbk[\"><field name=\"type\">Background</field><value name=\"x\"><shadow type=\"math_number\" id=\"g{5z:7HdWiVXNfY@~`=h\"><field name=\"NUM\">0</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"oc4X8aD]U?hkrF-~x~bu\"><field name=\"NUM\">-300</field></shadow></value><next><block type=\"instantiate_at_pos\" id=\"pE+)H.{gB%bnNsqsjhVy\"><field name=\"type\">Flappy</field><value name=\"x\"><shadow type=\"math_number\" id=\"=:l_[0kwo];P=*D:ss$(\"><field name=\"NUM\">-250</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"g.l.V$C}}m]nQdsXx5qq\"><field name=\"NUM\">50</field></shadow></value><next><block type=\"instantiate_at_pos\" id=\"EMo|J*~U!P4,{/A^?2RU\"><field name=\"type\">PipeSpawner</field><value name=\"x\"><shadow type=\"math_number\" id=\"rcgts$UM$iTA~S7$nNe6\"><field name=\"NUM\">450</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"?tA(m3k+A=]quzHib{cA\"><field name=\"NUM\">0</field></shadow></value><next><block type=\"variables_set_custom\" id=\"tcdX$hgAwVS;+]_)?hdN\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"{I;nV%f5|Utaz9Idx{r/\" variabletype=\"\">TimeAlive</field><value name=\"VALUE\"><block type=\"math_number\" id=\"1b5A1I78yCq!lS.ez!o$\"><field name=\"NUM\">0</field></block></value></block></next></block></next></block></next></block></statement><statement name=\"update\"><block type=\"ui_text\" id=\"_7zU4uBvNU7+d)`3OyG1\"><value name=\"TEXT\"><shadow type=\"text\" id=\"qUEX~]4oM5Mm9F5)GT,7\"><field name=\"TEXT\">wtwt</field></shadow><block type=\"variables_get_custom\" id=\",x?)4}TejN6T$3pH8~Uf\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"{I;nV%f5|Utaz9Idx{r/\" variabletype=\"\">TimeAlive</field></block></value><value name=\"x\"><shadow type=\"math_number\" id=\"#sxB9j-b$i7eP(y~]sC{\"><field name=\"NUM\">250</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"Ry=}CrUfo~|y)h{z$y9D\"><field name=\"NUM\">220</field></shadow></value></block></statement></block><block type=\"class_object\" id=\":BVURCTfo]FV*IZJ1WO9\" x=\"-975\" y=\"-75\"><field name=\"NAME\">PipeSpawner</field><statement name=\"start\"><block type=\"variables_set_custom\" id=\"bXmV}8[cV7oNgGRJ~ua%\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"3;JyAKKJZ2%Dj1FK%c4w\" variabletype=\"\">pipeTimer</field><value name=\"VALUE\"><block type=\"math_number\" id=\"BCH:REQ(L76JmA$@z)w]\"><field name=\"NUM\">0</field></block></value></block></statement><statement name=\"update\"><block type=\"variables_change_custom\" id=\"cE5Jkh=)Ah`~a6JMjTY8\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"3;JyAKKJZ2%Dj1FK%c4w\" variabletype=\"\">pipeTimer</field><value name=\"VALUE\"><block type=\"math_number\" id=\"?mzdFV8+ggQvfbP,emS$\"><field name=\"NUM\">1</field></block></value><next><block type=\"controls_if\" id=\"U1ee[iW9GQw3+(cHes?7\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"0yk-vv;i~GlXoy?6hxPM\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"variables_get_custom\" id=\",q=4vEYV0q%l2$gNGQbA\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"3;JyAKKJZ2%Dj1FK%c4w\" variabletype=\"\">pipeTimer</field></block></value><value name=\"B\"><block type=\"math_number\" id=\",y##Ynw_mj=K8A?7)Sm$\"><field name=\"NUM\">200</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_set_custom\" id=\"%^8yGX@suNP7OOz~=~%G\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"mzO*ht!LY~MV2}qb%*f3\" variabletype=\"\">UpOrDown</field><value name=\"VALUE\"><block type=\"math_random_int\" id=\"m4Ie!^lG.Ohq=g5`p,C!\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"6Uzg^m=t-5%i_xf.R4*I\"><field name=\"NUM\">1</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"Y+Cccs[6Bhy_Vk)}Y9nb\"><field name=\"NUM\">2</field></shadow></value></block></value><next><block type=\"controls_if\" id=\".U4LAmAK0.3aK#hDyjJq\"><mutation else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_compare\" id=\"Kn2n-GF$zGHDgiZ+5tmN\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"variables_get_custom\" id=\"yO,2Bf]60*$:@=Tc_l^g\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"mzO*ht!LY~MV2}qb%*f3\" variabletype=\"\">UpOrDown</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"^i(iu41#]1.=3WP~,VzG\"><field name=\"NUM\">1</field></block></value></block></value><statement name=\"DO0\"><block type=\"instantiate_at_pos\" id=\"l@^,@/!h!Z#J_s,WTM6)\"><field name=\"type\">Pipe</field><value name=\"x\"><shadow type=\"math_number\" id=\"AMLE5!).-Se!Y#o9U7)6\"><field name=\"NUM\">450</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"(rsk!(*0|)26e7/RJksX\"><field name=\"NUM\">400</field></shadow><block type=\"math_random_int\" id=\"NfTH2x5Hc.@%Sz8jot$O\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"xaEYB!1YhQ$,vOCo!TQq\"><field name=\"NUM\">400</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"xBCaAh~2c;Io!1CE%P$4\"><field name=\"NUM\">600</field></shadow></value></block></value></block></statement><statement name=\"ELSE\"><block type=\"instantiate_at_pos\" id=\"rf#3HYKj4[EF0-3d0(q!\"><field name=\"type\">Pipe</field><value name=\"x\"><shadow type=\"math_number\" id=\"o)tLhO:guTNZZ-lQ,*@v\"><field name=\"NUM\">450</field></shadow></value><value name=\"y\"><shadow type=\"math_number\" id=\"7phgSuOuX-4I|T5_C%C@\"><field name=\"NUM\">-400</field></shadow><block type=\"math_random_int\" id=\"wj$$T2])?d^PG+.#sx{_\"><value name=\"FROM\"><shadow type=\"math_number\" id=\"-0D}c3~3v]y)=1X^T)(7\"><field name=\"NUM\">-600</field></shadow></value><value name=\"TO\"><shadow type=\"math_number\" id=\"{5DU6D8{Tra0tpNHD,/6\"><field name=\"NUM\">-400</field></shadow></value></block></value></block></statement><next><block type=\"variables_set_custom\" id=\"E0CyH?0(R]}3r^Q32Xrk\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"3;JyAKKJZ2%Dj1FK%c4w\" variabletype=\"\">pipeTimer</field><value name=\"VALUE\"><block type=\"math_number\" id=\"/?eBqlp4MvE#y}zBkNXX\"><field name=\"NUM\">0</field></block></value></block></next></block></next></block></statement></block></next></block></statement></block><block type=\"class_object\" id=\"Arw2ef5%~ec1{H|i*aVI\" x=\"-315\" y=\"-75\"><field name=\"NAME\">Background</field><statement name=\"start\"><block type=\"set_sprite\" id=\"T?VF+UC0!~iW}u(KHNa4\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"XfnTTt$@Ro8Qy3BFD]:C\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/SkyTileSprite.png</field></block></value></block></statement></block><block type=\"class_object\" id=\"MNMg(|f:+J0*n09z+JlO\" x=\"-315\" y=\"105\"><field name=\"NAME\">Flappy</field><statement name=\"start\"><block type=\"set_sprite\" id=\"t1z#`(p|-K11CZQ(0(YD\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"V!2vM0(4Hy#50EqM@[(9\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/BirdHero.png</field></block></value><next><block type=\"variables_set_custom\" id=\"hW`mL*rTK-,GxQUl79PD\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"l9|+/Ce;3h4)XEu`!R98\" variabletype=\"\">gravity</field><value name=\"VALUE\"><block type=\"math_number\" id=\"zTwNZ/:yf9?kmiR~IE:%\"><field name=\"NUM\">-0.3</field></block></value><next><block type=\"variables_set_custom\" id=\"i!xC@ULehzvIb-9}5vXJ\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field><value name=\"VALUE\"><block type=\"math_number\" id=\"JO,*NQ,vlDDzEF|YNo=W\"><field name=\"NUM\">0</field></block></value></block></next></block></next></block></statement><statement name=\"update\"><block type=\"variables_change_custom\" id=\"QzLk]=o1`Om0NZGPPPed\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field><value name=\"VALUE\"><block type=\"variables_get_custom\" id=\"4u82xf$m;UvT!~jul(2G\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"l9|+/Ce;3h4)XEu`!R98\" variabletype=\"\">gravity</field></block></value><next><block type=\"change_pos\" id=\"TRgd$u~)r~=OZ7L:+_Wy\"><field name=\"position\">y</field><value name=\"NAME\"><shadow type=\"math_number\" id=\".BxBkQHVAy$_H!**vait\"><field name=\"NUM\">-5</field></shadow><block type=\"variables_get_custom\" id=\"*?-(xhPAH%%k7bm8KQoW\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field></block></value><next><block type=\"controls_if\" id=\"x_w0g=kAtOh2:R)e({T|\"><value name=\"IF0\"><block type=\"key_input\" id=\"/11,y$|N-?N9O3Bks%W$\"><field name=\"NAME\"> </field><field name=\"PRESSED\">key_was_pressed</field></block></value><statement name=\"DO0\"><block type=\"variables_change_custom\" id=\"V6JhY{!8~OpR^X([14?V\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field><value name=\"VALUE\"><block type=\"math_number\" id=\"vP+d=!kVMUR(T}EIT0Im\"><field name=\"NUM\">3</field></block></value></block></statement><next><block type=\"controls_if\" id=\"7RAM)i^Zw#z~-T!nNazV\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"ZHYsVf51%`D6A[8u|MlV\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"variables_get_custom\" id=\"KEvtWU@e~Y+3V{8y)zy@\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"+h-`A{V;0IG)z~lE!X{P\"><field name=\"NUM\">-4</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_set_custom\" id=\"py!?bWDdDk6v+U@U!v]?\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field><value name=\"VALUE\"><block type=\"math_number\" id=\"M;Yp8vgj5X-R0@d7h+_J\"><field name=\"NUM\">-4</field></block></value></block></statement><next><block type=\"controls_if\" id=\"uKpOryfgU)dhX?New#^9\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"f4RZlGGm#f9ye268.Z0g\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"variables_get_custom\" id=\"u#CfO97(VbBfSDs7tkSw\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"sNw7rF1#/=iNI^gk(u;b\"><field name=\"NUM\">6</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_set_custom\" id=\"Vx?+?mm3iX9D@.?W/6=,\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"==ymq%gI.c5:7ofe_D9Q\" variabletype=\"\">yVelocity</field><value name=\"VALUE\"><block type=\"math_number\" id=\"5}Rs1~.OEVjTdiy_^.V+\"><field name=\"NUM\">6</field></block></value></block></statement><next><block type=\"controls_if\" id=\"27ebrD|~7TNH6.3Pp@:D\"><value name=\"IF0\"><block type=\"collision_check\" id=\"{9E5KR8=!H}rOfN$a3l@\"><field name=\"NAME\">Pipe</field></block></value><statement name=\"DO0\"><block type=\"reload_game\" id=\":A=]H(YHIshZxZn#+}7U\"></block></statement><next><block type=\"controls_if\" id=\"LofW*WHRYF@1}e`ooAM4\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"Wei.SkaM#yWaMvsNdABe\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"get_pos\" id=\"Tw$DHDyTElq@@:sIyE.X\"><field name=\"pos\">y</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"0Qr}beYZPWK3V{k~M!{X\"><field name=\"NUM\">-300</field></block></value></block></value><statement name=\"DO0\"><block type=\"reload_game\" id=\"^!IXr3/g2Nfu1gCFPa7)\"></block></statement><next><block type=\"controls_if\" id=\"jky*a.ej.q0fVV;8}:-B\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"HIt2bbGXNc8xI2YM]1l+\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"get_pos\" id=\"{_j*2XXAmlPNgWeta*A%\"><field name=\"pos\">y</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"BH-S=9?x^*wu$Z^$[y#$\"><field name=\"NUM\">300</field></block></value></block></value><statement name=\"DO0\"><block type=\"reload_game\" id=\"]*+IL5VStGE$.R,8k~85\"></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type=\"class_object\" id=\"~RE}6w]+g3}C*q:`K:_s\" x=\"-975\" y=\"405\"><field name=\"NAME\">Pipe</field><statement name=\"start\"><block type=\"set_sprite\" id=\"2/(ySG$^p#YL83Yo?xph\"><value name=\"SPRITE\"><block type=\"sprite\" id=\"rd3PX@cin;epBU)}B+mD\"><field name=\"SPRITE\">https://s3-us-west-1.amazonaws.com/media.pixelpad.io/Blockly_Assets/Flappy/ColumnSprite.png</field></block></value><next><block type=\"controls_if\" id=\"3?5amB(cMq@K;=$Z]Y{r\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"Uf/*UB,is{wN?a#(X=gp\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"variables_get_custom\" id=\"|}{Hk+z!nxPM3V3U$%pZ\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"mzO*ht!LY~MV2}qb%*f3\" variabletype=\"\">UpOrDown</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"-dV/SEFK,S^9OcR|e#c)\"><field name=\"NUM\">1</field></block></value></block></value><statement name=\"DO0\"><block type=\"set_rot\" id=\"0WARA?Yuzcfr(E}-X_J9\"><value name=\"NAME\"><shadow type=\"math_number\" id=\"9[Yzu${71EqDr9=g:6m?\"><field name=\"NUM\">180</field></shadow></value></block></statement></block></next></block></statement><statement name=\"update\"><block type=\"change_pos\" id=\"EP{C(3jWF-yyh.|4Ew[5\"><field name=\"position\">x</field><value name=\"NAME\"><shadow type=\"math_number\" id=\"qtTc#FGI+6[oDiWh+Q/@\"><field name=\"NUM\">-2</field></shadow></value><next><block type=\"controls_if\" id=\"?QgS#5orL7o4}`3qs.,v\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"jpdS8m|1THI7m/F#^k?/\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"get_pos\" id=\":hu0I]wJP+igkcOrhD`;\"><field name=\"pos\">x</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"Y_aI@fv59t;k@Dn_a{)F\"><field name=\"NUM\">-400</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_change_custom\" id=\"*%Vy=A$1?]!q`I+4V^?V\"><field name=\"TYPE\">Global.</field><field name=\"VAR\" id=\"{I;nV%f5|Utaz9Idx{r/\" variabletype=\"\">TimeAlive</field><value name=\"VALUE\"><block type=\"math_number\" id=\"/|p)r.g=w-X@oPHaR1=C\"><field name=\"NUM\">1</field></block></value><next><block type=\"destroy\" id=\"@lP:X$7-KSDFwhDs6VUz\"><value name=\"NAME\"><block type=\"self\" id=\"T/;N6.)EjI}RTY`dWj+=\"></block></value></block></next></block></statement></block></next></block></statement></block></xml>"}