|

Graphics On The Web Page
As the web page has grown, and my own access to better quality graphics has
improved, this web site has gone through three graphical makeovers, as well as
having been JavaScript enabled.
I am indebted to Eric Tapley
for his graphics work, and his gentle application of a sense of aesthetics to my
skull with a crowbar.
- Graphics And Links
- Image Maps
- JavaScript
- Things I Wish I'd Thought Of
Graphics And Links
The first decision made, graphically, was one of "theme" for the
web site. An organic/wood/earthtones theme was chosen, both because of the
medieval subject of the game that this web site services, and because many
people find the internet, with all of its technical gimcrackery, to be somewhat
intimidating. By appealing to the warmth of organic color schemes and textures,
we hope to make visitors to this web site more comfortable.
Because of the muted colors of the graphics, a black background was chosen.
Black offers the widest dynamic range for visual contrasts, and allows for
softer edges on graphics, once again, making for a more organic feel to the
graphics and to the web site as a whole. Keeping face with the softer color
schemes and textures on the web site, the text color was chosen for a balance
between high contrast and readability.
In order to support subtler color depts and shading, the graphics on this
web site are almost exclusively JPEG images, saved with 16.7 million colors.
Because of this, there can't be any animations or transparencies, which in turn
precluded the use of a background image. When the PNG graphic standard becomes
the default image format of the Internet, rest assured that some of these things
will be changed.
All of the content-based graphics on this site use the ALT attribute to
provide text for non-graphical browsers. ALT text for a link is surrounded by
brackets. Graphics that are decorative, such as the Magic Horizons
logo, also have ALT text, although the need for it isn't as pressing.
The individual pages on this web site were optimized for a 640x480 browser
window. Because of this, the maximum width of a graphic is 420 pixes, and the
effective maximum is about 400 pixels. Sidebar graphics have a maximum width of
75 pixels, and very rarely went wider than 72.
Image Maps
This site makes use of a few image maps, notably on the
Map of Port Mahon and on the
navigation scrolls used in the sidebar and at the bottom of each page.
The map of Port Mahon is a client-side image map, as specified in the HTML
3.2 specification. Care has been taken to create ALT text where needed at the
clickable areas on the map. The map points to a pair of brief gazettes on the
local terrain and monsters around Port Mahon.
Client-side image maps were chosen over server side image maps because
they're simpler to set up, easier to maintain, and have a mechanism to make the
image map itself useable to non-graphical browsers. (The ALT tag mentioned
above.) There's also a noticeable improvement in performance and speed.
The other "image map" is a faux image map, consisting of a graphic
that's been cut to certain dimensions and each component placed into a table
cell. The table was set with the BORDER, CELLPADDING and CELLPADDING attributes
set to "0". This allows the pieces of the graphic to abut
one-another, making it look like one contiguous image. In order to avoid the
blue outlining that usually accompanies an image used as a button for a link,
the IMG tag had its BORDER attribute set to "0" as well.
The faux image map was chosen for the highlighting functions written into
JavaScript.
This allows the pieces of the graphic to abut
one-another, making it look like one contiguous image.
Embedded JavaScripts
The gold highlight effect on the sidebar and bottom scroll bar graphics are
done with an embedded JavaScript. The Javascript is loaded just prior to the
table containing the pieces of the faux image map, rather than between the <HEAD>
and </HEAD> tags. The JavaScript takes a certain amount of time to be
parsed and interpreted by the browser; it's better to have the script embedded
just prior to where it will be used than to delay the loading of the initial
content of the page by letting it load at the top.
Initially, the script was loaded at the bottom of the page, but this caused
JavaScript errors when the browser encountered "ONMOUSEOVER attributes in
an HREF attribute that called for a function that hadn't been loaded yet.
Things I Wish I'd Thought Of
There are a number of things I wish I had either implemented earlier in the
development process of this web site, or wish I'd been able to get to work.
- Base HREF
- This defines the basic HREF for all links on a given page. For the MH
site, a suitable base HREF would have been sage.doit.wisc.edu/~burnside/mh.
This makes all the links significantly easier to implement; it is, however, a
decision that should be made at the beginning of the design process, as it can
bollix relative URLs if not done carefully.
- Base TARGET
- This defines the basic TARGET attribute for all links on the web site, but
its overridden by the TARGET attribute of an individual link. The base TARGET
for the MH web site would have been _top. I may implement this on new pages as
they're added, but retrofitting all the existing pages for it isn't worth the
effort.
- Server Side Includes
- This is a way to get the server to insert commonly used pieces of HTML,
such as the button bars on the bottom of the page. The utility of this becomes
evident when the number of pages using this common element exceeds two or three.
With a server side include, I could just update the button bars once, rather
than having to propogate the changes across 80+ files. An added benefit of
doing server side includes is that the HTML is cached separately from the rest
of the page, making the loading of subsequent pages significantly faster,
particularly if JavaScripts are included.
- Pointers to External JavaScripts
- It is possible to use the <SCRIPT> tag to point to an external script
through the SRC attribute. One of the major headaches with this site was trying
to get that to work. There being a deadline closing in, I chose to embed the
script rather than point to an external source file. As time permits, I may go
about and try getting this to work again, as it allows the script to be cached
as a separate file, making the delay on loading subsequent pages shorter.
Problems with the page? Email Ken
Burnside. |