-1

I'm a web developer, and have been for 10 years now. A couple of years ago I started making small games for advertising purpose, like slotmachines where you could win iPhones and such. VERY simple games.

Now I want to step it up a notch, and I have an idea I want to start with, but I lack knowledge on where to start, how to approach it and such.

My game
My game is a horse track carnival game, where you toss balls into holes which will make your horse move.

The ball game will be vertical, so this is what I need to know:

  1. How can I aim the ball, dragging from it, the opposite way? Angry-birds-like.
  2. How do I calculate the path and speed/duration?

Do I need a game libery, or what do you suggest me to do?

Thank you in advance :)

4

1 回答 1

0

How can I aim the ball, dragging from it, the opposite way? Angry-birds-like.

The same as it has always have. It doesn't matter how you aim.

In the usual case of "flick/drag to shoot" games, you drag forwards. Angry birds does it in reverse, dragging backwards.

On both methods, whichever you choose, you get a point A and B (A line). Get the angle from the horizontal, and that's your elevation. Get the distance from A to B, that would be the strength of your shot. The farther you pull back, the stronger the shot should be.

How do I calculate the path and speed/duration?

In the previous paragraph, we got an angle and strength. You can do it with a bit of physics (possibly with a ready-made physics library, or roll your own).

于 2013-06-14T09:38:42.940 回答