[AS3] Dynamically loading files from a webserver

Started by
5 comments, last by Antheus 12 years ago
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!
Advertisement
Don't serve static data through your web server stack, serve it from a static store (preferably a cdn).
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?
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.
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.
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?
Do you think it would be considered dishonest to store game-related files on a player's computer through the use of browser scripts?[/quote]

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

This topic is closed to new replies.

Advertisement