Skip to content
Xi (Matthew) Liu edited this page Oct 14, 2017 · 2 revisions

PVPCandyCrush

A customized version of Candy Crush in which 2 players compete remotely over the network in real time to reach user-designated explosion times.

  • Application is implemented in C/C++, using multi-threading to enable real-time utilities and TCP Sockets to connect players through the network.
  • Game board instances are stored in designed JSON format, facilitating game Saving and Reloading.
  • The application can promptly detect any network connection failure of both players, terminating and saving the game in-time to preserve fairness.

Demo Snapshots

P1 playing the game at timestamp a: p1_a

P2 playing the game at timestamp a: p2_a

P1 playing the game at timestamp b: p1_b

P2 playing the game at timestamp b: p2_b

Prerequisites

GTK+ must be pre-installed on your computer.

Installing

  1. Clone the entire repo to your desktop (one for each player).
  2. run $ make in the root directory of the cloned repo.

Playing the Game

  • For P1, run $ ./p1 [gameboard_file] [max_score] in the directory, or $ ./p1 for the default 25_by_5 gameboard and default max_score of 20.
  • For P2, simply run $ ./p2 [serverName_of_p1] in the directory, as the gameboard and max_score is set by p1 and transported to p2 throught the network.
Clone this wiki locally