O'Reilly logo

GameMaker Cookbook by Brandon Gardiner

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

Saving player selection and score

I personally enjoy games with a lot of choice. I like having options that expand the game's scope and add replay value, but I also enjoy being able to play a game the way I want to play it. I'm certainly not the only person who feels this way, and for this reason, many game developers add appropriate options. Now, once I've made my selection and get into the game, what I don't want is to have to make those selections again; I want to save my choice and pick up right from where I left off. Let's take a look at how to select a player character and then save this selection, along with the player's score.

Getting ready

To complete this recipe, you'll need several objects, sprites, and so on. You'll need two sprites ...

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