Saturday, April 20, 2013

Marmalade Video packaging issue

www.madewithmarmalade.com is the SDK I am using as my cross platform Dev Kit (as i am sure you already know!). I like this SDK, it has a lot going for it, even if occasionally I get stuck on some naming convention or something... Well I have had a problem I have not been able to fully focus on these last couple of months. It has to do with playing Video on the iPad. I really require this feature for the HoopFighter game.. So it is something that had to be solved.

The problem I had is an odd one, or seemed it till I solved it that is. Like many of my problems they seem to be off the wall.

Marmalade uses the Native video playing system on whatever device you are on. So all I really have to do is point at a nice mp4 file and tell it to play it. Now there are a few caveats to this from the code side. It is possible to break the video playing by messing with the draw surfaces while te video is playing. This complicates things when trying to figure out what the vidoe is not playing.

I have posted before so I am gonna shortcut this to... I traced the problem to what I belieevd was the issue, that being the video file could not been seen by the hardware as existing.

Then I started looking into the zip file that the ipa file is created from. I could see that my mp4 file was not visible inside the zip, in fact it was being zipped up as an asset and placed in the dzip (.dz) file. This is great for installing a smaller IPA to ya iPad. I realised that the samepl that DID work did not package up the mp4 files. Now the dzipping auto process excluded a few file types that I included in my assets section of my control file (.mkb). However it did not exclude the mp4 I needed it too.

What I could not understand was that the dzipping process was happeneing because of something I had done more than a year ago. Way back then I added to my control file a section called 'deployments' and in that section I added the command 'auto-derbh'. This is a great way to have the build process and the deployment process create a nicely dzipped assets section. Very nice, very automatic and not what I needed.

The answer in the end was simple...
I removed the 'Auto-derbh' from the control file and rebuilt and re-deployed. In my new IPA zip file i could finally see the individual assets listed in my MKB control file. Now my Video was playing in my game and on the iPad.

By this time I had a lot of test code in my game. So after about an hour I had that all removed but video still playing.

Note: I should mention that when I deployed to my PC, that video worked regardless of the Auto-derbh command. This really obfuscated the issue for me.

I hpe this helps someone who is having issues with not being able to list a file and getting it to install as a file and not part of the dz file system.

Laters
Da Voodoochief

No comments:

Post a Comment