Software Architecture Design Flappy Bird Duo

Similar documents
Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Game Center Programming Guide

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Access the UTHSCSA Palo Alto Networks (PAN) VPN using Global Protect VPN client and Two Factor Authentication (2FA)

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

SYSTEM DEVELOPMENT AND IMPLEMENTATION

Chapter 8 Operating Systems and Utility Programs

CHAPTER 14 Understanding an App s Architecture

MSSQL quick start guide

Issues in Android on Mobile Platform and Their Resolution

Ahsay Replication Server v5.5. Administrator s Guide. Ahsay TM Online Backup - Development Department

Skynax. Mobility Management System. System Manual

MakersInstitute Open edx Extension

Print Manager Plus 2010 How to Migrate your Database to a New SQL or Print Server

Copyright bizagi

Patterns in Software Engineering

1. Please login to the Own Web Now Support Portal ( with your address and a password.

Syllabus Version 2.5_R ( )

Implementing and Maintaining Microsoft SQL Server 2005 Reporting Services COURSE OVERVIEW AUDIENCE OUTLINE OBJECTIVES PREREQUISITES

Dr. Pat Mirenda. Software Design Specification Document

MOC 20467B: Designing Business Intelligence Solutions with Microsoft SQL Server 2012

Computers: Tools for an Information Age

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Grandstream Networks, Inc.

Cloud Services ADM. Agent Deployment Guide

Access Tropical Cloud Desktop from Any Device

Local Area Networks: Software and Support Systems

KODI MEDIA CENTER GUIDE

Guide for Setting Up Your Multi-Factor Authentication Account and Using Multi-Factor Authentication. Mobile App Activation

Using the T&D Thermo App with TR-7wf Data Loggers

Evaluation of Xamarin Forms for MultiPlatform Mobile Application Development

Business Application Services Testing

Bijlage1. Software Requirements Specification CIS. For. Version 1.0 final. Prepared by Saidou Diallo. HvA/Inaxion. November 2009

How To Understand The History Of An Operating System

Mobile Game and App Development the Easy Way

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

CHAPTER 15: Operating Systems: An Overview

Web Application Architectures

Microsoft SQL Database Administrator Certification

Chapter 1: Introduction. What is an Operating System?

There are a number of superb online resources as well that provide excellent blackjack information as well. We recommend the following web sites:

Chapter 8 Types of Utility Programs and Operating Systems. Discovering Computers Your Interactive Guide to the Digital World

COSC 3351 Software Design. Recap for the first quiz. Edgar Gabriel. Spring For the 1 st Quiz

PrinterOn Mobile App for ios and Android

Integration Guide. SafeNet Authentication Service. SAS Using RADIUS Protocol with Apache HTTP Server

Microsoft Dynamics CRM 2013 Applications Introduction Training Material Version 2.0

Installation and Configuration in Microsoft Dynamics NAV 5.0

Deltek Touch Time & Expense for GovCon. User Guide for Triumph

Assignment # 1 (Cloud Computing Security)

It is recommended that you use a clean installation of Lion client before upgrading to Lion Server.

FileMaker Server 13. FileMaker Server Help

Software Life-Cycle Management

OWB Users, Enter The New ODI World

FileMaker Pro 11. Running FileMaker Pro 11 on Citrix XenApp

... Introduction Acknowledgments... 19

Discovering Computers

Administration Guide. BlackBerry Enterprise Service 12. Version 12.0

Active Directory Management. Agent Deployment Guide

Feature List for Kaspersky Password Manager

PIE. Internal Structure

Software Architecture Document

Install and Configure SQL Server Database Software Interview Questions and Answers

Operating System Software

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Two Factor Authentication (TFA; 2FA) is a security process in which two methods of authentication are used to verify who you are.

Dave Haseman, Ross. Hightower. Mobile Development for SAP* ^>. Galileo Press. Bonn. Boston

APPLE PUSH NOTIFICATION IN EMC DOCUMENTUM MOBILE APPLICATION

FileMaker. Running FileMaker Pro 10 on Citrix Presentation Server

Homework #2 solutions

CRESTRON-APP/CRESTRON-APP-PAD Control App for Apple ios

FREQUENTLY ASKED QUESTIONS

SA-Announce Cloud Services Mobile Notifier User Manual: ios and Android Version 1.0.0

Outline: Operating Systems

Web Application s Performance Testing

Information Systems Analysis and Design CSC John Mylopoulos. Software Architectures Information Systems Analysis and Design CSC340

How To Run Eve 5 On A Pc Or Mac Or Ipad (For Pc Or Ipa) On A Network (For Mac) On Your Computer Or Ipro (For Ipro) On An Ipro Or Ipo (For Windows)

Step-by-Step Help Guide for Freegal Movies and Television

Oracle CRM On Demand Connected Mobile Sales Administration Guide. Version March 2012

BT Lancashire Services

MS SQL Server 2014 New Features and Database Administration

VERALAB LDAP Configuration Guide

STeP-IN SUMMIT June 2014 at Bangalore, Hyderabad, Pune - INDIA. Mobile Performance Testing

GETS AIRWATCH MDM HANDBOOK

DCPS STUDENT OPTION HOME USE PROGRAM SIGN UP INSTRUCTIONS

WHITE PAPER. Understanding Transporter Concepts

Student Attendance Through Mobile Devices

OpenScape Web Collaboration for Microsoft Windows OS

Microsoft SQL Server versus IBM DB2 Comparison Document (ver 1) A detailed Technical Comparison between Microsoft SQL Server and IBM DB2

System Center 2012 Suite SYSTEM CENTER 2012 SUITE. BSD BİLGİSAYAR Adana

Automatic job scheduling software for AIX, HP-UX, Linux, Solaris and Windows

separate the content technology display or delivery technology

VPN s and Mobile Apps for Security Camera Systems: EyeSpyF-Xpert

Install MS Office 365 on your Android mobile device

Setup Guide-Mobility ActiveSync Hosted Exchange Configuration

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

PROFESSIONAL DIGITAL TWO-WAY RADIO MOTOTRBO ANYWHERE. for ios USER GUIDE

Transcription:

Software Architecture Design Flappy Bird Duo December 15, 2014 Isley M. Gao University of California, Irvine In collaboration with: Anita Marie Gilbert, Dae Kim, Samuel Mathison, and Tina Bui { gilbera1, daeyk3, smathiso, tinab1 }@uci.edu Adapted from Design Studio 4 from Informatics 121: Software Design I, taught by Andre van der Hoek, chair of the Department of Informatics at the University of California, Irvine 1

Table of Contents 1. SCOPE OF WORK... 3 1.1 PROJECT OVERVIEW... 3 1.2 GOALS... 3 1.3 CONSTRAINTS... 3 1.4 ASSUMPTIONS... 3 1.5 AUDIENCE... 3 1.6 GOALS... 3 1.7 STAKEHOLDERS... 3 2. OVERALL SYSTEM ARCHITECTURE... 4 2.1 OVERALL SYSTEM DIAGRAM... 4 2.2 OVERALL SYSTEM DESCRIPTION... 4 2.3 SERVER INTERNAL... 5 2.4 CLASS DIAGRAM... 6 2.5 USER SCENARIO... 6 3. GAMEPLAY... 7 3.1 SEQUENCE DIAGRAM... 7 3.2 GAMEPLAY SEQUENCE OF EVENTS... 7 4. ARCHITECTURAL STYLE... 9 4.1 POSSIBLE ARCHITECTURAL STYLES... 9 4.2 CHOSEN: CLIENT-SERVER... 10 APPENDIX... 11 APPENDIX A. DESIGN PROCESS RATIONALE... 11 APPENDIX B. GLOSSARY... 12 2

1. SCOPE OF WORK 1.1 Project Overview This document describes the architecture design of Flappy Bird Duo, a new version of Flappy Bird that allows two players to fly through Flappy s worlds at the same time. This mobile game is played over 10 rounds in real-time, where players play against opponents globally, and are paired with players of roughly equal ability. Although the game is not a web application, it is connected to a web page leaderboard where players can see the top performers over various windows of time, and see where they themselves rank. 1.2 Goals Allow two users to play against each other in live time Users should have same enjoyable playing experience as original Flappy Bird Allow users to view online leaderboard of top performers and find where they are ranked themselves Game can match players to play against others with similar ability 1.3 Constraints Cannot be a web based application, must be a mobile application Features cannot deviate from original game design and structure Tapping the screen during a round makes the bird fly 1.4 Assumptions User interface looks identical to original Flappy Bird game Game structure parallels old game style Rating of application is managed by appropriate app store Users cannot pick who they play against, it is fully automated by system Game is cross platform for both Android and ios users Game may be modified or updated by system programmers 1.5 Audience Children Teens Adults 1.6 Stakeholders Game users Google Play, Apple App Store, Windows Store System programmers 3

2. OVERALL SYSTEM ARCHITECTURE 2.1 Overall System Diagram 2.2 Overall System Description * Client in our diagram represents either an ios client or an Android client. Clients do not interact with each other. Clients interact with users only through server. ** Data in our diagram represents data that is being sent either from the client to the server, or from the server to the client. [Represented by arrows between client and server] Server s main responsibilities are verifying user information, matching users based on their rankings, assigning a game room to matched users, transmitting data between users through server, storing user records, and providing user records upon request. The webpage is a static website with a leaderboard that displays the username and ranking of each user. Users can view the top performers over various windows of time and search for rankings by username. 4

2.3 Server Internal Client Server architectural style Client can be ios or Android Software Application Web Server is Apache and SQL Database 5

2.4 Class Diagram *startgame() in Server: This is a simulation of the startgame() in main. This is to ensure that the server will know which player has lost in case the information is obstructed 2.5 User Scenario 1. Player A clicks on the start button on the Home Screen and is matched with Player B by the server. 2. Both players are placed into a game room, and a countdown of three seconds begins. 3. The match starts, Player B runs into an obstacle and dies, and the game starts over again at the three second countdown with the score being Player A: 1, Player B: 0. 4. This repeats for another nine rounds (for a total of ten rounds). 5. At the end of the game, if Player A wins 6/10 rounds, six points is added to Player A s total of games won, and his/her rank is calculated accordingly. Four points is added to Player B s total of games won, and his/her rank is calculated accordingly. We envision that both app devices and the server will independently run the game with the same start time and tap data sent back and forth through the server. For example, for the server once the game begins, the gravity starts and the birds start falling, once the server receives a tap from a player the server updates its instance of the game. This continues until die(). 6

Reusability: we are basing our game off of the original Flappy Bird game, so we have used that game framework as the basis for the two player game. We re-used the familiar look of the UI for our version of the game; this includes the main menu style as well as in-game play. Actual physics of the game such as the bird flying, and bird impact with the tube was also kept the same to hold onto familiarity. 3. GAMEPLAY 3.1 Sequence Diagram 3.2 Gameplay Sequence of Events Player A 1. Starts app a. Downloads B username b. 3 second pause 2. Game starts moving, gravity kicks in 3. Player Tap a. Display renders the tap A b. Send tap A to Server Server 1. Receives request to Play: get player B data 2. Creates room a. Find player B : User records are matched b. Assigns players a room 7

3. Sends player B username 4. Wait 3 seconds 5. Starts play: gravity starts Player A - Repeat 10 times 1. Wait 3 seconds a. Starts play: gravity starts b. Player A tap c. Render A position on display d. Send Player A tap to Server i. Server 1. Receives Player A tap 2. Stores Player A tap 3. Updates game play 4. Sends Player A tap to Player B e. Request Player B tap from Server i. Server 1. Receives Player B tap 2. Stores Player B tap 3. Updates game play 4. Sends Player B tap to Player A f. Download Player B tap g. Render Player B tap 2. if (Die) a. Render Death Display i. Server 1. if(die) sends Death to Player 2. Send Leaderboard data to Player b. Receive Death from Server c. Receive Leaderboard data from Server d. Render Leaderboard Display Webpage 1. Request Leaderboard data from Server a. Server i. Send Leaderboard data 2. Render Leaderboard Leaderboard: Shows user score on top. Shows top rankings today, past week, month, year, all-time. Based purely on how many rounds you win (doesn t matter how far you get) Users can tie, affects their ranking accordingly. 8

4. ARCHITECTURAL STYLE 4.1 Possible Architectural Styles Data flow Conceptually does not have a program counter - executability and execution of instructions is solely determined based on the availability of input arguments to the instructions, so that the order of instruction execution is unpredictable Why we did not choose this: Only successful for specialized hardware (e.g. graphics processing, database engine designs, and parallel computing frameworks) Unnecessary for how simple our program is Shared memory Multiprocessing design where several processors access globally shared memory Several processors sharing same memory allows for simplicity and load balancing Why we did not choose this Costly, limited extensibility (limited to up to 16 processors for best efficiency given cost constraints), and low availability Unnecessary for a small mobile app to use shared memory Flappy Bird - Duo s memory requirement is not large enough to benefit from load balancing to complete tasks Peer-to-peer A distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the application Clients both provide and use resources Unlike client-server systems, the content serving capacity of peer-to-peer networks can increase as more users begin to access the content Why we did not choose this: Flappy Bird - Duo does not allow users to connect peer-to-peer. It uses main server to exchange game data and user information through the server. Implicit invocation System is structured around event handling, using a form of callback Implicit invocation system components use events to communicate with each other Announcement of events causes a second set of handlers to receive calls Why we did not choose this: Although Flappy Bird - Duo is an event-based game in terms of the tapping event causing the bird movement, the only event that our system needs to have handlers for is when the bird collides with a pipe, thus it would be unnecessary to structure our entire system based on event calling 9

4.2 Chosen: Client-Server Architecture Style: Layered Client-Server Definition: A distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Our client does not need to share its resources it simply requests a server s content or service function. A client initiates messages to the server, which waits for a request from the client. The server cannot send messages to the client on its own. Web Server: Apache, SQL Database Apache Open sourced and free Well documented Software is available for a wide variety of operating systems, including Unix, FreeBSD, Linux, Solaris, Novell NetWare, OS X, Microsoft Windows, OS/2, TPF, OpenVMS, and ecomstation Supports a variety of features, including: Server-side programming language support Authentication schemes Popular compression methods Configurable error messages SQL (Structured Query Language) Database Compatible with Apache Well documented Designed for managing data held in a relational database management system, or for stream processing in a relational data stream management system New databases such as Mongo are used for large amounts of data, which is out of scope for our product 10

APPENDIX Appendix A. Design Process Rationale We decomposed this system into three actors. These components were chosen as actors for our design process and we used them as we talked through the project. Client: we assume 2 clients per game as users requesting and updating the server. Server: mostly passive. Webpage: similar to a client, but with limited scope to just pull Our classes evolved as we used these actors in our sequence diagram to play the game. Here you can see the pseudo-code to the right being developed along with the object classes as we consider the interaction. A cleaned up version of the sequence diagram. 11

4.1 Glossary Flappy Bird game room Google Play, Apple App Store, Windows Store leaderboard user mobile side-scroller game where a player controls a bird, attempting to fly between rows of green pipes without coming into contact with them a virtual place where users are matched with another user of a similar ranking digital platforms that serve as app stores for Android, ios, and Windows phones, respectively a scoreboard showing the names and current scores of the leading competitors any person who plays the game 12