platform specific data?

Monkey Archive Forums/Monkey Discussion/platform specific data?

EdzUp(Posted 2013) [#1]
Seeing as loads of the platforms use different data formats is it already possible or can it be added where in the data folder we could have:
Mygame.data/html5
Mygame.data/android etc?

This would make it easier to target platforms that need specific formats for audio and graphics


smilertoo(Posted 2013) [#2]
good idea that man.


AdamRedwoods(Posted 2013) [#3]
as long as it's optional


Skn3(Posted 2013) [#4]
You can do this now like so:

- in your data folder create a folder called 'html5'.
- in your data folder create a folder called 'glfw'.
- add a file myfile.txt to each of these folders.
- add the following to your code:


Is there a built in runtime const that says what target an app is running in?

If so you could do it like this:



EdzUp(Posted 2013) [#5]
does it work for images etc when creating a release build or does everything in data still just get transfered across?


Skn3(Posted 2013) [#6]
If you do #IMAGE_FILES with the same match string then yes. It does however copy all the empty folders across (so from the example "html5" and "glfw") but this is a bug report that I will go post now.


EdzUp(Posted 2013) [#7]
Ah brilliant, thanks Skn3 :)