![]() ![]() ![]() assuming the keystore is exported to C:UsersEzeliakeystoresmybbkey. You can do a simple exercice to check that you understand how this hook layer work : modify the buildbox game and add a hook code to display a Toast message (“Event:replay”) when the player loose and click on “Replay” button. Configuring Buildbox project Assuming you exported your buildbox Android project to c:bbgamesexportsMyGame go to android folder under MyGame folder, and edit the file called local.properties. It’s important to have it up and running, and understand how it work, since this is the base for setting up multiple leaderboards, achievements, game analytics and everyplay video recording service. We still didn’t add anything interesting to our project (except displaying toast messages), but this hook layer is the base for interesting addition we’ll see in next tutorials. In this tutorial we created a hook layer allowing us to trigger custom events and use them to run custom code. One easy solution to avoid modifying the files each time is to keep a copy of modified files in a safe place, and replacing the original one each time you export a new project.įor android, you need to backup the following files : BBHook.java, PTServiceBridge.javaįor iOS you need to backup the following files : BBHook.mm, BBHook.h, AppController.mm If you export the game to the same folder, Buildbox will overwrite the modified files. Add an “Url button” and put it on top of the start button, resize it to fit exactly the size of start button.Switch to the Game Mind Map view and double click “Main Menu UI”.choose a game type from the provided templates (I’ll use ZigZag in this tutorial).(MyGame will refer to buildbox project in the rest of this tutorial) in the project creator give a name to your project, I’ll use MyGame for this tutorial.įirst we’ll create a buildbox project to which we’ll apply the modifications. ![]() The present code was tested with buildbox 2.1.x and 2.2.x. Please note that this hook layer is a “hack”, it means that it use unofficial event detection code and could be broken by future Buildbox releases if the Buildbox development team decide to change the code behaviour. Such events are important to detect : let’s say you want to unlock an achievement depending on the score value, for this you’ll need to know when the player loose (gameover event) and what is his score value. play start (detected via a start button click),. ![]() In this article we’ll add a hook layer which will detect the following events : The hook layer will make it possible to detect some important game events and allow us to execute custom code when they occure. This hook layer will later give us the possibility to add custom services to Buildbox games, such as game analytics, achievements, multiple leaderboards, and even Everyplay video sharing service ! What’s a hook layer, why do we need it ?īuildbox don’t provide any official way to hook events from code, except for custom ad networks. In this article we will add a hook layer to Buildbox Android export. If you have not added ad monetization, you will receive a pop-up asking if you want to do so. A progress indicator appears as Buildbox saves your game project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |