Acorn Mayhem - Now Available!

@Saturn031000, glad you like the slider :).

your suggestions for the tutorial are basically what I have planned :slight_smile:

~Patrick

overlap of the How to Play and Interactive Tutorial button in Portrait

@GriffinC I know, it is fixed in the next release :slight_smile:


~Patrick

I have completed the interactive tutorial in the latest version (0.12.0) :).
Try it out and let me know what you think :).

~Patrick

@GriffinC, @Staples I see you have installed the update, what do you think?

~Patrick

I like it the tutorial made me almost beat my highscore 600 some points from tutorial! My highscore was 712 without

@pleiser Just a suggestion, make the tutorial text slightly bigger.

@GriffinC, glad you like it :slight_smile: do you think that is a problem, should I reset points for that round at the end of the tutorial (or not save it?)

@Saturn031000, thanks for the feedback, I will look into that :slight_smile:

~Patrick

I have submitted Acorn Mayhem to Apple! :slight_smile: :smiley: (you should be able it find it here once apple approves it! :slight_smile:

!!!

I bet if the 3500 some users on the forum got your app and rated it you would be in top 200

@GriffinC, Probably. @everyone, get and rate my app when it comes out! :slight_smile: :wink: :stuck_out_tongue:

~Patrick :slight_smile:

@pleiser Tell us when it gets approved. Also, just for fun, I made a small clone of the game. :wink:

Code:

--# Main
-- Falling Balls

-- Use this function to perform your initial setup
function setup()
    fbs={}
    timer=0
    rectx=WIDTH/2
    score=0
    began=false
    parameter.number("PlayerSpeed", 1, 15, 5)
    parameter.number("BallSpeed", 1, 10, 3)
    parameter.integer("BallsPerSecond", 1, 10, 1)
    parameter.action("Restart Game", function() score=0 began=false fbs={} rectx=WIDTH/2 end)
    parameter.action("Reset Parameters", function() PlayerSpeed=5 BallSpeed=3 BallsPerSecond=1 end)
end

-- This function gets called once every frame
function draw()
    local Remove={}
    -- This sets a dark background color 
    background(0, 0, 0, 255)
    -- This sets the line thickness
    strokeWidth(5)
    line(0, 100, WIDTH, 100)
    if began then
        timer = timer + DeltaTime
    end
    -- Do your drawing here
    if timer>1/BallsPerSecond then
        timer=0
        table.insert(fbs, Ball(math.random(0, WIDTH), HEIGHT))
    end
    for p,b in pairs(fbs) do
        b:draw()
        if b.y<120 then
            if b.x>rectx-35 and b.x<rectx+35 then
                score = score + 1
            end
            table.insert(Remove, p)
        end
    end
    for a,b in pairs(Remove) do
        table.remove(fbs, b)
    end
    strokeWidth(5)
    rectMode(CENTER)
    fill(0, 29, 255, 255)
    rect(rectx, 90, 70, 25)
    if began then
        if CurrentTouch.state~=ENDED then
            if CurrentTouch.x>WIDTH/2 and rectx<WIDTH-35 then
                rectx = rectx + PlayerSpeed
            end
            if CurrentTouch.x<WIDTH/2 and rectx>35 then
                rectx = rectx - PlayerSpeed
            end
        end
    end
    pushStyle()
    fill(255, 255, 255, 255)
    font("HelveticaNeue-UltraLight")
    fontSize(72)
    if began then
        text("Score: "..score, WIDTH/2, HEIGHT-250)
    else
        text("Touch to Begin", WIDTH/2, HEIGHT-250)
    end
    fontSize(32)
    font("HelveticaNeue-Light")
    text("By Saturn031000", WIDTH- 150, 50)
    popStyle()
end

function touched(t)
    if began==false then
        began=true
    end
end

--# Ball
Ball = class()

function Ball:init(x, y)
    -- you can accept and set parameters here
    self.x = x
    self.y = y
end

function Ball:draw()
    -- Codea does not automatically call this method
    noStroke()
    fill(224, 202, 9, 255)
    ellipse(self.x, self.y, 40)
    self.y = self.y - BallSpeed
end

@Saturn03100 In ~table.remove(fbs, pairs)~ I had to take out pairs and put p, b then the game worked

@GriffinC Sorry, typo. The code is now updated.

@Saturn031000, good job on the clone :slight_smile: :wink:

no news yet on Acorn Mayhem (still “waiting for review” :()

It is interesting to compare how your code is different than the code for Acorn Mayhem :). I notice that you used table.insert to create a new ball, while in acorn mayhem I iterate through an array of 150 acorns (with an if statement skipping most of the code if the acorn is offscreen). I wonder if your way might be a more efficient alternative for Acorn Mayhem :-? :slight_smile:

~Patrick

@pleiser Interesting way to handle the acorns.

Acorn Mayhem is now available on the app store! :slight_smile: :slight_smile: :slight_smile: :)) :)) :)) :smiley: :smiley: :smiley: (https://itunes.apple.com/us/app/acorn-mayhem/id894369624)


~Patrick :slight_smile: :smiley:

congratulations, its fun!
noticed spelling mistake…aviod should be avoid

@piinthesky, glad you like it :slight_smile:

thanks for the feedback, I have fixed the typo in the next version (probably 1.0.1) :slight_smile:

~Patrick