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:
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!
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!
- "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.