[godot-devel] In app purchase apis

[ Thread Index | Date Index | More godotengine.org/devel Archives ]


Hey guys, (I might not be able to be at the dev meeting today, so I'm writing here about the 2 topics I'd like to discuss)

I'd like to standardize on a basic API for in app purchase implementations. We currently have the StoreKit implementation for iOS and Google Play for Android, and I think they're already vastly different. I don't expect them to be 100% transparent layers, where the game doesn't know what the backend is, some will have store-specific methods or responses, and on some cases the game might want to choose or query which backend it's using (like on Android there might be more than one available, for Google, Amazon, etc), but it'd be nice to have a base api that all stores implement in a standard way. I think the 2 main issues are:

- do we use signals, callbacks, or message queues? I think it's open for discussion, I like messages because it's easier on the native module side (calling a callback from java is not 100% safe at the moment), and sometimes the library has messages to dispatch right after the game launches, which could be before the any callbacks or signals are connected, so they would get lost.. On the other hand people seem to prefer the other methods
- what is the base api for this? purchase(), get_product_info(), consume_product(), restore_purchase(), what else? and what about purchase receipts? I don't remember how those work..

I can refactor the ios code, can anyone do Android? What about the other 'big' stores, mainly Amazon?

Thanks!

Ariel.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/