shazbot Posted October 24, 2003 Report Posted October 24, 2003 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.
Bargeld Posted October 24, 2003 Report Posted October 24, 2003 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
Yupa Posted October 24, 2003 Report Posted October 24, 2003 mmm, or you could leave all the people that don't know how to right click alone in stupid people -*BAD WORD*-
madhaha Posted October 24, 2003 Report Posted October 24, 2003 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?
Yupa Posted October 24, 2003 Report Posted October 24, 2003 I think SOS can name his own map editor himself - indeed he already has
madhaha Posted October 25, 2003 Report Posted October 25, 2003 Akai, I meant a name for the mimetype...
Yupa Posted October 25, 2003 Report Posted October 25, 2003 could call it "mime type for people with only one mouse button"
madhaha Posted October 25, 2003 Report Posted October 25, 2003 You don't understand... You can have it set up so that maps open in ssme or fill_in_program_name when you click on the link.
Bargeld Posted October 25, 2003 Report Posted October 25, 2003 php: header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename="myfile.abc"");
Bargeld Posted October 25, 2003 Report Posted October 25, 2003 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.
pixelsoft Posted October 26, 2003 Report Posted October 26, 2003 if i click on a *.lvl link, i only see the tileset in the browser..-*BAD WORD*- now i have to right-click :/
pixelsoft Posted October 26, 2003 Report Posted October 26, 2003 wtf when i right-click then i only can save it as *.bmp and not as *.lvl
Yupa Posted October 26, 2003 Report Posted October 26, 2003 must be some stupid!@#$%^&* browser you've got
pixelsoft Posted October 26, 2003 Report Posted October 26, 2003 MS IE 6.0 :/Edit: ok, it works, when i right-click and save it as *.bmp and then rename it to *.lvl ...
shazbot Posted October 26, 2003 Author Report Posted October 26, 2003 maybe i will just take the time to learn that java -*BAD WORD*-.
Dr Brain Posted October 27, 2003 Report Posted October 27, 2003 Its actually the web server's fault, but Javascript can fix it up for ya.
»Dustpuppy Posted October 27, 2003 Report Posted October 27, 2003 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
Bargeld Posted October 27, 2003 Report Posted October 27, 2003 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)
Dr Brain Posted October 27, 2003 Report Posted October 27, 2003 Yes, exactly. It has something to do with the way that UNIX detects what type of file something is.
Guest WoZeR Posted November 30, 2003 Report Posted November 30, 2003 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.
Dr Brain Posted November 30, 2003 Report Posted November 30, 2003 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.
Aileron Posted November 30, 2003 Report Posted November 30, 2003 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.
Dr Brain Posted November 30, 2003 Report Posted November 30, 2003 Or option three: add the single line to the apache config file to make it show as a LVL file.
Recommended Posts