Full Virtual Economy Solution: Store-front themes, Analytics, Data in the Cloud!Learn More

ANDROID

In-App Billing with a single line of code

iOS

In-App Purchase with a single line of code

COCOS2d-X

Extension for the popluar 2D framework

Unity

Plugin for the leading 3D game engine
Fork me on GitHub

SOOMLA LOGO

Welcome to The SOOMLA Project

The SOOMLA Project is an open source framework for virtual economies in mobile games. Our goal is to allow mobile game developers easier implementation of virtual currencies, virtual goods and in-app purchases. The framework includes:

News features added in V3:


ios-store

Didn't you ever wanted an in-app purchase one liner that looks like this:

    [StoreInventory buyItemWithItemId:@"[itemId]"]

The ios-store is our ios-falvored code initiative part of The SOOMLA Project. It is an iOS SDK that simplifies the App Store's in-app purchasing API and complements it with storage, security and event handling. The project also includes a sample app for reference.

Usage Examples

Apart from calling the IAP api, the day to day interaction with SOOMLA will be to update balances of virtual goods. This is done through StoreInventory. Here are 3 basic examples:

  • Give the user 10 pieces of a virtual currency with itemId "currency_coin":

    [StoreInventory giveAmount:10 ofItem:@"currency_coin"];
    
  • Take 10 virtual goods with itemId "green_hat":

    [StoreInventory takeAmount:10 ofItem:@"currency_coin"];
    
  • Get the current balance of a virtual good with itemId "green_hat" (here we decided to show you the 'long' way. you can also use StoreInventory):

    VirtualGood* greenHat = (VirtualGood*)[[StoreInfo getInstance] virtualItemWithId:@"green_hat"];
    int greenHatsBalance = [[[StorageManager getInstance] virtualGoodStorage] balanceForItem:greenHat];
    

android-store

Didn't you ever wanted an in-app purchase one liner that looks like this:

    StoreInventory.buy("[itemId]");

The android-store is our first open code initiative as part of The SOOMLA Project. It is a Java API that simplifies Google Play's in-app purchasing API and complements it with storage, security and event handling. The project also includes a sample app for reference.

Usage Example

Apart from calling the IAP api, the day to day interaction with SOOMLA will be to update balances of virtual goods. This is done through StoreInventory. Here are 3 basic examples:

  • Give the user 10 pieces of a virtual currency with itemId "currency_coin":

    StoreInventory.giveVirtualItem("currency_coin", 10);
    
  • Take 10 virtual goods with itemId "green_hat":

    StoreInventory.takeVirtualItem("green_hat", 10);
    
  • Get the current balance of a virtual good with itemId "green_hat" (here we decided to show you the 'long' way. you can also use StoreInventory):

    VirtualGood greenHat = (VirtualGood)StoreInfo.getVirtualItem("green_hat");
    int greenHatsBalance = StorageManager.getVirtualGoodsStorage().getBalance(greenHat);
    

unity3d-store

Haven't you ever wanted an in-app purchase one liner that looks like this ?!

    StoreInventory.BuyItem("[itemId]");

The unity3d-store is the Unity3D flavour of The SOOMLA Project. This project uses android-store and ios-store in order to provide game developers with in-app billing for their Unity projects.

Download

We've created a unitypackage and an example project:

unity3d-store v1.01 (release version)

Unity 4.0 - unity3d-store v1.01
Unity 3.5 - unity3d-store v1.01

unity3d-store v1.01 example

  • The example project is mostly what you have in the Github repo. You can either download it or clone unity3d-store.

Unity 4.0 - unity3d-store v1.01 example
Unity 3.5 - unity3d-store v1.01 example

Example Usages

Apart from calling the IAP api, the day to day interaction with SOOMLA will be to update balances of virtual goods. This is done through StoreInventory. Here are 3 basic examples:

  • Get VirtualCurrency with itemId "currency_coin":

    VirtualCurrency coin = StoreInfo.GetVirtualCurrencyByItemId("currency_coin");
    
  • Give the user 10 pieces of a virtual currency with itemId "currency_coin":

    StoreInventory.GiveItem("currency_coin", 10);
    
  • Take 10 virtual goods with itemId "green_hat":

    StoreInventory.TakeItem("green_hat", 10);
    
  • Get the current balance of green hats (virtual goods with itemId "green_hat"):

    int greenHatsBalance = StoreInventory.GetItemBalance("green_hat");
    

cocos2dx-store

Haven't you ever wanted an in-app purchase one liner that looks like this:

    cocos2dx_StoreController::buyMarketItem("[itemId]");

The cocod2dx-store shows you how to use The SOOMLA Project's android-store and ios-store in your cocos2d-x project. In cocos2dx-store there are 3 relevant scenes: MainScene, StoreAScene and StoreBScene:

  • MainScene - the welcome scene from where you open the store
  • StoreAScene - the store's first window that contains a list of VirtualGoods
  • StoreBScene - the store's second window that contains a list of VirtualCurrencyPacks

Usage Examples

Apart from calling the IAP api, the day to day interaction with SOOMLA will be to update balances of virtual goods. This is done through StoreInventory. Here are 3 basic examples:

  • Add 10 coins to the virtual currency with itemId "currency_coin":

    string itemId("currency_coin");
        cocos2dx_StoreInventory::addCurrencyAmount(itemId, 10);
        
  • Remove 10 virtual goods with itemId "green_hat":

    string itemId("green_hat");
        cocos2dx_StoreInventory::removeGoodAmount(itemId, 10);
        
  • Get the current balance of green hats (virtual goods with itemId "green_hat"):

    string itemId("green_hat");
        int balance = cocos2dx_StoreInventory::getCurrencyBalance(itemId);
        

General Information

Contribution

We want you!

Fork -> Clone -> Implement -> Test -> Pull-Request. We have great RESPECT for contributors.

SOOMLA, Elsewhere ...

License

MIT License. Copyright (c) 2012 SOOMLA. http://project.soom.la