# My Isometric Engine

## Recommended Posts

ari556655    155
I just created a little web site detailing the state of the isometric engine I'm currently at work on. Since these types of games/engines seem to be a dying breed I'd appreciate any feedback or advice.

##### Share on other sites
O-san    1900
Wow, very nice! But how come you are using low resolution graphics for the backgrounds when the character and objects are in high resolution? It’d also be interesting to hear about how you calculate and render your penumbras.

##### Share on other sites
Wow, looks great!. Somehow reminds me of an old game called Nox. It must be the dynamically calculated shadows, and the nice penumbras (which I'd also like to know how you are calculating and rendering). I think your's is the only 2D game, other than Nox, that has these.

##### Share on other sites
ari556655    155
Quote:
 Original post by O-sanWow, very nice! But how come you are using low resolution graphics for the backgrounds when the character and objects are in high resolution? It’d also be interesting to hear about how you calculate and render your penumbras.

Thanks. For the most part the higher res stuff is my own art, the rest I downloaded and scaled for the sake of getting something up and running quickly(e.g. the columns), part of it may be because I'm currently lighting subdivided quads individually and not on a per-vertex basis. This makes the shadows and light falloff appear pixelated.

As far as the shadows and penumbras, I subdivide each tile and sprite into many smaller ones. Then to calculate a subdivided quad's light attenuation, I first check to see if it's within the radius of any of the scene's light's, if so I use a typical light interpolation routine to calculate the quad's light attenuation. Then I trace a ray from each influential light to that particular quad. If the ray hits something I know to shade it, if not I render it with the previously calculated light attenuation.

BTW O-san, I took a look at your journal and it's very impressive. I especially love the hand drawn art. Keep up the good work!

Quote:
 Original post by celestis_genesisWow, looks great!. Somehow reminds me of an old game called Nox. It must be the dynamically calculated shadows, and the nice penumbras (which I'd also like to know how you are calculating and rendering). I think your's is the only 2D game, other than Nox, that has these.

Thanks. Actually Diablo II used dynamic 2d shadows to a limited extent. Thanks for bringing to my attention Nox, I had never heard of it until now though I don't believe it has penumbras, just softened shadow edges.

##### Share on other sites
ari556655    155
Just thought I'd post a video of my progress. Any comments or suggestions are welcome.

##### Share on other sites
Aardvajk    13207
Quote:
 Original post by ari556655...since these types of games/engines seem to be a dying breed...

Not round here, I hope.

All looks beautiful. Keep us updated.

##### Share on other sites
jjanevski    200
Wow! Looks really great! Please keep up the great work. I love the lighting and shadows.

##### Share on other sites
_Sauce_    116
I commented on your video the other day but forgot to come back here and talk about it as well :) (oh noes everyone knows my name now :<)

I absolutely love what you've done :) Big fan of isometric rendering here, and yours looks especially pretty.

I'm curious though as to how you're calculating the shadows (I know you just answered this above, but my question is more about the world geometry). Are you treating your 2D isometric world as a 3D world and simply projecting all your textures onto the geometry (like O-san does with his engine) or is there another secret to the way your engine works?

I'd be very interested in hearing about it all :)

##### Share on other sites
ari556655    155
Quote:
 Original post by _Sauce_I commented on your video the other day but forgot to come back here and talk about it as well :) (oh noes everyone knows my name now :<)I absolutely love what you've done :) Big fan of isometric rendering here, and yours looks especially pretty.I'm curious though as to how you're calculating the shadows (I know you just answered this above, but my question is more about the world geometry). Are you treating your 2D isometric world as a 3D world and simply projecting all your textures onto the geometry (like O-san does with his engine) or is there another secret to the way your engine works?I'd be very interested in hearing about it all :)

Thanks a lot, I really appreciate the positive feedback. I'll probably post another update video fairly soon, as I've really done quite a lot since the last one, including nearly eliminating the huge amount pixelation.

I'm not really sure that I totally understand your question about shadows(perhaps you could be more specific), but I'll try an answer to the extent that I understand what you're asking about geometry. My game world exists solely in two dimensions, there's not a z coordinate to be found anywhere thought my code. I use 2d textured quads(opengl) with textures such as .

The world itself is constructed of two primary elements, tiles and entities, both of which end up being rendered as 2d textured quads. The tiles are laid out in the same exact way as nearly any other 2d staggered isometric map layout- tiles basically have no real geometric representation, aside from being able to test the base diamond tile on which they sit for collisions. Entities(npcs, objects, items, etc...) are basically just circles(sometimes oblong). And everything is done on the cpu, no shaders.

Hope I answered the right question, if not please let me know.

##### Share on other sites
jdarling    232
It looks as though you are using 2D shadow casting (or recursive shadow mapping) and utilizing the Y distance of the tile as the "height" to determine how far past the shadow should be cast. If the Y is > the light source Y then the cast is infinite.

If so, that's one hell of a good twist of an old technique. If not, it may be faster LOL.

IE: Similar to http://eonclash.com/ViewProduct.php?ProductID=27 only instead of ascii your using graphics and the graphic height to determine how long a shadow lives.

- Jeremy

EDIT: You would also be using the light position to determine how much of the actual tile its hitting to light up. Thus giving you a very realistic looking light response on each tile.

##### Share on other sites
ari556655    155
Quote:
 Original post by jdarlingIt looks as though you are using 2D shadow casting (or recursive shadow mapping) and utilizing the Y distance of the tile as the "height" to determine how far past the shadow should be cast. If the Y is > the light source Y then the cast is infinite.If so, that's one hell of a good twist of an old technique. If not, it may be faster LOL.IE: Similar to http://eonclash.com/ViewProduct.php?ProductID=27 only instead of ascii your using graphics and the graphic height to determine how long a shadow lives. - JeremyEDIT: You would also be using the light position to determine how much of the actual tile its hitting to light up. Thus giving you a very realistic looking light response on each tile.

No that's not the method I am using, but thanks for brining it to my attention. I skimmed over a few articles on "recursive shadow casting"(or whatever it is, there seems to be no clearly defined name for it)and it would appear that this method is quite a bit faster(or at least should be) than the method I'm using.

Though for a number of reason I don't think I would be able to implement it into my game. The main reason being that I don't store lists of subdivided tiles. When drawing a single diamond shape ground tile quad(64x32 pixels seen in the above pic), I will sub divide it into either 128 or 512(depending on my LOD setting) smaller quads and light + ray trace each individually as needed(though many get thrown out and some don't get ray traced). During this subdivision process, I have access to the parent tile, and to the subdivided children tiles, but not to any other parent tile(or any other parent tile's subdivided children). After I'm done rendering all of the sub divided tiles, I throw them all away(but of course the parent itself is stored in a map array structure).

That being said I'm still going to look further into this method you've introduced me to, thanks.