[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-artwork] Another gfx question...

From: James Nash
Subject: [Adonthell-artwork] Another gfx question...
Date: Fri, 28 Mar 2008 20:27:51 +0000

I forgot something in my previous email:

I seem to remember some discussions about the angle at which we are looking down at the game world. This is useful for artists to make the scaling of depth and height of graphics consistent. Presumably with the 3D internals of the world this is even more important now.*

In the likely event that you have no idea what I mean, here's a diagram to explain what I mean:

PNG image

This is supposed to be a side-on view of the game world (as if we could step into Adonthell and look at things from the left). The circle thing in the top-right is supposed to be an eye looking down at the world - this is the point of view from which we actually see the game.

The orange box is some object that has a height "y" and a depth "z". The object also has a width "x" which is not visible from this angle. The width is of no interest here, since if the object is supposed to be 20 pixels wide, it will appear 20 pixels wide on the screen because we have an isometric view of the world (i.e. things don't look smaller if they're further away).

The yellow triangle is supposed to represent the angle "A" between the ground in the game world and the eye.

The distances z' and y' represent the scaled depth and height of the object as seen by the eye. The factor by which they are scaled depends on the angle "A" as follows:

z' = sin(A) * z
y' = cos(A) * z

So the question is, what should the angle A be? Furthermore, is it something that would be hard-coded in the engine or something that may vary from game to game (I'm thinking of the documentation here: Is this going to be an "Adonthell-only" thing or a general thing).

Personally, I think A = 30 degrees might be a good choice. It gives the following scaling factors:

z' = 0.5 * z
y' = 0.866 * y

Having the depth scaling being exactly a half is quite convenient IMHO.

For example, if I wanted to make a cube shaped object for the game - say a wooden crate for example - and I decide it should be 40 pixels wide - I can use the scaling factors to calculate that the vertical side should be about 35 pixels high and the top surface 20 pixels.

I can use this to my advantage when making the gfx too by starting with a flat crate texture at 40x40pixels:

PNG image

...and then scaling two copies as described above (and lightening the top one) I get a finished crate like this:

PNG image

Placed on a floor of square (in the game-world) tiles gives something like this:

PNG image

Given that NG fits in quite nicely here, I guess we must have assumed (perhaps even agreed) 30 degrees in the past. I just want to confirm this really since it's not documented as far as I can see.



                        - James

* Regarding the engine internals. This angle stuff also impacts how characters move in each dimension. Using the 30 degree angle as above a character travelling at the same speed in each direction (in game- world terms) will travel twice as much distance on the screen horizontally than they will when walking vertically.

Personal site:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]