O'Reilly logo

Minecraft Modding For Kids For Dummies by Lindsey Handley, Stephen Foster, Sarah Guthals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project 9

Iterating on Gameplay Using an Existing Game: Capture the Flag

In this project, I show you how to convert the single-player version of Capture the Flag to multiplayer. Playing Capture the Flag by yourself isn’t much fun — you need to have at least one other player. Before reading this project, complete all the code instructions from Project 8. Your code example should look like Figure 8-73. Then test all the code you wrote in Project 8.

remember Always test the code before you start making changes.

First I show you how to change the gameplay loop to include the second player and how to iterate over the code to add the second player to each function. This ensures that the second player is also getting a wand, getting respawn locations, and being able to respawn at the respawn location.

image

Look at the gameplay loop shown in Figure 9-1 (and defined in Project 8): It shows that you have completed all steps in the Start phase and you’re facing a new challenge — adding Player 2 to the game.

After you add a second player, you need to add a way to beat the game. In this project, I walk you through the last two iterations of the gameplay loop: adding player two and making someone ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required