Puzzle Game Online Running on a Bidirectional Communication Framework
Total Page:16
File Type:pdf, Size:1020Kb
Master in Computer Engineering: Web Technology and Digital Business Puzzle game online running on a bidirectional communication framework based on Node.js and Socket.io Master's Final Project by Johanna Mesa Ramos University of Las Palmas de Gran Canaria June 2016 Supervisor Cayetano Guerra Artal Computer Science and Artificial Intelligence "Everybody wanna be a bodybuilder, but don't nobody wanna lift no heavy ass weight." - Ronnie Coleman ACKNOWLEDGEMENTS It was back in 2013 when I found myself writing the acknowledgements of my then end of career project. Today I am doing it again, but now for my master's degree. I have to thank the University of Las Palmas de Gran Canaria (ULPGC) for this, not only for their installment of the master's program, but also for bestowing upon me the scholarship that has allowed me to undertake such a fantastic opportunity. From the bottom of my heart, thank you. There is also a thank you in store for my supervisor, Cayetano Guerra Artal. I do appreciate all the guidance you have provided along these past few months, helping me shape the idea I had into an actual master's final project. I cannot go without showing my gratitude towards the university's administration staff. They have always lent a helping hand since I started out my career path back in 2009, they are an absolutely amazing team, thank you so much. Last but not least, I want to thank my family and my other half. They are the ones who keep me sane and who encourage me to finish strongly whatever project I happen to have undertaken. I love you mami, I love you dad, I love you witcher. [This page is intentionally left blank.] TABLE OF CONTENTS TABLE OF ILLUSTRATIONS ............................................................................................................. 7 TABLE OF UML DIAGRAMS ............................................................................................................ 7 TABLE OF RESULTS ........................................................................................................................ 8 SUMMARY ..................................................................................................................................... 9 RESUMEN ...................................................................................................................................... 9 CHAPTER 1 - INTRODUCTION ...................................................................................................... 10 1.1 DOCUMENT STRUCTURE ............................................................................................. 10 1.2 STATE OF THE ART ....................................................................................................... 11 FRAMEWORK ....................................................................................................................... 11 GAME ................................................................................................................................... 13 1.3 GOALS .......................................................................................................................... 14 FRAMEWORK ....................................................................................................................... 14 GAME ................................................................................................................................... 14 1.4 SPECIFIC SKILLS COVERED ........................................................................................... 15 TI01 ...................................................................................................................................... 15 TI02 ...................................................................................................................................... 15 TI04 ...................................................................................................................................... 16 1.5 CONTRIBUTIONS .......................................................................................................... 16 TECHNICAL ENVIRONMENT ................................................................................................. 16 PERSONAL ............................................................................................................................ 16 1.6 RESULTS ....................................................................................................................... 17 CHAPTER 2 - DEVELOPMENT ....................................................................................................... 18 2.1 METHODOLOGY .......................................................................................................... 18 INCREMENTAL MODEL ........................................................................................................ 18 UNIFIED MODELING LANGUAGE ......................................................................................... 18 REQUIREMENTS THROUGH USE CASES ............................................................................... 18 2.2 FRAMEWORK ............................................................................................................... 19 REQUIREMENTS ................................................................................................................... 19 DESIGN ................................................................................................................................ 23 DOCUMENTATION ............................................................................................................... 34 2.3 GAME ........................................................................................................................... 37 REQUIREMENTS ................................................................................................................... 37 DESIGN ................................................................................................................................ 40 Game Level Design .............................................................................................................. 50 CHAPTER 3 - RESULTS .................................................................................................................. 52 3.1 Framework .................................................................................................................. 52 3.2 Game ........................................................................................................................... 54 CHAPTER 4 - BUSINESS PLAN ...................................................................................................... 57 4.1 Elevator Pitch .............................................................................................................. 57 4.2 Business Model Canvas ..................................................................................................... 57 BMC ..................................................................................................................................... 58 Bicomm's BMC .................................................................................................................... 59 CHAPTER 5 - CONCLUSION AND PROJECT'S FUTURE .................................................................. 63 5.1 Conclusion ......................................................................................................................... 63 5.2 Project's future .................................................................................................................. 64 BIBLIOGRAPHY ............................................................................................................................. 66 SOURCES OF IMAGES USED ......................................................................................................... 68 TABLE OF ILLUSTRATIONS Illustration 1. Client-Server polling. ______________________________________________ 11 Illustration 2. Client-Server long polling. __________________________________________ 12 Illustration 3. Armor Games. ___________________________________________________ 13 Illustration 4. Kongregate. _____________________________________________________ 13 Illustration 5. Addicting Games. _________________________________________________ 13 Illustration 6. Top part of Sign up page mock up. ___________________________________ 20 Illustration 7. Bottom part of Sign up page mock up. ________________________________ 20 Illustration 8. Sign in mock up. __________________________________________________ 22 Illustration 9. Dashboard mock up. ______________________________________________ 23 Illustration 10. JWT anatomy. __________________________________________________ 30 Illustration 11. JWT signature component. ________________________________________ 30 Illustration 12. HTTP monitoring. ________________________________________________ 31 Illustration 13. JWT decoded. ___________________________________________________ 31 Illustration 14. Hijacking JWT inside cookie. _______________________________________ 32 Illustration 15. Full-duplex scheme. ______________________________________________ 34 Illustration 16. Normal flow Choose Controls mockup. _______________________________ 38 Illustration 17. Alternate flow Choose Controls mockup. _____________________________ 38 Illustration 18. Post condition mockup of alternate flow Choose Controls. _______________ 38 Illustration 19. Controls mock up. _______________________________________________