Hello…
Most of the shooting games are like “Galaga”
straight bullets to spaceships
I have a different approach. And I need your help, thanks for everything.
I have a ball that moves along in a path. using transition.
local movePath = {} movePath[1] = { x=1327, y=57, time=20} movePath[2] = { x=1318, y=107, time=2000, easingMethod=easing.outBounce } movePath[3] = { x=1347, y=182}
So the ball is moving on the screen, everywhere…
In the middle of the screen, on the bottom
I have the “fire” bullet.
an image green ball that when I touch it
moves a bullet towards the ball.
--// CODE HERE ------------------------------------------------------------------- transition.to(bullet, {time=150, x = crazyBall.x, y = crazyBall.y}) greenBall.alpha = 1 --//END CODE HERE ----------------------------------------------------------------
So I touch, it follows the ball.
QUESTIONS
1.- How do I “touch” the screen and send the bullet
to the direction of where I touched and keep going off the screen
2.- How to calculate the angle, or rotation of the bullet
so it looks normal to where I touch.
3.- How do I detect if the bullet makes “collision” with the ball
that is moving along the path.
I am not using “physics”
4.- How do I “remove” the bullet after it goes off the screen
This is the general idea
Any help, please.
I tried 3 shooting games sample and also the shooting game on Corona
but they use “physics” and also they are shooting straight and not the rotation
Thanks
Victor