🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Adding "Tilt" (depth) effect to overhead tactical game.

Started by
1 comment, last by Randy Gaul 6 years, 4 months ago

Hi all, I am starting to develop a tactics game and ran into a problem I had not thought of. I began by drawing a screen with a hex grid, and this is no big deal. I got that working fine. But, I realized it didn't look quite right. This is because in most strategy games, you're not looking straight down. There is a bit of a tilt. Attached is an example of what I mean. The hexagons on bottom are larger than the hexagons on top, and I'm unsure of how to go about adding this effect. Especially when you consider that some maps may be of different sizes. 

I'm not sure if this is the right place to post something like this, but it seems as though some sort of linear transformation would be applied? No? I don't even know where to begin in a problem like this.

Thanks.

example.jpg

Advertisement

There are quite a few ways to implement this, but the easiest would probably be to learn a bit more about mathematics and matrices. For example, a perspective matrix can be used to create the perspective effect you are referring to. Here are two resources to help get you started:

This topic is closed to new replies.

Advertisement