Roguelike Development with JavaScript : Build and Publish Roguelike Genre Games with JavaScript and Phaser
معرفی کتاب «Roguelike Development with JavaScript : Build and Publish Roguelike Genre Games with JavaScript and Phaser» نوشتهٔ David Halliday، Robert Resnick، Jearl Walker و Andre Alves Garzia، منتشرشده توسط نشر Apress Apress Publishing در سال 2020. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Go on an adventure and build a roguelike from scratch using JavaScript. With the help of the battle-tested Phaser library, you’ll go through all the steps to build a small, fun, playable web roguelite game. The author will guide you on how to add further features to the game such as populating the game with enemies, adding treasures, and so on. You will acquire technical knowledge about procedural generation and tile-based mapping as well as learn game design skills such as what makes dungeons fun and how to evoke an emotion in your game. Roguelikes are very popular with indie developers because of their focus on gameplay over graphics. You’ll see why they appeal to game designers on a budget and discover that they serve as a good platform to experiment with novel ideas and designs. Along the way, you’ll cover the increasingly popular roguelite genre that provides a hyper casual form of the genre that is approachable and often mobile. After reading this book, you’ll be ready to create your own roguelikes, to dive deep into procedural generation, and also to bring some of the techniques shown here into other genres and game projects. **What You Will Learn** * Make use of procedural generation for dungeons, mazes, monsters, and treasure * Pick up skills to use Phaser to build games * Implement turn-based mechanics * Use tile-based graphics **Who This Book Is For** Game developers who want to build something fun and who have at least some prior JavaScript programming experience. Table of Contents 5 About the Author 12 About the Technical Reviewer 13 Acknowledgments 14 Introduction 15 Chapter 1: Before We Begin 17 What are roguelikes? 17 The Berlin Interpretation 19 What are roguelites? 21 What are roguelikes for this book? 22 Why develop roguelikes? 23 Why use web technologies? 24 Why Phaser? 26 What we’re building 28 Chapter 2: Introduction to Phaser 29 Introducing Nano Dungeon 29 Setting up 30 Installing a web server 31 Choosing a code editor 32 Getting the source code 32 Running the examples 33 How games work 33 Introducing Phaser 35 Phaser scenes 36 A simple scene 36 The game configuration object 38 The scene object 39 Exercise 46 Summary 47 Chapter 3: Dungeoning 48 What are tilemaps? 48 Drawing a tilemap 49 Preloading a spritesheet 49 A basic tilemap 52 A basic dungeon 57 Adding a player character 58 It begins with a dungeon manager 59 Creating a turn manager 62 The player class 66 Updating the scene 70 Exercise 71 Summary 72 Chapter 4: Enemies and Permadeath 73 Dungeon initialization 74 Movement support 75 Initializing entities 76 Moving entities 77 The player becomes a sprite 79 Our first monster 83 Creating the basic monster class 85 Adding the monster to the dungeon 87 Basic combat mechanics 89 From basic monster to dangerous monster 89 Refactoring the dungeon manager 92 The player class learns how to attack 99 Exercises 103 Summary 104 Chapter 5: Treasures and Equipment 105 Creating a user interface for our game 105 How it was implemented 107 Game.js refactoring 107 Implementing world.js 108 New dungeon.js feature 112 Creating the UI scene 112 Implementing the monster UI 116 The player user interface 118 Creating equipment and treasure 122 Adding item support to the player character 123 Equipping items 124 Removing an item from inventory 125 Changing how attacks work 126 Changing the constructor 127 Refreshing the UI 129 Patching turn 130 Reworking the dungeon module 132 Let’s create some items 134 Implementing the generic item class 135 Creating a sword 137 Creating a long sword 138 Creating a gem 139 What about a cursed gem? 140 Creating a potion 142 Adding items to the dungeon 143 Adding monster loot 144 Exercises 147 Summary 147 Chapter 6: Character Classes 148 Yet another refactor 149 Support for defensive bonuses 150 Support for ranged attacks 150 Refactoring the dungeon module 151 Patching the generic item 155 Creating a basic hero class 156 Creating a warrior class 164 Creating a dwarf 167 Creating a cleric 170 Creating an elf 173 Creating a wizard 176 Exercises 183 Summary 184 Chapter 7: Procedurally Generated Monsters and Items 185 Introducing tags 186 Aren’t you describing mixins? 187 Tags as pipelines 187 Making good tags 187 Tags and procedural generation 188 Adding support for tags 189 Making entities taggable 189 Making heroes taggable 200 Making items taggable 200 Making enemies 201 A basic enemy class 201 Revisiting the skeleton 209 Creating a bat 210 Making an orc 211 Making a troll 213 Implementing the enemies module 214 Creating the items module 215 Refactoring the dungeon module 217 Creating tags 220 Making monsters more aggressive 220 Making fast monsters 222 What about golden things? 222 We might as well have a silver tag 225 And an iron tag as well 226 Making enemies royal 227 Making a flexible burning tag 228 Making stuff poisonous 231 Things can be cursed too 231 Making enemies move 231 The hunter 232 Monsters that are going somewhere 233 Patrolling the dungeon 237 Creating the tags module 240 Refactoring the world scene 244 Procedural generation is not just throwing random things 245 Exercises 247 Summary 247 Chapter 8: Procedurally Generated Dungeons 248 Dungeons, fun, and replayability 249 How to screw up dungeons 252 Using BSP to build dungeons 253 Using a BSP tree to generate room areas 255 Creating the DNode class 256 Creating the DArea class 257 Building a BSP tree 258 Splitting areas 259 Creating the BSPDungeon generator class 262 Changing the world scene 263 Creating rooms 266 Iterating over leaves 267 Carving rectangles 268 Making rooms 269 Adding rooms to the constructor 269 Making corridors 271 Making a line in the level data 271 Making a corridor 272 A procedurally generated dungeon 273 A better dungeon 275 Exercises 280 Summary 280 Chapter 9: Finished Game 281 Adding multiple levels 281 Modifying BSPDungeon to support multiple levels 282 Letting the dungeon module create the dungeon 285 Changing the world scene 291 Changing the UI scene 293 Housekeeping functions 294 A hero that walks through stairs 296 Connecting the levels with stairs 299 Computing the stairs positions 300 Exposing the stairs in the BSPDungeon class 302 Exposing stairs in the dungeon module 303 Adding stairs to the map 303 Creating a game over scene 304 Building a game intro screen 309 Completing the quest 313 Quest complete scene 314 Creating a quest module 316 Refactoring the dungeon module 317 Creating the amulet item 317 The game is complete 319 Publishing 321 Publishing with Vercel 322 Publishing with Surge 322 Exercises 323 Where to go next? 324 Index 326 In this book, we are going on an adventure together and will build a roguelike from scratch using JavaScript. With the help of the battle-tested Phaser library, we're going to go through all the steps to build a small, fun, playable web roguelite game. The chapters will guide you on how to add further features to the game such as populating the game with enemies, adding treasures, and so on. You will acquire technical knowledge about procedural generation and tile-based mapping as well as learn game design skills such as what makes dungeons fun and how to evoke an emotion in your game. Roguelikes are very popular with indie developers because of their focus on gameplay over graphics. You'll see why they appeal to game designers on a budget and discover that they serve as a good platform to experiment with novel ideas and designs. Along the way, you'll cover the increasingly popular roguelite genre that provides a hyper casual form of the genre that is approachable and often mobile. After reading this book, you'll be ready to create your own roguelikes, to dive deep into procedural generation, and also to bring some of the techniques shown here into other genres and game projects. You will: Make use of procedural generation for dungeons, mazes, monsters, and treasure Pick up skills to use Phaser to build games Implement turn-based mechanics Use tile-based graphics Front Matter ....Pages i-xx Before We Begin (Andre Garzia)....Pages 1-12 Introduction to Phaser (Andre Garzia)....Pages 13-31 Dungeoning (Andre Garzia)....Pages 33-57 Enemies and Permadeath (Andre Garzia)....Pages 59-90 Treasures and Equipment (Andre Garzia)....Pages 91-133 Character Classes (Andre Garzia)....Pages 135-171 Procedurally Generated Monsters and Items (Andre Garzia)....Pages 173-235 Procedurally Generated Dungeons (Andre Garzia)....Pages 237-269 Finished Game (Andre Garzia)....Pages 271-315 Back Matter ....Pages 317-322 Chapter 1: Before We Begin -- Chapter 2: Introduction to Phaser -- Chapter 3: Enemies and Permadeath -- Chapter 4: Treasure and Upgrades -- Chapter 5: Character Classes -- Chapter 6: Procedurally Generated Dungeons -- Chapter 7: Procedurally Generated Monsters and Treasure -- Chapter 8: The Power of Storytelling -- Chapter 9: Finished Game -- Chapter 10: Extra Chapter -- Monetization
دانلود کتاب Roguelike Development with JavaScript : Build and Publish Roguelike Genre Games with JavaScript and Phaser