My Isometric Engine

Started by
9 comments, last by ari556655 14 years, 8 months ago
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.
Advertisement
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.
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.
Quote:Original post by O-san
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.


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.

So far this alone will give me hard shadows, to calculate the penumbras one more step is needed, I got the idea of how to do it from this article. Instead of treating the light as a single point, this point needs to be enlarged and given an actual radius(I think I use something like 8-16 pixels). When the initial raytrace from the center of the light to the quad fails because it hits something, I create two more rays, each beginning on opposite sides along the light's center radius(perpendicular to the original ray) and ending on the quad. Then I divide the previously calculated attenuation value for the quad by the number of rays which fail(collide with something). And I use a gaussian blur to further soften the edges. Alternatively to produce higher quality penumbras(3 shadow fins) I can do this third step for every single sub divided quad even if the initial raytrace is successful- this is more costly though.

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_genesis
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.


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.

Just thought I'd post a
">video of my progress. Any comments or suggestions are welcome.
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.
Wow! Looks really great! Please keep up the great work. I love the lighting and shadows.
------------------------------------------------------------visit my: homepage
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 :)
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 these.

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.





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.

This topic is closed to new replies.

Advertisement