Question Locked

Running Web Graphics from Client Hard Drive

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm working on a browser-based multiplayer game and we're examining possible solutions for page loading times for dial-up users. What I need to know is how I can set the graphics to load from the client's hard drive if a downloadable graphics pack is offered.

4 replies

by baron orlando

One way would be to use absolute paths to the image files in the HTML.

img src="file:///c:/YourAppDir/images/xxx.jpg"

It's not pretty, but it's functional. The biggest issue would be that you would need to make sure that everyone stores the image files on the same drive and in the same folder.

by ic-it

substitute %userprofile% for c: ?

img src="file:///%userprofile%/YourAppDir/images/xxx.jpg"

Obviously I know nothing about html, but it is an environment variable.

by baron orlando

Great idea, but I couldn't get any of the windows environment variables to work in the HTML. I don't think the browsers translate the paths properly.

This discussion is closed to new replies.