I want to code a 2d golf game similar to NES Open Tournament using C++ and Allegro 5. Ive got a bunch of games under my belt already, but I just don't know how to approach this type of gameplay. I want to keep things like air physics as simple as possible. Any ideas?
What to learn to create a 2d golf game?
Crossbones+ - Reputation: 4153
Posted 18 June 2014 - 09:44 AM
It shouldn't be too difficult. You'll need to have a plan for how the ball and player will interact with the course map. Meaning, you have a image of the hole you're on, and you hit the ball in the sand, how will you map the "sand" location to an x, y range? A simple approach would be to test the pixel color the ball landed on.
As far as ball flight, you'll have to deal with a pseudo Z location (assuming top-down view), which be how high the ball is in the air, and create a little algorithm that applies pressure each frame in one direction to simulate wind. Each club would produce different forces, based on loft of club, swing speed, and weight of club (woods have more force).
Other than that, I don't see it being too difficult, just standard golf UI, score keeping, menus, etc.
---(Old Blog, still has good info): 2dGameMaking
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)