- snapshot - typing this in will output a JSON string that describes the game board, the areas, and the cards. Copy this string into a text file if you want to "save" a snapshot of your game.
- loadSnapShot - type this into the console, followed by a string-representation of a snapshot will wipe out your existing game and replace it with the new snapshot. (note that "SnapShot is capitalized")
What you can do with snapshots:
- Save and restore a game that you've been playing
- Tweak a game by tweaking the snapshot data
- Create cool custom games like Zombie in My Pocket!
What do you mean?
Well, to demonstrate how snapshots can work, I've asked permission from Jeremiah Lee, the creator of the Print-&-Play game, Zombie in My Pocket to implement the game in Card Board. Very exciting!
How did you create a custom snapshot like this?
Right now this is a highly manual process:
- I uploaded the ZiMP graphics onto this demo site so that we can load the card data onto the demo. These consisted of 25 JPEGs. I had to upload them to the same server because the security permissions of Flash can be complicated if you aren't loading images from the same source.
- I copied the snapshot from a standard game and changed it so that:
- The dimensions of the game board were bigger, to allow the tiles to be laid out properly (See ["Game"]["width"])
- I deleted two of the areas and made one very big and another narrow. This way the big area could be a game board and the narrow one could hold the game's Dev cards.
- I removed all of the standard cards and most of the chips (this is a little bit time consuming at the moment :p )
- I saved the new snapshot and reloaded it into the game.
- Then, to insert the Zombie cards, I ran "loadCards" in the console for each card and took a snapshot of the whole thing again.
- For those who want to really customize the experience, one could imagine a score cards and extra cards to keep track of inventory, etc...
Loading instructions for Zombie in My Pocket on the Card Board demo site:
- Start Card Board by going to card-board.weebly.com
- Click "Start Server" (loadSnapShot will not run unless a game has been started)
- Click "Toggle Console" to open the console
- Copy the snapshot code at the end of this post
- Paste the code into your console and press "Enter"
- Click "Toggle Console" to close the console
- Play Zombie in My Pocket!
- As usual, Card Board knows nothing about the roles, so you have to know them yourself. The rules are available here: http://card-board.weebly.com/zimp-rules.html
- I've included some white chips to help you keep track of your health