Dynamically Adjusting Game-Play in 2D Platformers Using Procedural Level Generation
Total Page:16
File Type:pdf, Size:1020Kb
Edith Cowan University Research Online Theses : Honours Theses 2013 Dynamically adjusting game-play in 2D platformers using procedural level generation Daniel Wheat Edith Cowan University Follow this and additional works at: https://ro.ecu.edu.au/theses_hons Part of the Computer Sciences Commons Recommended Citation Wheat, D. (2013). Dynamically adjusting game-play in 2D platformers using procedural level generation. https://ro.ecu.edu.au/theses_hons/96 This Thesis is posted at Research Online. https://ro.ecu.edu.au/theses_hons/96 Edith Cowan University Copyright Warning You may print or download ONE copy of this document for the purpose of your own research or study. The University does not authorize you to copy, communicate or otherwise make available electronically to any other person any copyright material contained on this site. You are reminded of the following: Copyright owners are entitled to take legal action against persons who infringe their copyright. A reproduction of material that is protected by copyright may be a copyright infringement. A court may impose penalties and award damages in relation to offences and infringements relating to copyright material. Higher penalties may apply, and higher damages may be awarded, for offences and infringements involving the conversion of material into digital or electronic form. Dynamically adjusting game-play in 2D Platformers using Procedural Level Generation A dissertation submitted in the partial fulfilment of the requirements for the degree of Bachelor of Computer Science Honours By: Daniel Wheat Student ID: 10183179 Faculty of Health, Engineering and Science Edith Cowan University Supervisor(s): Dr Martin Masek, A/Prof Peng Lam & A/Prof Philip Hingston Date of Submission: 04/11/2013 Research Dissertation 1 | P a g e Use of Thesis This copy is the property of Edith Cowan University. However the literary rights of the author must also be respected. If any passage from this thesis is quoted or closely paraphrased in a paper or written work prepared by the user, the source of the passage must be acknowledged in the work. If the user desires to publish a paper or written work containing passages copied or closely paraphrased from this thesis, which passages would in total constitute and infringing copy for the purpose of the Copyright Act, he or she must first obtain the written permission of the author to do so. Research Dissertation 2 | P a g e COPYRIGHT AND ACCESS DECLARATION I certify that this thesis does not, to the best of my knowledge and belief: (i) incorporate without acknowledgement any material previously submitted for a degree or diploma in any institution of higher education; (ii) contain any material previously published or written by another person except where due reference is made in the text; or (iii) contain any defamatory material. Signed …………………………………….. Daniel Wheat Date ………………………………………. 07/02/2014 Research Dissertation 3 | P a g e ACKNOWLEDGEMENTS This research study and thesis would not have been possible without the expertise and experience of my principle supervisor Dr. Martin Masek and secondary supervisors Associate Professor C. Peng Lam and Associate Professor Philip Hingston. The knowledge and support provided to me has greatly advanced my own learning and level of quality. I would like to thank each of my supervisors for their endless support provided to me throughout this project. I also thank my parents for their un-yielding support and close friends for their faith in me throughout this last year. It has been their moral support and encouragement that has kept me going during difficult times. Research Dissertation 4 | P a g e Table of Contents Abstract ............................................................................................................................................ 8 Chapter 1 – Introduction ................................................................................................................... 9 1.1 Background to the Study ........................................................................................................ 9 1.2 The purpose of the study ..................................................................................................... 10 1.3 Research questions .............................................................................................................. 11 1.4 The contributions of the study ............................................................................................. 11 1.5 Definition of terms ............................................................................................................... 13 1.6 Summary.............................................................................................................................. 14 Chapter 2 –Literature Review .......................................................................................................... 15 2.1 Theories of Fun .................................................................................................................... 15 2.1.1 Malone’s Motivational Theory ....................................................................................... 15 2.1.2 Csikszentmihalyi’s Flow Theory ...................................................................................... 15 2.1.3 Ralph Koster’s theory of Fun .......................................................................................... 17 2.2 Dynamic Difficulty Adjustment ............................................................................................. 17 2.2.1 Difficulty Estimation ...................................................................................................... 18 2.2.1 Difficulty Adjustment ..................................................................................................... 19 2.3 The 2D platformer genre ...................................................................................................... 20 2.4 Procedural Content Generation ............................................................................................. 21 2.4.1 Parameter Driven PCG ................................................................................................... 21 2.4.2 Chunk-based PCG .......................................................................................................... 22 2.4.3 Search Based PCG .......................................................................................................... 23 2.4.4 Agent-based PCG ........................................................................................................... 24 2.5 Computerised Agents............................................................................................................. 25 2.6 Genetic Algorithms ................................................................................................................ 26 2.6.1 Initialisation .................................................................................................................. 26 2.6.2 Fitness & Selection ........................................................................................................ 27 2.6.3 Genetic Operations ....................................................................................................... 27 2.6.4 Termination................................................................................................................... 27 2.7 Summary ............................................................................................................................... 28 Chapter 3 – Project Testbed ............................................................................................................ 29 3.1 The Game Context ................................................................................................................. 29 Game Avatar ............................................................................................................................ 30 Platforms ................................................................................................................................. 30 Research Dissertation 5 | P a g e Obstacles ................................................................................................................................. 30 Movement Aids ....................................................................................................................... 31 Collectable Items ..................................................................................................................... 31 Game Conditions ..................................................................................................................... 31 3.2 Game Input & Output .......................................................................................................... 32 3.3 Level Generation ................................................................................................................. 33 3.3.1 Level Structure ............................................................................................................. 33 3.3.2 Cell Paths...................................................................................................................... 36 3.3.3 Cell Terrain ................................................................................................................... 38 3.3.4 Platforms ........................................................................................................................ 43