Jump to content
  • Advertisement
Sign in to follow this  
hallatie

skeleton for a board game

This topic is 2656 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'd like to discuss about how to implement a board game skeleton to make it reusable for more games of the same type. so...how to organize classes, what classes do, which methods, ecc...
i use openglES and objective-c

Share this post


Link to post
Share on other sites
Advertisement
So your writing a program for a board game?

It all depends on what your going to reuse the board game for. Your question is vague, can you explain what type of boardgame storyline your going to work on?

Share this post


Link to post
Share on other sites
If it was me I would probably start with some basic classes for the board, the pieces, dice (if any), cards (if any), etc.
My design process for any game typically starts with listing off all the things on the "playfield" (ships, units, projectiles, whatever) and their behavior so I can structure an inheritance hierarcy.

To give an example from a little space game I made:
Ship: can be controlled, follows physics, can collide, can be drawn, has individual behavior
Enemy: follows physics, can collide, can be drawn, has individual behavior
Projectile: follows physics, can collide, can be drawn, has individual behavior
Planet: can collide, can be drawn
Explosion: can be drawn, has individual behavior

Share this post


Link to post
Share on other sites
Think about the make-up of an actual board game. You have various objects that have certain properties.

The basic ones are Board, and Game Piece.

The game Board is what the pieces can be placed on. The pieces are everything else (So the money in monopoly are game pieces).

Game pieces don't need a physical location (but still need to be associated with a location, eg the money in monopoly is associated with the player - which can be considered a game board by the way). You might go so far as to enable game pieces to contain game pieces (eg: in Trivial pursuit the player's game piece can contain the pie slice pieces you get for answering questions correctly).

Thus you could have the "Game" as the top level of object that contains a collection of Board Objects, these Board Objects contains a collection of Game Piece objects and these Game Pieces objects contains a collection of Game Piece objects.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!