Graphics:Angle

From Adonthell
Jump to: navigation, search

The game world is displayed by the Adonthell Engine as if it was viewed diagonally from above at a certain angle. Furthermore, the view is isometric so objects that are further away from the viewer do not appear smaller. The screenshot below illustrates this:

03 cellar screenshot.jpg

Since all the graphics in the game are just 2D bitmaps and not rendered in real-time 3D, it is up to the artists to create the illusion of a 3 dimensional world. To that end you need to decide from which angle you are looking down at the game world and design your graphics accordingly. The following diagram illustrates how the angle affects the vertical scaling of objects by taking a side-on view of the game world (imagine stepping into the game and looking at things from the left):

3d angle improved.png

The "giant scary eye" represents our view on to the game world. If an object in the game world has a depth z then the eye sees it vertically compressed with a height z' (shown by the red line in the diagram). Similarly, an object's height y will be vertically compressed to y'. Since we use an isometric view there is no scaling in the horizontal dimension, so an object's width x will remain unchanged. The amount by which z and y need to be scaled is dependent on the angle A at which the eye looks down on the world. Some simple trigonometry yields the following formulae:

Depth: z' = sin(A) * z

Height: y' = cos(A) * y

The Adonthell Engine does not mandate any particular viewing angle, so it is up to the designers of a game to choose one. For the official Adonthell games such as "Dun Barethsol" we have agreed on an angle of 48.2 degrees. It may be an odd sounding angle, but it gives some rather convenient scaling factors when plugged into the above formulae:

Depth: z' = ~ 3/4 * z (it's actually 0.7454... but that's as good as 0.75)

Height: y' = 2/3 * y

The following diagram illustrate how to apply the scaling to some basic objects: A cube, a cylinder and a pyramid.

Angle demo small.jpg

The first row shows what the objects would look like if seen directly from above (i.e. if the angle were 90 degrees) and the second row shows them as viewed directly from the front (i.e. if the angle were 0 degrees). The third row then shows the in-game view from 48.2 degrees, where you see both the front and the top of the objects with their respective scaling applied.

It often helps to plan your map graphics like this first - imagine what dimensions they would have if they were real 3D objects and then scale the horizontal and vertical surfaces as described on this page.

Examples/Guidelines

Adonthell specific
  • A real world 1x1 meter square that is lying flat on the ground would result in a 48x36 pixel in-game tile.
  • A 2 meter high wall, would result in a 64 pixel high sprite.
  • While the game does not enforce a tile structure in the maps, keeping images that represent flat surfaces (such as floor tiles) as multiple of 48x36 makes it easier to combine them without gaps.
  • Characters are drawn in a mild deformed style, with the body having a total height of four heads, similar to some toys such as Playmobil.
  • For a more detailed reference, see the section about model conventions.
Personal tools
Namespaces

Variants
Actions
Navigation
Exits
Tools