URL to ASCII Map
Moderator: Moderators
URL to ASCII Map
to avoid the tells where to find the ascii map
http://haeggar.techzone.at/icesus/map.php
http://haeggar.techzone.at/icesus/map_street.htm
ps: ideas how to improve the map - all to this topic pls
http://haeggar.techzone.at/icesus/map.php
http://haeggar.techzone.at/icesus/map_street.htm
ps: ideas how to improve the map - all to this topic pls
Last edited by haeggar on Thu Mar 16, 2006 17:37 pm, edited 3 times in total.
At close to 2.9MB to download, I'm guessing it's not for those with low connection speeds.
You could cut down about 840KB by changing the lines from:
<span style=“color:#XXXXXX;">
to:
<span class="XX">
where "XX" is a style specification added to your style header.
Example:
It doesn't seem like much, but it does kill off about 30% of the file size.
You could also probably (not tested) cut out another 210KB by changing the span to B tags and adding "font-weight:normal" to the CSS style. I'm not sure if this would work in firefox, opera, etc, but it does work in IE.
Again, doesn't seem like much except it's easy to implement and does kill off about 210KB (about 7% of the original file size).
On top of all of that, you could make a default color for the <span> or <b> tags for the most used color combo. So if plains have the most <span> tags created (not the most number of terrain, but the most span tags), then you could do something like the following (assumes forests have the most number of associated span tags).
The amount that this reduces will be directly related to the type of terrain that has the most span tags. In the example above, because you've given the span tag the default of green, any span tag without a specific CSS class will show green. Thus saving 11 bytes multiplied by the number of span tags that are the default color. There are 79k+ span tags in the page, so if one type of terrain has 10-20k span tags then it would save an additional 110KB - 220KB.
So if all of those were done, it might be something like 1MB-1.3MB saved out of 2.9MB total.
PS. I just realized that you only really need 2 character class names for terrains like "e" and "e", but you could just use 1 character class names for "g", "p", etc. This would save yet more bytes.
You could cut down about 840KB by changing the lines from:
<span style=“color:#XXXXXX;">
to:
<span class="XX">
where "XX" is a style specification added to your style header.
Example:
Code: Select all
<style>
div {
position:absolute;
overflow:auto;
visibility:hidden;
border-bottom: 1px solid #FFFFFF;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #FFFFFF;
background-color: #000000;
color:#FFFFFF;
font-family:'Courier New', Courier, mono;
font-size:small;
}
.g1 {
color: #FFFFFF;
}
</style>
<span class ="g1">gggggggggggggggggggggg</span>
You could also probably (not tested) cut out another 210KB by changing the span to B tags and adding "font-weight:normal" to the CSS style. I'm not sure if this would work in firefox, opera, etc, but it does work in IE.
Code: Select all
<style>
div {
position:absolute;
overflow:auto;
visibility:hidden;
border-bottom: 1px solid #FFFFFF;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #FFFFFF;
background-color: #000000;
color:#FFFFFF;
font-family:'Courier New', Courier, mono;
font-size:small;
}
.g1 {
color: #FFFFFF;font-weight:normal
}
</style>
<b class ="g1">gggggggggggggggggggggg</b>
On top of all of that, you could make a default color for the <span> or <b> tags for the most used color combo. So if plains have the most <span> tags created (not the most number of terrain, but the most span tags), then you could do something like the following (assumes forests have the most number of associated span tags).
Code: Select all
<style>
div {
position:absolute;
overflow:auto;
visibility:hidden;
border-bottom: 1px solid #FFFFFF;
border-top: 1px solid #FFFFFF;
border-left: 1px solid #FFFFFF;
border-right: 1px solid #FFFFFF;
background-color: #000000;
color:#FFFFFF;
font-family:'Courier New', Courier, mono;
font-size:small;
}
span {
color: #00FF00;
}
.g1 {
color: #FFFFFF;
}
</style>
<span class ="g1">gggggggggggggggggggggg</span><span>eeeeeeee</span>
So if all of those were done, it might be something like 1MB-1.3MB saved out of 2.9MB total.
PS. I just realized that you only really need 2 character class names for terrains like "e" and "e", but you could just use 1 character class names for "g", "p", etc. This would save yet more bytes.
New Version of the map For those who dont need the full map. its possible now to cut the world in pieces
parameters are: top,left,width,height
e.g.
http://haeggar.techzone.at/icesus/map.p ... &height=25
just found it funny to code that - no idea if it is of use
BUT you can reduce the size of the map to load.
parameters are: top,left,width,height
e.g.
http://haeggar.techzone.at/icesus/map.p ... &height=25
just found it funny to code that - no idea if it is of use
BUT you can reduce the size of the map to load.
Didn't really think this through but using classes seemed very space inefficent way. After small talk with my personal css expert atreus we reached agreement that creating main level elements instead of these classes is the space efficient way. Example by courtesy of atreus http://arabuusimiehet.com/typo/testi.html. Some way to get rid of end tags would be nice but reading CSS specs makes my head hurt:(
- atreus
- Supporting Member 2006
- Posts: 29
- Joined: Tue Mar 30, 2004 19:13 pm
- Location: Hellsinki. Funland.
- Contact:
More like the only browser it DOESN'T work with, is MSIE (Firefox, Opera work perfectly).haeggar wrote:that example unfortunately only works with FIREFOX not with MSIE
Anyway, classes are the safe way of doing it since most mainstream browsers support them well enough. Defining your own elements would be the space-saving way of doing it, just requires a browser that actually works.
.atr.
Edit: Removed the unnecessary punchline and replaced with another.
Last edited by atreus on Tue Mar 14, 2006 12:33 pm, edited 3 times in total.
.psychedelicious.
That page isn't valid HTML. So I would guess that is why it's not displayed correctly in IE. There is no DTD defined that tells the browser what those new tags do. It is not even valid XHTML (not well formed, doesn't include DTD, invalid characters strings). FireFox is making a lot of assumptions to get this to work.haeggar wrote:that example unfortunately only works with FIREFOX not with MSIE
- atreus
- Supporting Member 2006
- Posts: 29
- Joined: Tue Mar 30, 2004 19:13 pm
- Location: Hellsinki. Funland.
- Contact:
I know. I'm lazy when it comes to quick'n'dirty tests - it's just not worth the effort going 100% by the specification when you're just quickly testing something.apog wrote:That page isn't valid HTML. So I would guess that is why it's not displayed correctly in IE. There is no DTD defined that tells the browser what those new tags do. It is not even valid XHTML (not well formed, doesn't include DTD, invalid characters strings). FireFox is making a lot of assumptions to get this to work.haeggar wrote:that example unfortunately only works with FIREFOX not with MSIE
I do admit that my dislike of IE is - while not unfounded - slightly unfair.
.atr.
PS. No, I can't point you to documentation that states that creating your own elements without fully implementing XHTML is allowed, but can you point me to documentation that explicitly forbids it? Note that I'm not trying to be a smart-ass here, it's an honest question hoping for an answer - it's been a while since I had to really concentrate on knowing the specs in WWW matters.
.psychedelicious.
http://www.w3.org/Style/customdtdatreus wrote:No, I can't point you to documentation that states that creating your own elements without fully implementing XHTML is allowed, but can you point me to documentation that explicitly forbids it?
Moo
Possibly slightly offtopic, but, anyone has any idea how to properly covert:
"The mage island crossing"
Code: Select all
htt*eee htt/eee
***ttte into --+ttte
tt**ttt tt|\ttt
tt*t*** tt|t+--
How much help would it be if I provided the actual ASCII map to work with? Would it be possible to apply colouring to it easily? Although this would require me to hand over a new map when some changes are made to it. It could be freely available on the website unless it was so damn big and that would make it quite bandwidth eater
Drop me a tell, I might not notice answers to this topic quickly.
Drop me a tell, I might not notice answers to this topic quickly.