Sign in to follow this  

What to learn to create a 2d golf game?

This topic is 1276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

This topic is 1276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this