Board game card draw

Board game card draw

Mar 31, 2019. | By: Evan Diamond
1 min

Drawing cards in my networked board game.

Overview

When the player’s land on certain tile around the board they draw a card from a deck and it is added to their hand. The decks and their respective cards have been implemented by another group member.

Drawing Cards

Once a player moves a switch case is performed on the type of tile they landed on if it is a card tile. Then the client whose turn it is take a card from their deck. The information about what the card does is stored in a cardInfo struct which can be streamed into a packet and sent across the network to all clients. When the clients recieve the packet they render the card’s sprite and the client whose card it is presses a button to continue and the card stops rendering. The card is then rendered at the bottom of the owning client’s screen in their hand.

Player Hand Image

An image of a card drawn and a player’s hand with a card selected.

About

Gamers developing new games.

Social Links

Our Bunker

University of the West of England,
Frenchay Campus, Bristol, BS16 1QY,
United Kingdom.