Would it be better to actually draw the board in a script and attach colliders to each piece or get a picture and add the colliders before the game starts? Is the difference in processing power needed significant?
I quote your comment:
@AlexandreVaillancourt Which way would be the easiest for figuring out where a specific piece is?
DO NOT use the scene for working out where stuff is. That is absurd and backwards.
Have some internal logic (like a
ChessBoardRepresentation class) that stores an 8x8 grid and tells you what pieces are there. like
.getPieceAt(x,y) say. You can have other methods like
.getPossibleMovesFor(x,y) that returns a
PossibleMoves that has things like
isPinned() and so forth. This is your 'internal logic'
To make a move you tell the internal logic to make a move. Which could throw if the move is illegal (say) and if that move is valid, updates the internal representation AND tells the bit doing graphics the new positions of some objects.
Remember what you draw on screen REPRESENTS the state, you should never work out the state by looking at the scene graph or other structures managing the drawing process