EasyIAPeasy

Want to integrate IAPs into your game? EasyIAPeasy makes this... well, easy.

EasyIAPeasy automates all the setup for you and ensures you have a selection of easily-recognisable global variables to then call in your game. You simply add your IAP product names into an included text file, and the scripts and controller object do all the rest on game start-up. On markets which support it, IAPs are even restored for your customers automatically.

Purchase details are saved in a secure save format file, so you can confirm locally whether the player bought an IAP previously and ensure they don't see unnecessary purchase attempts and get the content they expected unlocked each time.

All this makes setting up your purchases a matter of minutes per IAP and adding purchase buttons just a line of code. Easy!

Package includes a full demo system, plus lots of debug output, so you can learn the framework before you start to integrate it into your product - including an extensive readme with platform-specific "gotchas" you should be aware of.

Version 1 now available on the GameMaker: Marketplace !

To use this IAP system should only take a minute or two of basic setup, then another couple of minutes per IAP of adding in what you want to happen each time an IAP is successful. You will also have access to a number of global variables which help identify if purchases have been made. Once your list of IAPs is built and activated, a secure save file will be loaded/created, depending on if this is the player's first run of the game or not. This file will also be securely saved-to on ending the game.

You add your products into the included file productList.txt in the format:

Package Identifier Prefix - a string, typically "com.yourcompanyname" (Don't add a trailing . at the end!)
Then a 0 (false) or a 1 (true) to say you have a "no ads" IAP listed on the next line.
Then your "no ads" IAP if you put a 1 on the second line.

Each IAP is then entered in the following way:
string ID for the IAP as it appears on your Google/iTunes Connect/WP8/Win8, etc., developer panel
real 0 for consumable, 1 for "durable" or non-consumable
string title for the IAP - likely the ID above, but this time with formatting

So a complete text file might look like:

com.ObSkewerGames
1
noads
1
No Ads!
hundredcoins
0
100 Coins!
extralife
0
Extra Life!

and then the framework reads the text file in on start-up, builds an IAP product list, activates this list, then cleans up memory again afterwards.

When you want to buy an IAP you simply create a new button and call ONE line of code iapBuy("extralife"); and the framework checks you haven't already bought it (and if you have, it unlocks the content, then checks if it's a consumable IAP and if so consumes it), and then purchases the IAP for you. You get debug information back to the console if you wish, plus a check that the purchase went through okay. Your player gets an async message letting them know either way. Then the framework checks if it's a consumable IAP and consumes it, and finally it securely records the purchase to a save file, meaning your content stays unlocked and your player keeps their purchase the next time they run the game.

All that from the one line of code you had to type!

 EasyIAPeasy.png

You'll find a complete demo project in the package for you to test with and to help you learn the framework, plus extensive documentation and thorough comments. Adding the framework to your own project is just one object and a handful of scripts to export/import... Easy!

V1 contents:

  • "Normal" product lists suitable for all GameMaker: Studio modules.
  • Global variables to use for common functionality.
  • Custom "no ads" IAP support will even check if ads should be enabled/disabled.
  • Secure save/load functionality for recording purchase states, plus the global variables.

V2 (est. August, but still included in your single purchase price!)

  • JSON product lists for Amazon on Android.
  • Google "payload" simple receipt verification.
  • Receipt verification via "tokens" on some other platforms.

ObSaveLoad

ObSaveLoad shows a safe and easy way to save and load gameplay data.

  • The LoadGame script uses the secure save/load functionality in Studio to read in a map of all your important data or creates defaults if a save file doesn't already exist.
  • The SaveGame script not only saves your variables, it adds an extra layer of validation by using the game's ID and some values of your choice to build a "verification" value you can use to confirm no-one's cheating.

Now available on the GameMaker: Marketplace !

This package includes a simple demo of how to use the system in your own projects and of course comes with extensive comments.

ObSaveLoad1

ObSaveLoad2

ObSaveLoad3

PauseExample

A simple method to make pause screens and suspend gameplay which works best for the application_surface drawing method found in GameMaker: Studio 1.3+. Shows a "clean" background-only look, plus a "gameplay snapshot" look - both of them without leaving the current game room. Works in windowed and full-screen displays, on mobiles, and on JavaScript platforms.

Now available on the GameMaker: Marketplace !

The demo contains three rooms ("levels", if you're not a GameMaker user), each with one controller object inside. Moving between rooms is simply 0/1/2 on the keyboard, and you toggle paused/not by pressing the spacebar.

room0 shows a clean background-only look to its pause state. This is the effect you'd want to achieve if your game has a timer or some other mechanic in which the player might gain an advantage by being able to study the game at their leisure.

 unpaused room0 paused room0

room1 and room2 both show a more active view, as it still includes visible gameplay objects. (The slight positional changes in the ObS objects here is the time delay in manually taking screenshots and is not an issue in-game.)

unpaused room1 paused room1

room1 achieves this through a newly-created surface we can then manipulate and draw, and room2 achieves it through creating a sprite "screenshot" and just drawing that, which is much safer in terms of memory usage and requires less code to create/manage, but has less flexibility in what you can then do to the image.

Copyright © 2012-14 ObSkewer Games Ltd.