dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Isometry z-sorting problem

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    5

    Isometry z-sorting problem

    Dear all,

    I am a beginner of game designer, I have some problem on z-sorting.

    I have read a thread about tony PA's z-sorting:
    http://board.flashkit.com/board/showthread.php?t=751567

    But when I add some item, such as wall, it may not work,


    In this case, I need to split the wall into two or three tiles?
    Or any idea or suggestion I need to care?

    The source of the flash game:
    http://lostcity-studio.com/Trash/zsortIso.fla
    Last edited by tonypa; 05-03-2009 at 03:42 AM. Reason: fixed img tag

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,227
    Sorry, I cant open your fla because I dont have CS4. I am not sure why it does not sort properly, maybe my theory was faulty after all.

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    5

  4. #4
    Senior Member Pazil's Avatar
    Join Date
    Sep 2006
    Location
    Ontario, Canada
    Posts
    913
    That scenario is a common problem to any 3d engine (or even pseudo in this case). I'm pretty sure that you'll need to split up the shelf into several blocks.
    WIP-ZOMBIES

    I love vegetarians! More meat for the rest of us!

  5. #5
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,227
    I think you have to put in correct values for xd. If you change all the xd to 1, sorting will fail. It must be the number of pixels from left edge of each bitmap to its lowest point. I have attached the picture for one object and here is the code to set up it properly:
    game.item10 = {x: 150, y: 150, xd: 64, bmp: "item6"};
    Notice that x coordinate is also set to the lowest pixel, not left side of picture.
    Attached Images Attached Images

  6. #6
    Junior Member
    Join Date
    May 2009
    Posts
    5
    Thank you very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center