hey,
I would like to know if it's possible to load sprites from www in real time while playing an ags game? What I mean is creating an object with a certain sprite, which is just and only online, so the algorithm has to verify, if the picture is available online and if it is, than load and display it in the game???
Not without the use of a plug-in or an external software that grabs the file.
AGS has no network support. It can create DynamicSprite from a file on disk, but you'd need a custom plugin to download it from the web.
Alternatively, you may use ready plugin called "Shell Execute" to run some program that can load files from command line, unless such solution does seem too "dirty".
thanks for the suggestions
It's possible if you use the agsSock plugin and write your own server.
1. Have the server load/download the image file (convert it to PCX format) and turn it into base64 before sending it
2. Send an HTTP Request to the server using the plugin, decode the base64 and write the raw binary to a file
3. load the image into AGS using DynamicSprite.CreateFromFile
I did this successfully with small images, like 100x50 pixels. With bigger images a) the server would send it in chunks, which my code couldn't deal with yet b) the conversion from base64 to binary took ages.
Yer a wizard, Khris!