#### Archived

This topic is now archived and is closed to further replies.

# Rotating Diamond Tile Maps

This topic is 5927 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m using OpenGL and have been having lots of fun learning about how tiling works. One things got me stumped though. I have say a 20x20 tile map and have set up 4 views of that data using a rotation formula that rotates the square round as if you are literally turning round the compass points. Now looking at the data it looks to be working correctly... EG. North East South West 111 102 222 201 000 102 000 201 222 102 111 201 The problem is though that when this rotated data is used to draw on the screen the visual effect doesn''t seem quite right due to the strange diamond tile width/height ratio which seems to be (at least with my code) 3:1 ratio. Now the question is : 1. Is this due to the diamond tile and textures being squares and thus mismatched due to the screen ratio being uneven? 2. Is this due to me rotating the tile values instead of the tiles thems if there is such a difference at all ? 3. How on earth do those top isometric games handle this type of thing... thats what I want to know ;-) Anyway, any help appreciated... Tina

##### Share on other sites
Well, I''ve moved on from this after realising that rotating diamond tiles on a square map is not ideal...

Using a hard coded routine I have found a perfect rotation pattern for a 3x3 diamond tiles on a diamond map. Just like some of those 3D effect 2D games that are out there...

Question is I still haven''t figured out a generic function that will generate the correct values when the map size is passed to it... I can do it manually just not in computer speak... sigh!

Just thought I''d update you on this if perchance someone stumbled across this and had a solution to my original problem.

Tina

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633689
• Total Posts
3013336
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!