Skip to content

amir

My feedback

1 result found

  1. 377 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    192 comments  ·  General » Other  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    amir commented  · 

    thus is a fun game copy and paste

    fill('hills2')
    function platform(i) {
    y = i * 300
    p = stamp('platform',375,i*300,220)
    p.startY = y
    }
    repeat(platform, 4)

    hero = stamp('plumber',385,750,300)
    function touching() {
    if (x > hero.x) {
    hero.change('plumber')
    } else {
    hero.change('plumber2')
    }
    hero.move(x,y,500)
    }
    altitude = 0
    power = 50
    gravity = 4
    speed = power
    score = 0

    function obstacles() {}
    function death() {}

    function scroll(block) {
    block.move(block.x,block.startY+altitude)
    if (block.y > 1100) {
    block.startY = block.startY-990-random(200)
    block.move(random(800),block.y)
    }
    }

    function loop() {
    speed = speed - gravity
    altitude = altitude + speed
    find('platform').forEach(scroll)
    if (speed < 0 && hero.hits('platform')) {
    speed = power
    sound('jump2')
    stamp('pow',hero.x,hero.y)
    hero.move(hero.x,hero.y-20)
    }
    obstacles()
    if (speed < -100) {
    death()
    }
    }

    coin = stamp('coin',500,500)
    coin.startY = 500
    baddie = stamp('poop',700,150,100)
    baddie.startY = 150
    function obstacles() {
    scroll(coin)
    scroll(baddie)
    if (speed < 0 && hero.hits(coin)) {
    speed = power * 2
    score = score + 1
    sound('coin')
    }
    if (hero.hits(baddie)) {
    death()
    }
    }

    function death() {
    stamp('coin',300)
    text(score,375,350,150,'impact','center')
    loop = null
    touching = null
    hero.move(DOWN,2000,1000)
    sound('flush')
    }
    song('brothers')

Feedback and Knowledge Base