Hi guys. I would like to ask you about one important thing. I know AS3 and Starling
very well but I would like to prepare my new game in Defold. I already know the basics of Defold but I wonder how I can import extra game levels from server to my application.
The general users will be able to buy additional levels that will be associated with the game.
These will be ZIP packages in which there will be graphic, text and mp3 files.
The ZIP file must be downloaded, unpacked and uploaded to the appropriate directory (Android and iOS). Is it difficult to achieve in Defold ?
The problem with what you’re describing with the zip file containing music and assets is that Defold doesn’t support loading of music/sfx from any source and then playing them. It’s possible using the OpenAL extension in the Asset Portal though.
When it comes to graphics it’s possible to load PNGs using the PNG extension and you can using existing Defold APIs load images and use as textures for GUI nodes. For anything more complex such as using a downloaded image in a tilemap or as a sprite flipbook you’re unfortunately out of luck.
A much better approach in my opinion would be to unlock and track bought content some other way and then serve it using our Live Update feature where assets (tilemaps, atlases, tilesources, spine objects and any other Defold assets) and scripts can be downloaded and cached in the client and then used using the normal Defold APIs
BTW, is this a desktop game? If it’s a mobile game then payment could be handled through in-app purchases.
The mobile version (Android and iOS) is a priority, but I would like to give a demo at WWW.
Because the levels of the game will not be like in standard games. You can choose levels yourself.
Therefore, it is necessary to pull in and delete old levels so that the application is not too large.
Each user can have other active levels, a different configuration.
This is tricker. Defold supports .ogg and .wav files and it’s currently not possible to load and play sounds from disk at runtime without an extension. You can use the OpenAL extension to load and play wav files from disk. We currently have no MP# extension.