August 8th, 2024

Isometric Projection in Game Development

Isometric projection is vital in game development, offering a unique visual style with 120-degree angles. It contrasts with orthographic and perspective projections, enabling both retro and modern games to simulate 3D environments.

Read original articleLink Icon
Isometric Projection in Game Development

Isometric projection is a crucial concept in game development, particularly for creating visually engaging 3D environments on 2D screens. This article discusses the fundamentals of isometric projection, contrasting it with orthographic and perspective projections. While orthographic projection ignores depth, perspective projection mimics human visual perception by scaling objects based on their distance. Isometric projection, however, maintains equal angles of 120 degrees between the x, y, and z axes, allowing for a unique visual style that has become popular in retro games like SimCity 2000 and modern titles like League of Legends. The article also highlights that many so-called isometric games do not strictly adhere to true isometric angles, often using a 2:1 pixel ratio for practical rendering benefits. This simplification was particularly advantageous for older hardware, enabling smoother graphics without complex calculations. The author emphasizes that while many classic isometric games utilized 2D tiles to create a 3D illusion, modern games can achieve true 3D isometric views through careful camera positioning. The article concludes with a brief coding example using JavaScript and the P5.js library to create a simple isometric tile map, illustrating the practical application of these concepts in game development.

- Isometric projection features equal angles of 120 degrees between axes, creating a distinct visual style.

- Many retro isometric games used 2D tiles to simulate 3D environments due to hardware limitations.

- Modern isometric games can utilize true 3D graphics while maintaining an isometric perspective.

- A 2:1 pixel ratio is often used in isometric games for easier rendering and calculations.

- The article includes a coding example for creating an isometric tile map using JavaScript and P5.js.

Link Icon 17 comments
By @qingcharles - 6 months
I developed the isometric engine for this[0] video game in the 90s. I remember trying to figure out the algorithm to determine where the cursor was (converting screen x/y to position on tile, taking into account height of tile stack and the fact the tiles could be transparent) was a monstrous headache for some reason.

The sort of thing you'd solve in 30 seconds with Google in 2024.

The 2D tiles were rendered out of 3D Studio Max, and the characters were meshes exported from Max.

[0] https://www.youtube.com/watch?v=9UOYps_3eM0

By @kkukshtel - 6 months
Shooting my shot here:

I developed a large-scale, 2D isometric tactical strategy game called Cantata: https://store.steampowered.com/app/690370/Cantata/

It's sort of like a 4X version of a smaller tactics game like Advance Wars. Supply lines, region capture, unique units, etc.

It's isometric throughout, in part because I just love the aesthetics of pixel art isometric (having grown up on RTC, Age of Wonders, Simcity, Alpha Cen, Civ...).

This article was (and is) still the gold standard on describing isometric math: https://clintbellanger.net/articles/isometric_math/

We built a custom renderer for the game as well to support doing lots of crazy tile-layering steps that mix and match Z-depths based on various factors like specific units, terrain type, terrain decoration type, etc. Things like:

If a human soldier is on grass, the grass should be rendered on top of them, but if its a tank the grass "makes sense" to be under the tank, etc.

Art assets were based around 64x64 size tiles, and as someone else pointed out we were technically dimetric instead of isometric (as were most isometric games, dimetric feels too uniform).

By @cmiller1 - 6 months
There are other fun projections that you can use in games not mentioned in this article too. I personally have released a small puzzle game using cavalier projection. Here's a good diagram from wikipedia https://en.wikipedia.org/wiki/Oblique_projection#/media/File...
By @graypegg - 6 months
The animation by Jordan West referenced near the end of the article is included in a really good video by him too!

https://youtu.be/04oQ2jOUjkU

It’s worth a watch! I personally prefer Jordan’s approach, which is more focused on the math than computation.

By @kookamamie - 6 months
Most "isometric" games are in fact "dimetric", i.e. follow a projection where 2 horizontal pixels match 1 vertical pixel when tracing straight horizontal or vertical lines.
By @atan2 - 6 months
Gustavo is one of the best math and programming teachers out there imo. I am currently taking the Playstation course and it's so much fun.
By @gustavopezzi - 6 months
Hello, Gustavo here (author). Thanks for sharing the article and for all tye feedback.
By @hiimshort - 6 months
Pikuma is excellent! I have enjoyed going through the videos on the YouTube channel to help understand some 3d graphics rendering techniques. Everything that I have seen has been as easy to digest as this post. Highly recommend checking out the rest of the catalogue if this kind of content is interesting to you.
By @actuallyalys - 6 months
Ironically, any isometric game nowadays would still use the 3D graphics capabilities under the hood so in a way you’re faking 3D by faking 2D. (Although I suppose you could argue that you’re not really faking 2D since you’re just using two out of three dimensions.)
By @stevengoodwin - 6 months
The third iteration of the PC strategy game, Grand Prix Manager, was meant to be in isometric. Instead of clicking on the "Designer" button, and going to a graphical database indicating how you'd proportional the designers work, you'd click on an isometric map of the office, and watch your PC walk there and discuss the new game plan.

The iso engine worked at 60fps, in 1024x748, back in 1997. But it was pulled. It was the right tech, but for the wrong game. When released GPM3 became GP World, it reverted to the traditional spreadsheet views of GPM1 & 2. (At least it looks like they kept most of my "3D" race code intact.)

By @redbell - 6 months
Let me express my deep nostalgic feeling seeing Donkey Kong Country from 1994 being mentioned!

I was a huge fan of this game. When I was playing this game, I was always wondering how they were able to achieve such stunning 3D visuals where almost all of the other games in the SNES console couldn't. It turned out they are pre-rendered, as per the article.

By @teo_zero - 6 months
What I don't like about TFA is the inconsistent, sloppy use of coordinates. Initially x,y,z are relative to the viewer with z going from the eye to the object. Some paragraphs later x,y are the horizontal plane with z going up. Then x and y are swapped (to overlap x onto y you have to rotate it 90° clockwise, the opposite of trigonometry's standard), only to be swapped again in the picture that shows the value of the angles. Coming to screen coordinates, all formulas and text assumes that y grows down, which is customary, but not the pictures accompanying the explanation how to calculate screen position from y.

Frankly, I'd expect more consistency from someone who invites his students to focus on the mathematical aspects, not only on the code.

By @Waterluvian - 6 months
Can anyone name an isometric 2D-rendered game they swear was 3D. Or a 3D game they swear was actually 2D? For some reason I find these most interesting.

I could look up the answer but I swear Bastion is entirely 2D. Though the characters might be 3D models constrained to certain angles.

By @lifeisstillgood - 6 months
I have generally ignored game development but I honestly it’s not for lack of respect - most of computer science is represented in good game dev
By @imba404 - 6 months
Naya's Quest is about how the isometric projection can mislead you. (Requires jiggering to get Adobe Flash to work)

https://terrycavanagh.itch.io/nayas-quest

" You can download the flash player projector here

https://www.adobe.com/support/flashplayer/debug_downloads.ht...

Then from within the player, File > Open this link

https://terrycavanaghgames.com/nayasquest/nayasquest.swf"