Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am building a game based on libGdx and I want to be able to check for and download updated assets at some point before the player starts playing. The game is being built for PC and for Android.

I haven't been able to find much on downloading assets. It seems libGdx assumes all assets will be packaged with the game or already on "external" storage and available for the AssetManager.

So far, the best option I've found is setting up updating code prior to starting the libGdx application.

How can I have my assets download while the libGdx application is running? Possibly to allow some interaction while waiting, or progressive asset downloads allowing limited game play. My goal is to allow for dynamic updates to assets, and to allow users to get into the game quicker. Especially new players, I don't want them waiting on a download screen before they see anything of the actual game.

share|improve this question
    
code.google.com/p/libgdx/wiki/AssetManager suggests it can do what you want. Most notably you can manually unload assets, and write your own loaders / resolvers if need be. –  Adam May 23 '13 at 0:15

1 Answer 1

As Adam suggested, you can write your own custom loader which could implement a network connection to any type of server which could download assets during runtime and serve them up.

Just implement the file loading interface it provides and request a url as a string for the asset name in the overriden load function and pass that to your downloader. Then you can simply make regular load function calls throughout your code.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.