Jump to content
  • Advertisement
Sign in to follow this  
Zerd

How to build a board game?

This topic is 4329 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

Hello, I plan to program a small board game. I want this board in a 3D environment, so that the pawn-Model is a 3D-Object standing on the (2D?) map. I don't really know what's the best way to save the players position on the map and the fields on the map where the player is able to move to. Greetings Zerd

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Use a 2d array

Share this post


Link to post
Share on other sites
That seems game-specific. For instance, in a Monopoly-like game where you can only go around the board along one path, the positions on the board could just be a std::vector of spaces, a 1D array. But if you were making checkers, you'd probably have a 2D array with x and y locations.

Share this post


Link to post
Share on other sites
Or, you can think outside the box and use a hash table of 2D or 1D coordinates.

If there are a lot of empty spaces then that may be a better solution. Of course it is a less intuitive approach.

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!