Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have been looking at Corona SDK and it would be helpful if I could see a tutorial/example to accomplish the following:

  1. Load an image as a background/map
  2. Draw a circle on the screen
  3. user can tap elsewhere and the circle moves to that location (this can be repeated)

Does anyone know of any examples out there?

share|improve this question

closed as too localized by Nicol Bolas, Jonathan Hobbs, Byte56, John McDonald, Trevor Powell Sep 20 '12 at 5:12

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 0 down vote accepted

Very easy to do - here's a plug and play sample;

local background = display.newRect( 0, 0, 320, 480 )
background:setFillColor(0, 200, 255)

local circle = display.newCircle( -100, 0, 20 )

local function moveCircle(event)
    circle.x = event.x
    circle.y = event.y
end
background:addEventListener("tap", moveCircle)

Though obviously you'd you an image, I'm using a rectangle.

share|improve this answer
    
Thank you! This is getting me off to a good start. –  B5Fan74 Sep 10 '12 at 20:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.