Marmalade: bittersweet experience

Post on 08-Sep-2014

714 views 2 download

Tags:

description

 

Transcript of Marmalade: bittersweet experience

Marmalade Bittersweet experience

Max Klyga

@neku42

max.klyga@gmail.com

Mad Hat Games

•  We develop mobile free2play games

Mad Hat Games

•  We develop mobile free2play games •  Programmers have strong C++

background

Mad Hat Games

•  We develop mobile free2play games •  Programmers have strong C++

background •  Artists have strong Flash background

Asset Pipeline

•  Everything is done in Adobe Flash

Asset Pipeline

•  Everything is done in Adobe Flash •  Flash files are used as bundles

Asset Pipeline

•  Everything is done in Adobe Flash •  Flash files are used as bundles •  Images are extracted from flash,

packed into atlases and compressed

Engine

Engine Framework

Engine Framework

•  Written in C++

Engine Framework

•  Written in C++ •  Built on top of Marmalade SDK

Write once Debug everywhere

Sweet

•  Develop on Windows (Visual Studio) or Mac (XCode)

Sweet

•  Develop on Windows (Visual Studio) or Mac (XCode)

•  One click deploy to iOS, Android, BADA, Blackberry, Simbian, Win Phone 8, LG TV, Desktop (Mac, Windows)

Sweet

•  Develop on Windows (Visual Studio) or Mac (XCode)

•  One click deploy to iOS, Android, BADA, Blackberry, Simbian, Win Phone 8, LG TV, Desktop (Mac, Windows)

•  Simulator (!)

Bitter

TOO MANY THINGS TO FIT

ONE SLIDE

Bitter

TOO MANY THINGS TO FIT

ONE SLIDE

Bitter

Build system doesn’t play

well with JDK 7 (Android SDK issue)

Bitter

Build system doesn’t play

well with JDK 7 (Android SDK issue)

Can be sort of fixed though

decompiling build system and

manual patching

Bitter

Bundles OLD stlport

No Visual Studio debug visualizers

support

Bitter

Multithreading problems:

Memory can be freed only from thread it was allocated

in.

Enjoy!

Bitter

Network problems:

One failed request can hang your

application

Bitter

Network problems:

One failed request can hang your

application

Workaround:

Have no more then one request at a

time

Bitter

Network problems:

One failed request can hang your

application

Workaround:

Turn off some optimisations for

Marmalade internal multitasking features

Bitter

Extensions problems:

(missing features, bugs)

Bitter

Dependencies:

You need IwUtil for tracing and it depends on a whole lot of stuff

(libjpg, libpng, zlib, etc.)

Bitter

Sometimes updates randomly break stuff:

•  Problems with ATI cards on Simulator •  Appending ‘\n’ to HTTP request body •  Regressions •  etc.

Bitter

Virtually no support

Bugs can be ignored for months

Bitter

• Video playback problems • Native UI and Input problems •  Things I don’t remember

Sour

Memory management:

Marmalade allocates one continuous chunk of memory from system.

Replaces malloc/new.

Have to write your own memory allocator on top of one provided by marmalade.

Sour

No debugging on device

Logging is your friend

Conclusion

Was it worth it?

Conclusion

Be ready to reimplement stuff

(we reimplemented facebook, music, sound and filesystem

extensions, heavily modified others)

Max Klyga

@neku42

max.klyga@gmail.com

QUESTIONS?