Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Z-Ordering/Sorting in SFML using sfml-tmxloader  (Read 1686 times)

0 Members and 1 Guest are viewing this topic.

ujrkingdom

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Z-Ordering/Sorting in SFML using sfml-tmxloader
« on: January 19, 2016, 11:41:00 pm »
Hi Guys,

This is my first time posting so if I'm doing anything wrong such as posting in the wrong section tell me.

So the problem I'm getting is trying to z-sort my entities in my isometric map. I'm using fallahn's tmxloader and have changed it so that I can draw the tiles in a diagnol order starting from the top-right most tile that appears in the map. I was wondering if anyone can give me suggestions on how I should go about z-sorting with this setup.

Thanks!

Images of how the game works so far:

http://puu.sh/mC4eM/65088c2581.jpg
http://puu.sh/mC4hf/6b4e24861a.jpg

This is an example of how the rendering is being done:
http://puu.sh/mC4oi/21b14b4aa4.png

SeriousITGuy

  • Full Member
  • ***
  • Posts: 123
  • Still learning...
    • View Profile
Re: Z-Ordering/Sorting in SFML using sfml-tmxloader
« Reply #1 on: January 20, 2016, 04:25:02 pm »
As this has nothing to do with SFML itself, you probably won't find any help here.

fallahn

  • Sr. Member
  • ****
  • Posts: 495
  • Buns.
    • View Profile
    • Trederia
Re: Z-Ordering/Sorting in SFML using sfml-tmxloader
« Reply #2 on: January 20, 2016, 05:50:10 pm »
I've never really tried rendering isometric maps with the map loader, so support is sketchy at best. There's an interesting topic here which might help, although you'll probably have to reimplement the drawing side of the map loader to make it work.

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Z-Ordering/Sorting in SFML using sfml-tmxloader
« Reply #3 on: January 20, 2016, 08:29:35 pm »
There's a lot of good info about isometric tile based games available here: http://www-cs-students.stanford.edu/~amitp/gameprog.html#tiles
Maybe some of that will help you.