We’ve finally released Adventure Time: Rocksars of Ooo for Android and iOS!
It’s a rhythm game made with OpenFL based on the great Rhythm Tengoku, with 30 levels distributed across six different episode scenarios from the show.
You can get it at:
As fellow developers, your feedback is very important to us.
Thanks! Hope you like it!
looks really good. i have only seen a few adventure time episodes, but really want to see them all. my kind of cartoon
well done on the release
How do you handle all of those animations? that’s crazy…257MB?! I guess you’ve found a solution for the Android .apk size limit
The original artists must’ve worked on it…how did that go?
Flash animations imported with TexturePacker and drawn with with openfl.display.Tilesheet.
Regarding the .apk size limit, we had to store the large assets in an expansion file (.obb).
Was the extension file tough to get working? Could we automate it somehow?
@alfredohodes that’s would be super awesome if you could share your .obb files solution
@singmajesty Maybe it could be automated, but it would require some thinking and testing. I did most things by hand, and I’ve only added support for images, sounds and text.
@zaynyatyi In a nutshell, the steps I take are (assuming bundleid: com.purpletreestudio.mygame and version number 2)
1 - Create the obb file (it’s a zip file renamed to “main.$VERSION_NUMBER.$BUNDLE_ID.obb” (main.2.com.purpletreestudio.mygame.obb).
2 - Push it to the device, to the proper path:
adb push Assets_Apkexpansion/com.purpletreestudio.mygame/main.2.com.purpletreestudio.mygame.obb /mnt/shell/emulated/obb/com.purpletreestudio.mygame/main.2.com.purpletreestudio.mygame.obb
3 - Read expansion file:
var localStoragePath : String = Apkexpansion.getLocalStoragePath();
var packageName : String = Apkexpansion.getPackageName();
var assetsDirectory : String = localStoragePath + “/Android/obb/” + packageName + “/”;
var assetsFilePath : String = assetsDirectory + “main.” + version + “.” + packageName + “.obb”;
Where, in Apkexpansion.java:
public static String getPackageName ()
public static String getLocalStoragePath ()
4 - Read zip file:
var assetsFile : FileInput = File.read( assetsFilePath );
var assetsEntries: List = Reader.readZip( assetsFile );
That lists the different files inside the .obb file.
When you want to access a file, you get proper assetEntry from that list and then:
var dataBytes : Null<haxe.io.Bytes> = Reader.unzip(assetEntry);
var dataByteArray = ByteArray.fromBytes (dataBytes);
For bitmaps: return BitmapData.loadFromBytes(dataByteArray);
For text: return Std.string(dataByteArray);
var snd : Sound = new Sound();
@alfredohodes thanks for the explanation
Thanks a lot for sharing your solution!
I made an extension! Used this as a reference for doing local testing, thank you for the post. One thing that the extension has that this post doesn’t is downloading the obb file when it doesn’t exist, which I hope Rockstars of Ooo has.
Thanks! This will be very useful for the comunity.
I just tried the game out, and while I really like it, I’m wondering about the extreme audio latency on touch. Is that a problem with Android, or could it be related to OpenFL? I noticed it isn’t so bad during the tutorials, but even then it still is bad. I’m sure a lot of people want a try at making music-based games on Android and it seems there might be an untenable barrier.
After researching the issue it seems the audio latency is caused by Android, and not OpenFl.
There’s some explanation here, and a chart with measurements here.
Interesting, the expansion file is downloaded first, then the game apk. This makes things a little easier on me: i was thinking i had to download the obb file manually and listen to the download inside my application.
I hope you find a fix / workaround to the lag when touching to play sounds. The game is very nice, well made and fun, the only strange thing is the lag when singing.