Jump to content
  • Advertisement
Sign in to follow this  
ISDCaptain01

What to learn to create a 2d golf game?

This topic is 1493 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
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!