Hi I’m new so sorry if this is the wrong area for this thread. I’m trying to make a Board game with an 11x13 size Game Board with some “Basic” Board Spaces and two other types of Board Spaces triggering events. (similar to chess but with Action Cards to help picture it.) I do not know when starting the base code design of the Game Board if I should be looking for ways to use the Game Board as one big grid, or if I should do an easily editable base code that I would copy and paste to each Board Space. In the end product of my game I would like to be able to have:
Have each Board Space that when a Game Piece can move, to light up to show that it is a legal move
When a player uses an Action Card the game’s Board Spaces will show which Board Spaces the Action Card can be used on
Be able to have the Board Space in game model physically change when selected by an Action Card.
So with wanting a Game Board that has 3 types of Game Squares that can be effected by both a Game Piece and an Action Card in order to do the easiest, time effective path, should I design each square individually or one giant grid? If some combination of making a grid to cover most of the “Basic” Game Squares and individual codes for the two other types of squares I’m also okay with that type of plan to. Thank you
if the game is physically a grid, then it should be represented as a grid in the program (2d array, 1d array, map, if it is sparse, etc).
Determining valid range is not necessarily a job of a game board, but of a game piece. You pick it up, doing so enables an overlay, the piece either accesses the overlay directly, or tells it which pieces are valid.
Same deal with the card, pretty much.
But that’s a very rough idea.
In general, if that’s something complicated to you, you could try hiring someone through the job forums.
The standard way is to make a simple class for each space, then put those in a grid: For fun, write functions tor look at the type and say useful stuff:
public class space_t {
public int type;
// -1 mars non-spaces:
public bool isASpace() { return type>=0; }
public bool isAntiMagic() { return type==3; }
// 2 is mountain -- flying only:
public bool isWalkable() { return type>=0 && type!=2; }
// assuming a space can have only 1 thing it in:
public Transform occupant=null;
public int gold; // gold drops on spaces during the game??
...
}
Board[][] b = new space_t[13][];
// make rest of Board and NEW each spot ...
Most people would probably use an enum for the type, but that can be done later. The main things are how using a class allows you to add all the info you need to a space, like: Board[×][y].gold+=5. And to use a variable to say the type of space, letting anyone else decide how to use that.
Insanely cool idea. I think that if you manage to do this, then this game will be very relevant and interesting. I also used to want to create a similar game, but with slightly different rules. However, I have absolutely no knowledge of game development. So I always have to look for games that are similar to the ones that I come up with, and that I will definitely like. For example, recently I thought about a game related to words, I wanted to play a word game that would be interesting and I found a cool word game Scrabble that I liked and I started playing it for quite a long time. I actually have a lot of ideas about games and apps with games. So anyone who wants some ideas about this can write to me!