Hi,
I’ve been trying to learn Corona for a few days now, I’ve sat thru these ones;
Corona SDK Game 01: Orb Smasher
Corona SDK Game 02: Balloon Burst
Lesson 02: Creating an Analog Clock App
Lesson 03: Create an Accelerometer Driven Application
Lesson 04: Develop an Entertaining Magic Ball Application
And a few others about Storyboard. Now I’ve intensly used GameSalad before and I’m so-so at C,C++ programming but all I did on those languages was file editing or data storing jobs, so not much to do with game design.
I’m trying to port 1 of the games I made in GameSalad to Corona. So my first *problem* I couldn’t tackle is;
I have a ball on X2,Y2 coordinates. And when I touch somewhere on the screen (X1,Y1) I want the ball to move along that line until it reaches out of the visible screen. To do that on GameSalad I built something that “Finds the equation of the line ( (y2-y1/x2-x1) = (y-y2 / x - x2) ) and makes the new point coordinates (X, TargetY) and calculates X according to pre-set TargetY --> i.e. (X, 2000)”
Which means, I write the line equation, set Y to something off-screen (like 2000) and calculate the X. It worked flawlessly but I can not implement that on Corona. And here is an image of what I’m trying to do;

And my failed code;
local Y2 = 10 local X2 = display.contentWidth/2 local function onScreenTouch(event) if (event.phase == "began") then X1 = event.x Y1 = event.y m1 = (Y2 - Y1)/(X2 - X1) TargetX = (2000 - Y2 + ( m1 \* X2 ) ) / m1 print("\nevent.x = " .. event.x .. "\nevent.y = " .. event.y .. "\nm1 = " .. m1 .. "\nTargetX = " .. TargetX) circle = display.newCircle( X2, Y2, 10 ) circle.enterFrame = Move Runtime:addEventListener ( "enterFrame", circle ) end end function Move(obj) if (obj.x \< TargetX) then obj.x = obj.x + 5 end if (obj.y \< 2000) then obj.y = obj.y + 5 end end Runtime:addEventListener( "touch", onScreenTouch )
And of course, this failed miserably 
And besides that, I’m having a hard time with learning Corona even though I have programming experience prior to that. Any advice on what should I do to speed up my learning curve? And I’m guessing I’ll have 100s of problems like this when I’m making a game, I can’t come running to forums each time… So… What should I do?

