Break bbInit() into several parts within monkey

Monkey Targets Forums/Android/Break bbInit() into several parts within monkey

lom(Posted 2016) [#1]
Hi everyone!
I'm trying to make an android version of my game. It's pretty big and it works fine on glfw target. But when I'm trying to compile for android, it throws a “Code too large” error within bbInit() method in MonkeyGame.java file. I guess I should just break bbInit() into several parts to make it work. But I'm not sure how to make it in monkey without editing .java file.


Ironstorm(Posted 2016) [#2]
I don't think this error is caused by the bbInit() method.

How much code lines do you have? Java has a 64KB limit for methods, so you should look for your game. Maybe trying to put some stuff into external files. Maps, databases and other stuff should be stored in a external data file.


lom(Posted 2016) [#3]
Ironstorm,
Thanks for the tip. Yes, I have level data inside big arrays. I guess I should put them in external files. My damn laziness!