Jan 13 2008

Showing off

Tag: UncategorizedAdam Wright @ 11:15 pm



Showing off

Originally uploaded by archgrove

Insanely busy, but not dead. Here’s a photo from last summer. When I can spare the editing time, I’ll distill some of my academic writing into posts here.


Aug 06 2007

Absence makes the grass grow longer

Tag: UncategorizedAdam Wright @ 7:11 pm



Hever Castle Fountain

Originally uploaded by archgrove

I’m still around, just busy with form filling and contract work. I’ve a few ideas of what to fill this site with over the next few months that I’ll hopefully start soon. Just hard to know what level to pitch content at!

In the meantime, here’s a dragon.


Jun 11 2007

Testing Flickr

Tag: UncategorizedAdam Wright @ 6:02 pm



Dunorlan Park Dragonfly

Originally uploaded by archgrove

I’ve fallen behind on my “test lots of Web 2.0 style” websites routine, so I guess it’s time to upload some of my photography to Flickr and see how the world has moved on whilst I’ve been cloistered in academia.

I’ve got mixed feelings about it all so far, but in general, I suppose it’s a step forward.


Jun 01 2007

A route to the past: Magellan 2 (Part III)

Tag: Code, ProgrammingAdam Wright @ 7:58 pm

Right, we left off (a long while ago), having looked at the basic dungeon layout. The question was, how do we turn the geometry of a dungeon cell into a two dimensional map? Let’s look at a (badly, hand) drawn section of a dungeon wall. It’s got a floor, some obvious wall, and a little “hump” – some kind of rock, or bizarre architectural anomaly (it is a dungeon, after all).

Vector art image of dungeon geometry

We can see the raw triangles in 3D, and we’d like to get this down to a set of lines in 2D (we can draw lines very easily using the APIs available to us). To accomplish our goal, we’ll need to think about what we actually want to see on the map – showing the floor, and little lumps and bumps is not really useful information for people. The only real obstructions that they’ll want to see mapped are the extents of the dungeon – the walls.

How can we distinguish a wall from the geometry? Well, the distinguishing fact I used in my simple algorithm was that it’s vertical – everything within a certain tolerance of the vertical axis is a “wall”, and would appear on the map.

On this diagram, we see the tolerance region – all polygons that are upright enough to be contained within the triangle are going on the map. Let’s remove everything that’s outside the verticality acceptance region, and see what we’ve got left.

Tolerance region for wall verticality

Not bad – everything remaining looks pretty damn wall like to me. All we’ve now to do is turn this into a set of lines, discard the vertical components, and we have a reasonable 2D representation of the dungeon block we can use to map.

The final wall geometry

That’s pretty much it for Magellan 2 – once these line blocks are collected, they’re simply transformed (by some simple mathematics) to deal with the translation and rotation of the dungeon relative to the current viewpoint of your character. Rendering them to the screen is just a case of taking each line, transforming it, and then telling Decal “draw this line starting here and ending here”.

There are plenty of problems with this approach (some of which manifested themselves in the released version); however, this explains the basic concept (which was all I set out to do). One day, if there’s interest, I might write about these design faults, and the potential improvements that could be made.


Apr 11 2007

A route to the past: Magellan 2 (Part II)

Tag: Code, Mathematics, ProgrammingAdam Wright @ 11:29 am

Just to clear up some misconceptions, the point of this article is not to recreate the plugin, or repair it for the modern Asheron’s Call. The plan is to write a set of articles on how it was created, and why it (in general) worked. Those looking for a replacement would do well to visit http://www.flynn1179.me.uk/ac/?minimap and see the impressive looking work that Thorfinn Sigurdssen has been doing (Disclaimer: I have neither personally tested this, nor been contacted by the author).

Last time, we left off having made a series of educated guesses about how the dungeon system in AC works. From our observations, we’ve noted that every dungeon seems to be laid out in a giant 3d grid of cubes – assembled as if from lego bricks, prefabricated elements of dungeon.

AC Dungeon template

We can see the prototypical dungeon template above – each little cube is ready to be filled with a one of a choice of dungeon blocks by an eager designer. A template block might look as follows.

AC2 Dungeon cell

This one is taken from my Asherons’s Call 2 archives (so don’t go looking for it in game), but it illustrates the point. The player walks around on the interior (the complex looking set of triangles), and the rest of the cube is filled with virtual nothingness – in this fashion, we can make our big cubes look like caves, temples, whatever is needed (rather than a boring apartment block).

We could take four of the above dungeon elements (that we call dungeon cells), rotate them around and put them into adjoining cubes in the template to create a donut dungeon – a giant loop. Obviously, it’s up to the designer to ensure that there’s no corridor or tunnel that leads into an unfilled cube (and hence into the void).

This is all well and good, but now that we’ve made a plausible (and in this case, rather educated) guess at the dungeon structure, how does it help us? Our task is to draw a map of the walls of the dungeon, not big wireframe meshes stuck around the place! So, tune in next time to see a little bit of simple mathematics that will transform the above into something more useful for our purposes.


« Previous PageNext Page »