Discussion API recommendation

Chaser

Member
Hi, could some one direct me to a reasonably good site for hosting images and possible other information in the future that has an API.

All i want to do is make a http request to get an image i have hosted somewhere and have it as an object sprite.

but i cant seem to find one, ones i do have don't have an API structure.

Thanks :)
 

Mert

Member
Rule Number One : All of these uploading websites, and yes including Dropbox, Drive & Azure, hate you for accessing their data without visiting their website/app/service. Google Drive puts daily download limits, Dropbox may block the access to a certain file/folder which is accessed too much(even on their website).

What you need is an "object storage service". These kind of services are specially built to serve data transfers between clients. Also they usually provide APIs, and scaling is not much of an issue with them.

One example is Firebase Cloud Storage. I am currently working on an extension that allows uploading/downloading data to Firebase Cloud Storage servers. Below image is hosted in Firebase Cloud Storage. You can, upload images using the Firebase panel as well. There's also URLs available for your images. Just copy it and then you can download the image by sprite_add("url_address"...) into your game.

Also a tip, not relevant with the topic, using sprite_add creates a separate texture page. I'd be careful not to add too many sprites(thus texture pages)
 

Chaser

Member
Thanks, yeah your right about the download limits and such.

Perhaps i may be better having my own PC(spare) running the server with the images on i want to request, kinda thought it might be a little easier to already use established things.

"using sprite_add creates a separate texture page" OK, i thought GM will just hold empty until the result was found. but i hear you warning sir.

Your extension sounds interesting, how long? maybe il wait for that and crack on with some other stuff. :)

thanks for the reply
 

Mercerenies

Member
Perhaps i may be better having my own PC(spare) running the server with the images on i want to request, kinda thought it might be a little easier to already use established things.
I'm not sure what your level of expertise is, but this is definitely an option. If you want to pursue this route, I recommend not a spare PC but a Raspberry Pi. They are much quieter and have lower electricity requirements to run all the time, and you can always plug in a USB hard disk if the 64GB given by the SD card aren't enough for you. When I bought mine, it was $40 for the Pi, plus the cost of a protective case, an SD card, and a wifi dongle (the latter comes integrated with the Pi nowadays, so you shouldn't need it). All in all, it was definitely under $100 for the full setup.

The Pi comes pre-loaded with an ssh server (you may have to turn it on, but it's already installed), so you can remote-access it if you're reasonably comfortable with the command line. From there, you've got plenty of options. ssh supports the scp protocol for file transfer, which works great, again, if you're comfortable with the command line. On the other hand, you could install an ftp server on it and then access it from a GUI like FileZilla or something similar.
 
Top