Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

[AS3] Dynamically loading files from a webserver

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
6 replies to this topic

#1 deepDweller   Members   

104
Like
0Likes
Like

Posted 31 March 2012 - 02:50 PM

Hi gamedev. I want to clarify something here before I attempt to implement it. I'm making a flash RPG, and in order to avoid long loading times, I want to make use of the LoadExternal and URLRequest classes provided with the Flex API in order to dynamically load music and level layouts from an outside source, rather than embedding them in the .swf file itself. With this in mind, can anyone tell me the downsides of storing the required music/level files on a web server, and having the swf dynamically load them via URL? Will this cause strain on the web server, considering there will, ideally, be many people playing the game at the same time?

Thanks in advance!

#2 return0   Members   

508
Like
0Likes
Like

Posted 01 April 2012 - 06:00 PM

Don't serve static data through your web server stack, serve it from a static store (preferably a cdn).

#3 deepDweller   Members   

104
Like
0Likes
Like

Posted 01 April 2012 - 06:44 PM

Don't serve static data through your web server stack, serve it from a static store (preferably a cdn).


I looked up the acronym and I assume you're referring to this?

http://en.wikipedia.org/wiki/Content_delivery_network

Are there other alternatives to this? What would be another example of a "static store"?

I suppose one of my problems is that I don't really know how a "web server stack" works. Would firing a URLRequest from a flash player be the same as requesting a direct file download from the website?

#4 return0   Members   

508
Like
0Likes
Like

Posted 02 April 2012 - 06:45 PM

An alternative to a cdn? A crappy one would be renting a machine in the cloud (or in your bedroom), getting its address and serving stuff off there...

A server stack is your back end technology for your web game. If it was a facebook style zynga affair, probably a standard http lamp stack would do?

Not sure about as3 - generally for getting static data do an http get to your content store, for updating data do an http post to your web server.

#5 wolfscaptain   Members   

200
Like
0Likes
Like

Posted 02 April 2012 - 09:32 PM

Disregarding where the files originally came from, store them in the local cache with HTML5/ECMAScript 5, or at least encourage the broswer to do it with HTTP headers.

That removes both loading times and strain on the web server.

#6 deepDweller   Members   

104
Like
0Likes
Like

Posted 03 April 2012 - 12:12 AM

An alternative to a cdn? A crappy one would be renting a machine in the cloud (or in your bedroom), getting its address and serving stuff off there... A server stack is your back end technology for your web game. If it was a facebook style zynga affair, probably a standard http lamp stack would do? Not sure about as3 - generally for getting static data do an http get to your content store, for updating data do an http post to your web server.


Awesome!

Disregarding where the files originally came from, store them in the local cache with HTML5/ECMAScript 5, or at least encourage the broswer to do it with HTTP headers. That removes both loading times and strain on the web server.


Is that possible? Do you think it would be considered dishonest to store game-related files on a player's computer through the use of browser scripts?

#7 Antheus   Members   

2409
Like
0Likes
Like

Posted 03 April 2012 - 08:14 AM

Do you think it would be considered dishonest to store game-related files on a player's computer through the use of browser scripts?


Every HTTP response that browser receives and is does not contain no-cache in header is already cached by browser.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.