Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

New user - bug or ID-10T issue?

edited August 2012 in Bugs Posts: 116

First using codea. I like it.

This was my sample app.

After running a few times it stopped showing the ellipse when touching the screen.

Had to force close app to fix.

Anything wrong code wise or just buggy?

-- test

-- 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 a dark background color 
    background(0, 0, 0, 119)
    -- This sets the line thickness
    strokeWidth(50)
    
    ellipse(CurrentTouch.x,CurrentTouch.y,103)
    -- Do your drawin
   -- Train:draw()
end

function touched(touch)
    --print("hi")
    if touch.state == BEGAN then
   print("began")
      --  Train:touched(touch)
    end
    
end

Comments

  • you have to have ~~~ at start and end of you code

    See
    
  • Posts: 371

    I was about to ask what an ID-1OT issue is... ~X( It is a known bug in Codea, if anything unexpected happens with you code, just restart Codea, if it is still acting weird, check you code, and then report it. Your code is working fine! Welcome to Codea!

  • SimeonSimeon Admin Mod
    edited August 2012 Posts: 5,714

    .@wrmichael this should be fixed in Codea 1.4.5, just released today. Could you let us know if this solves your issues?

  • Posts: 116

    Just downloaded the new version.

    Any good tutorials? I found plenty of syntax guides and the demo apps help.

    If I want to add many sprites is it best to Create a class for each type of sprite then creat an array of sprites to call during the draw routine and maybe touched routines?

    Lua seems strait forward but codea seems like it might be a special variation of it?

    Also can I create "text" Boxes for user input?

    I'm sure I have more questions coming but hopefully a tutorial can provide most of the answers.

  • .@wrmichael - some tutorials are available at: http://codeatuts.blogspot.com.au/

    You can also have a look at the Wiki and there are heaps of code examples on this forum.

    Codea uses standard Lua (with some exceptions around networking and file handling which Apple don't like) but its own libraries which overlay this.

    There is a text box class implemented in the Spritely example project which comes with Codea. I used this to enter the high score name in MineSweeper.

Sign In or Register to comment.