I need some pointers on making an on screen joystick [RESOLVED]

You probably know me as the most anoying person on here.
I have been trying for 2 weeks to google research and program an on screen virtual joystick.
I have found nothing…
If you could give me any pointers that would be great!
Yours truly

@TheRogueBatcher anytime. I didn’t write it, I just found it and made it more accessible.

Thanks. I was on windows 7. Now here on ipad2 the long press works great.

Actually short pressing works too. : – )

@TheRogueBatcher You’re not the most annoying person on here…

I hope SkyUI will have a built-in joystick (with multiple styles). For now though, the others have some good examples.

@Dwight Welcome to the Codea Forums! That’s a Codea Community project, you long press that little broken image icon, select copy, then go back to your Codea, long press new project, select paste into project, and choose a name. Press done and it’s installed.

Thanks guys you did more work than I asked for WOW

Ps a special thanks to whoever made the joystick example

I plugged joystick into the search box.


I’m creating a project with the examples for you.

@TheRogueBatcher Not sure if this is what you’re after. Just touch the screen and move in any direction.


function setup()

function draw()
    background(40, 40, 50)
    sprite("Planet Cute:Character Boy",cx,cy)
    if x + y>0 then
        ellipse(x,y,8)    -- draw circle center
        ellipse(x,y,200)    -- draw outer circle

function touched(t)
    if t.state==BEGAN then    -- starting center point
    elseif t.state==MOVING then
    elseif  t.state==ENDED then    -- done moving

By @Nat


Good Afternoon -
Please forgive my noobness. When I go to that link:

I get an air-code like project. But I am unable to look at the other tabs. I can only see the first tab.

@Dwight are you on an ipad1? Try long pressing the icon next to where it says touch and longpress the icon. Click copy and paste into a new project.

Well thanks anyway for the effort

There is an old class out here called controllers. Confusing but effective. Used it in Cofender code.

This thread has been dormant for over a month. Please do not resurrect it and thank you

@TheRogueBatcher Given that that month included a holiday period for most people, it’s not surprising that someone’s been away from the forums for a while and is just catching up. Moreover, the time stamps just say “December 2013” which could actually have been just over a week ago. So it isn’t unreasonable that aciolino thought this still an open thread and just wanted to point out something that might help.

We don’t like very old threads being bumped because the usual reason is someone posting a new question that doesn’t make sense without reading the old discussion and in all likelihood everyone involved has forgotten it. But I think that the grace period is a little longer than you’ve allowed for here.

In addition, I would make the politeness message about resurrecting old threads time-dependent. Yours is a little abrupt, and I would only use that on threads of the order of a year or more without activity. For this, I would prefer something like “Thanks for your suggestion, I’m no longer interested in this thread but I’ll bear it in mind if ever I need to come back to it.” and then maybe change the title so that it has the word “closed” or “solved” or “resolved” in it.

Anyway lets not talk on this thread anymore so that it sinks away