Press enter to see results or esc to cancel.

[Buildbox like a boss] Running Buildbox Android game in fullscreen mode

When you export an android game from buildbox, and build it, it’ll not run in fullscreen “immersive mode” by default.

immersive mode allow you to hide android softkeys, and use the precious gained space to show more stuff of your game or to place a banner.

here is a quick tip to make a buildbox game run in fullscreen mode.

 

1 – Find and edit PTPlayer.java file.

this file is placed un a sub-directory under android/src/ folder.

it correspond to the package path you specified while configuring your buildbox package for android

considering that you used com.mycompany.mygame as a package name, you’ll find PTPlayer.java under android/src/com/mycompany/mygame/PTPlayer.java

 

2 – Prepare the code

Find this line of code in the beggining of PTPlayer.java

and add after

 

Replace the content of the function “onCreateView” with the following

 

3 – Add fullscreen methods

At the end of PTPlayer.java file, before the latest closing bracket “}”  add the following code

Now rebuild your game and install it, it’s running in fullscreen mode !

 

Note.

Each time you’ll export the game from buildbox your modifications to PTPlayer.java will be lost.

one easy solution is to keep a modified copy of the file in a safe place, and replace the generated buildbox version after each export.

 

 

 

Indie Gamedev resources

Receive curated list of resources, specifically selected for indie game developers.
including graphics, music, tutorials, software ...etc

(one email per week max)