Howdy, Stranger!

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

I'm new. What do I do?

in General Posts: 1

I don't know how to code this stuff


  • SimeonSimeon Admin Mod
    Posts: 5,531
    Start by trying to get a circle to draw on the screen. (You could use `ellipse(WIDTH/2, HEIGHT/2, 100)` in the `draw()` function)

    Then try changing its colour and outline.

    Then try making it move under your finger.
  • dave1707dave1707 Mod
    edited April 2017 Posts: 8,968

    @Zade Here's a simple example. Slide your finger around the screen to move the circle. Try changing the starting x,y or background or fill or ellipse numbers to see what happens. Look thru the built in reference or the forum examples to see everything that you'll be able to do. Plus ask questions, that's what the forum is all about. It takes time to learn all of this.

    displayMode(FULLSCREEN) -- shows full screen
    function setup()     -- this gets called once at startup
        x=200   -- starting x position
        y=300   -- starting y position
    function draw()      -- this gets called 60 times per second
        background(40, 40, 50)  -- set background color
        fill(255,0,0)       -- set ellipse color 
        ellipse(x,y,100)    -- ellipse x,y position and size
    function touched(t)      -- this gets called when something touches the screen
        x=t.x   -- your finger x screen position
        y=t.y   -- your finger y screen position  
  • I started by reading the documentation, and modifying the examples i found within

Sign In or Register to comment.