Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Isometric Conversion Woes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Lance42   Members   -  Reputation: 335

Like
1Likes
Like

Posted 11 September 2012 - 10:19 PM

I just added to my game engine the ability to handle isometric tiles. Here's a sample of my placeholder tiles:
Posted Image

It's all working great, except, I have stored the tiles in a Dictionary(so that I can quickly update a particular tile as needed) and now need to render each tile sprite in a particular order, or the screen is a mess. Tiles must be rendered in order with those tiles with a higher x/y value being rendered first, so those on the left side and bottom of the screen are the only ones showing their sides. Am I going about this right? Or is there a much better way? Thank you in advance.

Lance...

Sponsor:

#2 Ashaman73   Members   -  Reputation: 4605

Like
0Likes
Like

Posted 11 September 2012 - 11:53 PM

You are right here as long as you don't use some kind of zbuffering.

The problem of determing the visiblity is, that you need to render the hidden parts first. A iso map could be seen as a map of cubes, which are subdivided by planes. Therefore you can take a binary space partition algorithm to render your scene, which results in the simplified order you have mentioned.

#3 yewbie   GDNet+   -  Reputation: 627

Like
0Likes
Like

Posted 12 September 2012 - 08:56 AM

Since you are using C# and I am hoping XNA?
When you do your spriteBatch.Draw (For each tile) base the final argument (LayerDepth) on the Y value of your isometric tile.

#4 Lance42   Members   -  Reputation: 335

Like
0Likes
Like

Posted 12 September 2012 - 03:49 PM

You are right here as long as you don't use some kind of zbuffering.

The problem of determing the visiblity is, that you need to render the hidden parts first. A iso map could be seen as a map of cubes, which are subdivided by planes. Therefore you can take a binary space partitionalgorithm to render your scene, which results in the simplified order you have mentioned.


Thanks... I'll check out the link. =D

Since you are using C# and I am hoping XNA?
When you do your spriteBatch.Draw (For each tile) base the final argument (LayerDepth) on the Y value of your isometric tile.


Using OpenGL, though I do plan on adding an abstraction layer soon so I can use whatever. I think it's important to get a working game first though. =D


On a related note, I've been referencing NUnit for a while with the intention of using it, and finally got around to implementing a few tests of my tile, and tilemanager classes. It's already uncovered a couple issues. Thank you NUnit! =D

#5 Lance42   Members   -  Reputation: 335

Like
0Likes
Like

Posted 12 September 2012 - 04:46 PM

Got it working. NUnit to the rescue. I had a couple silly errors in my code. I was thinking about it correctly, as mentioned. =D Thanks for the help.

Lance...




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS