Jump to content
SubSpace Forum Network

Recommended Posts

Posted

I'd like to see the map editor coded so that a url will let you download the map and not give you an image of the tileset. I've asked around about this and apparently it's because IE reads the first few lines of code from each file and the first thing in a .lvl file is the tileset, for an example :

 

www.gamemapping.com/Files/Maps/Chaos/brick.lvl

 

Anyway this can happen? As of now I have to zip all of my maps so that they can be downloaded which is a bummer.

Posted

If a map editor changes the .lvl format to do as you ask...then it will become an invalid map in the game. So thats an impossibility.

 

I do know that you can use javascript to make links into a "download" link instead of just a direct link to the file... maybe try that option.

 

edit: Code to do this, found here.

http://www.planet-source-code.com/vb/scrip...d=2183&lngWId=2

Posted

You make it sound like IE was responsible for the "problem". It isn't but IE just loves to make life even more difficult. Maybe if a new mime type was set up and things configured on the browser side things would be handled properly. I don't see why the map editor should be responsible for any of this.

 

Anyone want to propose a name?

Posted

php:

 

header("Content-Type: application/force-download");

header("Content-Disposition: attachment; filename="myfile.abc"");

Posted
Call it whatever you want, i would assume that if you were to use the code i posted, that you would research it just a tad and learn how to customize it to your needs.
Posted

How is it the webserver's fault? The webserver just serves the file, it's up to the client to display it. IE sees the bitmap header, so displays a bitmap.

Besides, you can just right click on the link and do save as, or left click on the link and do file->save as

Posted

It's the webserver's fault for !@#$%^&*igning it an image MIME type, These things are configuurable on the server end, and it IS possible to change it there. The PHP code I posted is a workaround.

 

(the basic reasoning is this: how does the webserver know to process a PHP page, rather than just sending you the whole page like it does with an .html file or .txt file? It is configured to do so...the same thing can be done with file types of .lvl)

  • 1 month later...
Posted

in the lvl format, there is a tileset cramed in it. The tileset is a bmp file. Its the client's browser fault for displaying it as a bmp. It might be possible to remove the BM part out of the lvl format since its really not important to have it.

 

The browser probably scans the file to find the BM part then it believes its a bmp file instead of a lvl. Nulling it out might fix the problem. So its possible to do this and make it work with subspace too since the BM is just the header of the tileset.

Posted
in the lvl format, there is a tileset cramed in it. The tileset is a bmp file. Its the client's browser fault for displaying it as a bmp. It might be possible to remove the BM part out of the lvl format since its really not important to have it.

 

The browser probably scans the file to find the BM part then it believes its a bmp file instead of a lvl. Nulling it out might fix the problem. So its possible to do this and make it work with subspace too since the BM is just the header of the tileset.

No... The webserver tells the browser that it has a mime type of a bitmap file. Then the brower uses the default application for bitmaps.

Posted

Dang, it took until the end of the page before you guys were clear enough so that I can understand you.

 

Judging by this, there is only two solutions to the problem: change the web browser or change the .lvl file format. We can't do the first. As for the second, it would require that we change the way Continuum itself is programmed, which isn't worth it if it is possible.

 

Obviously, the only thing we can do is create a completely different type of file that would be formatted for online transfer, and a type of program or function that would convert from one to another.

 

Basically, we have a file which is an .lvl file with the bitmap componant at the end instead of the beginning, lets call it a .vll file. Then, you would need a program that would cut and paste the componants before and after each other for conversion.

Guest
This topic is now closed to further replies.
×
×
  • Create New...