2D Map Creator

Made this when I was camping, literally took like an hour in all *left for 2/3 weeks

-- Map Creator

--Created by:

--©Apple Smell Games™

function setup()

    supportedOrientations(LANDSCAPE_RIGHT)

backingMode(RETAINED)

parameter.boolean("Store", false)

parameter.boolean("Water", false)

parameter.boolean("Grass1", false)

parameter.boolean("Grass2", false)

parameter.boolean("Water2", false)

parameter.boolean("Trees", false)

parameter.boolean("Rock", false)

parameter.boolean("Star", false)

parameter.boolean("Gem_Blue", false)

parameter.boolean("Sign", false)

parameter.boolean("House", false)

parameter.boolean("Fence")

parameter.text("SignText", "Hi World!")

parameter.integer("SignWidth", 1, 100, 50)

parameter.integer("SignHeight", 1, 100, 50)

end

function draw()

fill(0, 0, 0, 0)

rect(0,0,WIDTH,HEIGHT)

if Store == true and CurrentTouch.state == BEGAN then

    sprite("Small World:Store Extra Large", CurrentTouch.x, CurrentTouch.y)

    end

    if Water == true and CurrentTouch.state == BEGAN then

        sprite("Platformer Art:Water", CurrentTouch.x, CurrentTouch.y)

    end

    if Grass1 == true and CurrentTouch.state == BEGAN then

        sprite("Planet Cute:Grass Block", CurrentTouch.x, CurrentTouch.y)

    end

    if Grass2 == true and CurrentTouch.state == BEGAN then

        sprite("Platformer Art:Block Grass", CurrentTouch.x, CurrentTouch.y)

    end

if Water2 == true and CurrentTouch.state == BEGAN then

        sprite("Planet Cute:Water Block", CurrentTouch.x, CurrentTouch.y)
    end
if Trees  == true and CurrentTouch.state == BEGAN then

        sprite("Small World:Tree Round", CurrentTouch.x, CurrentTouch.y)

    end

if Rock == true and CurrentTouch.state == BEGAN then

        sprite("Small World:Rock", CurrentTouch.x, CurrentTouch.y)

    end

if Star == true and CurrentTouch.state == BEGAN then

        sprite("SpaceCute:Star", CurrentTouch.x, CurrentTouch.y)

    end

if Gem_Blue == true and CurrentTouch.state == BEGAN then

        sprite("Planet Cute:Gem Blue", CurrentTouch.x, CurrentTouch.y)

    end

if Sign == true and CurrentTouch.state == BEGAN then

        sprite("Small World:Sign", CurrentTouch.x, CurrentTouch.y, SignWidth, SignHeight)

        fontSize(20)

        fill(255, 255, 255, 255)

        text("" ..SignText, CurrentTouch.x, CurrentTouch.y)

    end

if House == true and CurrentTouch.state == BEGAN then

        sprite("Small World:House", CurrentTouch.x, CurrentTouch.y)

    end

if Fence == true and CurrentTouch.state == BEGAN then

    sprite("Platformer Art:Fence", CurrentTouch.x, CurrentTouch.y)

    end

end

@code_maker - that’s ok for one hours work, but I’d improve it by putting all the map items into a table so you don’t need to repeat all that code over and over (there’s an old programming rule never to repeat code if you can help it), and by using visual icons for the map items instead of parameters - eg you could press an icon that brings up a set of items on screen, touch the one you want, then it gets put on the screen and you can slide it with your finger to the position you want.