DeckSnap - a multiplayer real-time iOS game
The aim of this project was to create a game for iOS devices based on a popular physical card game - “Top Trumps” and modernise it for the digital age. Players can compete either against friends or random users online. Users also have the ability to create their own unique card sets for competition and sharing.
DeckSnap is a multiplayer real-time iOS mobile application built using Swift 3, Node.js, PHP and MySQL. This application connects remotely to two server applications. The PHP application handles most of the database interaction including creating an account, logging in and uploading images. The Node.js application creates a Web Socket using Socket.io to allow multiple devices to communicate with each other. It also handles the game logic and updating the scores in the database. The application works on all mobile iOS devices from iPhone 4 to the 12.9” iPad Pro. It uses multiple libraries such as Spring for animation, Alamofire for networking and SwiftyJSON to parse JSON data. The main goal was to create a card game for mobile devices based on a popular physical card game, Top Trumps and modernize it for the digital age. The primary functionality was to allow two players to play each other online wherever they are, whenever they want. This involved hosting the application on remote servers. Top Trumps is a simple card game. In Top Trumps, there are multitudes of niche categories e.g. Footballers, Superheroes and Cars. Each deck comes with thirty cards. Each card has a number of categories (e.g. Height, Strength) and a value attached to each category (e.g. Strength: 80). A player selects a category e.g. Strength and their value of Strength is compared to the other player's corresponding values. The person with the best value (usually the highest) wins and gets the other peoples cards. This runs continuously only one player has cards left. To improve upon the idea to create a better mobile experience a number of improvements are in this application. Users can view all of their cards by swiping through a photo gallery and they can create custom cards using the phone or iPads camera or photo album. They can customize their cards values to create strategies to beat their opponents. Players can add friends in the application and challenge them to play online. The rules of the game were also adapted for this platform. In this game players alternate turns instead of winner stay on which provides a fairer and more competitive game.
From undertaking this project the team learned multiple new platforms, programming languages and have a better understanding and appreciation for building large software projects. DeckSnap extends the functionality of Top Trumps with the ability to create custom cards and play with their friends whenever they want even if the people are in different locations. The team will continue their work on DeckSnap working towards publishing it on the Apple App Store as soon as a beta version has been completed.