High Level Design Report
Total Page:16
File Type:pdf, Size:1020Kb
Bilkent University Department of Computer Engineering High Level Design Report Dec 24, 2015 Senior Design Project CardBoard Pool: virtual reality pool game Gözde Nur Güneşli 21201358 Derya Pelin Deniz 21001007 Cansu Tüzmen 20901073 Efekan Kökcü 21101902 Caner Yıldırım 21100818 Supervisor: Selim AKSOY Jury Members: Uğur GÜDÜKBAY Özgür ULUSOY This report is submitted to the Department of Computer Engineering of Bilkent University in partial fulfillment of the requirements of the Senior Design Project course CS491 Table Of Content 1. Introduction 3 1.1 Purpose of the system 3 1.2 Design goals 3 1.3 Definitions, acronyms, and abbreviations 4 1.4 Overview 5 2. Current software architecture 6 3. Proposed software architecture 7 3.1 Overview 7 3.2 Subsystem decomposition 7 3.3 Hardware/software mapping 8 3.4 Persistent data management 9 3.5 Access control and security 9 3.6 Global software control 9 3.7 Boundary conditions 9 4. Subsystem services 11 Game Subsystem 11 User Subsystem 11 Settings Subsystem 12 User Interface Subsystem 12 Input Management Subsystem 13 5. Glossary 13 6. References 14 1 LIST OF FIGURES Figure 1 VR Pool ScreenShot Taken from Google Play Store 6 Figure 2 Subsystem Decomposition UML Diagram 7 Figure 3 Hardware/Software Mapping Diagram 8 Figure 4 Game Subsystem Diagram 11 Figure 5 User Subsystem Diagram 11 Figure 6 Settings Subsystem Diagram 12 Figure 7 Input Management Subsystem Diagram 12 Figure 8 User Interface Subsystem Diagram 13 2 1. Introduction 1.1 Purpose of the System Taking computer applications under consideration, people started building and using mobile applications for educational and joy purposes. For pool games, there appeared many desktop and mobile applications that people play on fake boards and train on them. After the virtual and augmented reality based applications emerged, some billiard applications started to be based on them, too. In virtual and augmented reality systems, real board can be part of the game and users can play with their actual billiard and with a real game performance. With the help of Google Cardboard, user can see billiard pool as in 3D vision with cue ball's trajectory prediction. In this way, people can learn the pool game by using Cardboard Pool for using Training Mode. Besides, there will be a mode without trajectory lines. Doing so, user can play without help and statistical information can be kept. Furthermore, there is Match Mode. If user chooses, the application watch the flow of the game and it suggests the beneficial shooting styles to the user, according to specific purposes such as clearing all the balls in a sequence. Therefore, Cardboard Pool will be a satisfying augmented reality game for the billiard players and people who are eager to learn the game. 1.2 Design Goals High-performance: Cardboard Pool should perform in a user-acceptable time since it is necessary for the user to see through Cardboard as a real time experience in order to enjoy using our application. Accessibility: Cardboard Pool should be accessible to all Android Device [4].Users in Android Market as free. Availability: Cardboard Pool should be available for all the users who plays billiard game and has Android Phone and Cardboard. User-friendliness: Cardboard Pool should have a user-friendly graphical user interface. Modifiability: Cardboard Pool should be easy to modify in the future in order to make adding new features and functions easy, such as Carom Billiard Option can be added besides the current 8ball billiard game option. 3 1.3 Definitions, Acronyms, and Abbreviations Google Cardboard: It is a complete virtual reality platform. It was developed at the Google Cultural Institute in Paris as one of those famous 20-percent time projects, and we first saw it at Google I/O 2014. The hardware side of Google Cardboard uses low-cost viewers, with the reference design made of foldable cardboard (hence the name) 45mm plastic lenses, and a magnet or capacitive-taped lever to operate the screen. The viewer only needs to do two things — hold the phone in front of the lenses at the right distance, and provide a way to interact with the screen. [1] C#: (pronounced "C sharp") is a programming language that is designed for building a variety of applications that run on the .NET Framework. C# is simple, powerful, type-safe, and object-oriented. The many innovations in C# enable rapid application development while retaining the expressiveness and elegance of C-style languages. [2] Unity: Unity is a flexible and powerful development platform for creating multi platform 3D and 2D games and interactive experiences. It's a complete ecosystem for anyone who aims to build a business on creating high-end content and connecting to their most loyal and enthusiastic players and customers[3]. SQLite: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed database engine in the world. The source code for SQLite is in the public domain[4]. Eight-ball: (8-ball) is a pool (pocket billiards) game popular in much of the world, and the subject of international professional and amateur competition. Played on a pool table with six pockets, the game is so universally known in some countries that beginners are often unaware of other pool games and believe the word "pool" itself refers to eight-ball. The game has numerous variations, including Alabama eight-ball, crazy eight, last pocket, misery, Missouri, 1 and 15 in the sides, rotation eight ball, soft eight, and others[5]. Carom Billiard: is the overarching title of a family of billiards games generally played on cloth-covered, 1.5-by-3.0-metre (5 by 10 ft) pocketless tables, which often feature heated slate beds. In its simplest form, the object of the game is to score points or "counts" by caroming one's own cue ball off both the opponent's cue ball and the object ball(s) on a single shot. The invention as well as 4 the exact date of origin of carom billiards is somewhat obscure but is thought to be traceable to 18th-century France [6]. 1.4 Overview Cardboard Pool is an android mobile application which users can experience an augmented pool game and learn how to be proficient in billiard by using Google Cardboard. Cardboard Pool will be an application aiming to teach user how to play pool game, running on Android mobile phones or tablets with Google Cardboard placed on it. The view of camera will capture the pool table in a phone into based on a real pool table. The glass will show the user where to throw the ball by pushing which point of the white ball. There will appear trajectory lines showing how the balls will go after kicking the white. There will be training and examination options that will enable users to work on specific strategy and tactical methods. The user can rewatch which positions appeared after the game and share it with other users. The program will detect position of balls with image analysis by using edge detection algorithms and recognize them according to colors & shapes. After getting their coordinates relative to the table, the application can use the information in 3 options: • In training option, lines appear for where to throw the white ball and which ball to hit. Another additional information related to current strategy and tactical methods are shown on right side of the glass. The statistics of the users will be hold. • In examination option, the application will not help the user, there will be no trajectory lines, but the system will check whether the users are able to do the stroke or not, and assign the user a point standing for their success by checking the difference between the ideal trajectory and the trajectory that users’ shot created. The statistics of the user will be hold. • In match mode, the trajectory lines appear if user chooses and the application watch the follow of the game and if the user chooses, it suggests the user beneficial shooting styles according to specific purpose such as clearing all the balls in a sequence (or in general, providing you a good position after you shoot, there are pool games that you do not pot balls 5 such as 3 cushion), keeping the turn (shooting the ball with higher chance to be cleared), and not keeping the turn but leaving a very bad position for the opponent (snooker). 2. Current Software Architecture A similar system is built by Stanford University with lights showing how the balls will move with lines of lightning after kicking the white ball with current position of the stick. They also built a robotic arm that shoots the white ball according to their aim with best chance according to current ball positions. Figure 1: VR Pool screenshot taken from Google Play Store There are also Virtual Reality and augmented reality games billiard games for Google Cardboard such as VR Pool, people can play completely virtual billiard. Our project differs from those applications since in our project the billiard table, balls and the cue are real, it is a very different kind of 8-ball billiard experience. 6 3.Proposed Software Architecture 3.1 Overview In this section, detailed explanation of the proposed software architecture will be given. Implementation and design approach will be explained in detailed under the topics “Subsystem decomposition”, “Hardware/software mapping”, “Persistent data management”, “Access control and security”, “Global software control” and “Boundary conditions”. 3.2 Subsystem Decomposition MVC pattern will be used in our system which divides the system into three interconnected parts, in order to gain modifiability and decrease complexity of the system.