For my final year university project I made a procedurally generated dungeon crawler. The Dungeon level layout is generated using a BSP Tree algorithm. A square is split into randomly sized rooms, which are then connected together with corridors. The rooms are then populated with gems, which award points, depending on which gem is picked up.
I used SFML to program a 2D chess game, using the chess set modelled in Maya to create the sprites.
The piece images are placed automatically in positions determined by reading a ‘FEN’ string (Forsyth-Edwards Notation). The FEN string for the start of the game would be “rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR”.
Lower-case letters are black pieces, upper-case are white pieces. ‘/’ represents a new row, and numbers represent empty squares. So ‘ppp4p’ would represent a row with three pawns, then four empty squares, then a single pawn.
The FEN string for the second image would be this:
“2r3k1/p4p1p/2r3p1/p1bp4/b4B2/P1R1PN2/5PPP/1R2K3”.