Friday, January 6, 2017

Android SQLite GMS Extension

Hi all.

While I was creating a new drawing android game for children, I needed a database implementation to store all the Tales/Scenes/Objects etc. And also I wanted an SQL solution. So I picked up SQLite that is very easy to use.
But not for Game Maker Studio!
So I had to create an extension. And the result is an Extension for GMS that provides easy access to Android's embedded database library for SQLite (android.database.sqlite). With this extension one can port his SQLite database file with the distribution of his game.
The extension provides all the most common functionality of an SQLite DataBase. (e.g. insert, update, delete, query/cursor, create/alter/drop tables/indexes).
I am planning on enriching the extension further regarding database upgrades in the future.
Special care has been taken to provide fine grained Exception Handling. All Android Java Exceptions are caught and forwarded to Game Maker Studio, so that the game always knows what has happened with the execution of every method. Error Handling messages return either the expected result, or in case of an exception a String with the following Template : {ClassName}:{MethodName}:Exception:{ExceptionMessage].
Feel free to contact me if you have any questions or need something more from this extension.

You can find the extension here :
https://marketplace.yoyogames.com/assets/4969/sqlite-android-gms-extension

I hope you will find it as useful as i did!