Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Can you call a resource from a website?

Hi guys, I've been working on getting an MMO system working, and I'm looking to avoid constant updates by calling resources (such as image and map files) directly from a website. I've tried just doing this:
Code:
@sprite.bitmap = Bitmap.new("http://www.minscandboo.com/minscgame/001-Title01.jpg")
Unsurprisingly, that gave a "File not found" error. So, assuming it is possible to do this, what am I missing? Or, is there an alternative method of renewing resources?
 
Programming_Elf":fcztgvyp said:
Hi guys, I've been working on getting an MMO system working, and I'm looking to avoid constant updates by calling resources (such as image and map files) directly from a website. I've tried just doing this:
Code:
@sprite.bitmap = Bitmap.new("http://www.minscandboo.com/minscgame/001-Title01.jpg")
Unsurprisingly, that gave a "File not found" error. So, assuming it is possible to do this, what am I missing? Or, is there an alternative method of renewing resources?

First off, is hotlinking the file you tried to access allowed? There are plenty of places that have it configured to off by default, resulting in a file not found error. If you can hotlink, then I'm not entirely sure what is wrong, unless the program doesn't include the ability to access it. Also, if you really want to test whether hotlinking is allowed, try pinging it and printing the results with a batch file. (Yes, I know it's terribly old school, but hey, it still works.)
 
Mmm, that doesn't work, because you are reading a resource called:

'http://www.minscandboo.com/minscgame/001-Title01.jpg'

Not a resource in that Adress.

Maybe, if you include the folders (In the case that you are using a code to read webpage adresses, i mean not).

So for now, I think it's Impossible.
 
I say, it's only a name, not a path.

If you want to call a path, use:

"Folder/resource.extension", but, like i said, the ruby, if i'm sure, doesn't include the feature to call web resources.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top