Wiki

Clone wiki

Core / kidpos

When we finished our last game of Hide and seek our code still looked like this.

-- Use this function to perform your initial setup
function setup()
    print("Hello World!")
end

-- This function gets called once every frame
function draw()
    -- This sets the background color to black
    background(0, 0, 0)
    -- Do your drawing here
    sprite("SpaceCute:Background",374,374)
    sprite("Planet Cute:Character Boy",100,100)
end

Spritey is bored with that place, so, we will move him.

Change those numbers next to Spritey like this:

sprite("Planet Cute:Character Boy",200,100)

Spritey moved right!

Now change the other one.

sprite("Planet Cute:Character Boy",200,200)

Spritey moved up!

Try many different numbers. They do not have to end in 00. Try 123.

If you try something much bigger than 700 then Spritey is too far for us to see. Try 800.

Next: X marks the spot

Updated