Update a compiled app, load additional content

Hy everybody !

i come from the Flash/AS3 world and there is something i don’t understand in OF/C++.

How can i publish an app and, after, add content ?
Example : a game which is able to load a new pack of levels

In AS3, a app can load a SWF (executable) and run it or load content in as a library.

Thanks for help :smile:

I’m new to oF, but in almost any(all?) language you can load dll’s.

Right, but DLL is a Windows solution, i’m looking for a crossplatform solution. Maybe it is simple but i don’t find the best way.

POCO, which is a core component of openFrameworks, has some nice cross-platform capabilities for loading dynamic libs. You might check out this for more:

Just note, that we don’t have first class support for compiling this in the openFrameworks core, so you’ll likely need to figure out your own method for compiling your additional levels into compatible shared libs.

You could get around having to link a precompiled content blob by building your app in such a way that it would dynamically load non-compiled content via a combination of XML/YAML/JSON config files, perhaps an external scripting library like Lua or Python, and whatever other multi-media files you need. You could then package this up into a compressed format if you need more portability.

[edit: links]




as a side note, I’ve recently been using VAMP - http://vamp-plugins.org/ a cross platform system for testing audio analysis engines and writing analysis in a standardized way. all vamp plugins are compiled as dynamic libraries (per platform, as DLLs, Dylibs, SOs) and it loads them. It works surprisingly well and was curious about what it would take to get something like that working in OF. Their code is fairly straight forward and I was able to get a plugin host (that could load dylibs) working in OF pretty quickly. Might be interesting for anyone looking at dylib approaches.

1 Like

(but alas, I should point out, this means content needs to be compiled per platform… most vamp developers compile for multiple platforms )

What i understand is that OF don’t have an easy way to do that for the moment.

So, i’m going to try with POCO (but i’m not sure to be at level ! )

The other way is to create additionnal content with a combination of XML & other data files… It’s not exactly what i think but it can work.

Now i need to try, and come back here if i found something usefull.

thanks all !

In my case, the best way is to use Lua files with the excellent ofxLua Plugin

With Lua, i can add some scripts content, and i’m already able to edit a media folder, so this solution working great for me.

Have you managed to get vamp plugins to work with oF?