Code:
Problem description:
So I decided to poke around at BYOND's isometric system to see what I can do with it, also looking at the "Your First Isometric World". I was immediately beset with an oddity that I can't seem to figure out why it's happening. Also created a couple isometric sprites.
I can only explain it as this (and I hope it gives an idea):
Every tile is being treated as a "wall" as opposed to a "floor". The player mob appears behind the floor, and when I enter a new turf it is obscured again.
I verified this by poking at Lummox JR's "Your First Isometric World" tutorial files. Moving the sprite to the bottom of the icon only yielded a pixel being obscured on the mob sprite, (mostly) properly acting like a floor. Doing the same on a normal sprite in my project only had it appear behind it as a wall.
What would cause such a thing to occur?
The differences:
-I used an old existing project of mine, set the map format to isometric. There was one map, and the setup was minimal. Why not?
-Tile Size was 32 as opposed to 64.
Steps tried:
-Setting pixel_x/y/z to 0 on all turfs
-resetting bound_x,y on mobs
-creating an entirely new map
-setting tile_size to 64, for some reason.
ID:2036547
![]() Feb 14 2016, 1:03 pm
|
|
Sadly, that did not work either.
This is an image of the issue in action: https://dl.dropboxusercontent.com/u/11802753/isoissue.png |
Isometric has some strange layering issues. To avoid them, you may need to design your icons in a certain way, that is specific to your game.
Try giving the turfs a negative plane value, or the mobs and objs a higher one. |
Multiverse7 wrote:
Isometric has some strange layering issues. To avoid them, you may need to design your icons in a certain way, that is specific to your game. That sadly has also failed to work. ;.; |
I was sure that would work. I can't really help much without seeing the actual icons that are used.
|
Multiverse7 wrote:
I was sure that would work. I can't really help much without seeing the actual icons that are used. All I did was: For the ground, I selected the option for "create Isometric tile" and just colored it. For the mob, it's the same, with extra markings to figure out where to place things. https://dl.dropboxusercontent.com/u/11802753/iso_floor.dmi https://dl.dropboxusercontent.com/u/11802753/iso_sprite.dmi |
This could be a BYOND bug. With those icons, I am not getting any clipping, using the default settings. Can you upload a sample project that shows the problem, with the .dmb?
|
Multiverse7 wrote:
This could be a BYOND bug. With those icons, I am not getting any clipping, using the default settings. Can you upload a sample project that shows the problem, with the .dmb? Well, I created a new project and yeah, the problem isn't present. It's probably a setting somewhere in my project that I wouldn't even honestly know where to look. This is an old project that was pre-500, so...yeeeeah. And there really isn't anything that changes a mob's layer in my code. Edit: It seems that the problem just upped and resolved itself. Now the sprite layer behaves as expected. But the problem did show up again when I set the tile's pixel_x to 9 (I've set that to 0 numerous times when trying to find the cause)... |
I was afraid that might be the case. If you ever notice something buggy in your game, then make sure you are using the very latest beta version of BYOND. If you are already using the latest version, then downgrade, to see if it was happening in a past version. If so, then there is a very good chance that a bug was introduced, and you should report it.
It's best to keep a collection of portable BYOND versions, so that you don't have to reinstall. |
Multiverse7 wrote:
I was afraid that might be the case. If you ever notice something buggy in your game, then make sure you are using the very latest beta version of BYOND. If you are already using the latest version, then downgrade, to see if it was happening in a past version. If so, then there is a very good chance that a bug was introduced, and you should report it. 1: I didn't even know you can make BYOND portable! 2: I think I've found the issue. I had to reset the bounds_width/height to default (32 x 32) as I adjusted them to allow players to fit into 1-tile gaps more easily before, and now it works as intended. |
You shouldn't be adjusting the bounds to fix graphical issues. Instead, try using pixel_z or the plane var as I suggested earlier.
|
Oh no, that was more a collision tweak when I first adjusted the bounds, totally not for the graphical issue. I just tried resetting it without your solution as an additional test because I just remembered I adjusted those.
As for your solution with the bounds set back to my previous adjustments it did work. |
There are known layering issues in the engine to be sure (which won't be resolved until I can implement a proper topological sort), but the problems you're having are more basic. Here's the core issue: You're not obeying the rules of isometric icons.
Isometric icons are built around a base diamond tile. That tile tells you the exact visual bounds you have to obey to keep the illusion intact. You can build up as high as you want above it, but below the lower edges of the diamond you'll be treading on space that belongs to nearer tiles. So when your icon is a solid block that extends way past the east and south edges of the diamond, the nearer tiles are drawn on top of it. Altering bounds also has an impact on this because the isometric layering (which, again, is imperfect--especially with pixel movement) takes the physical bounds in account when trying to determine nearness. So if your object has altered physical bounds, then the icon also has an altered base diamond that you have to obey. |
I probably should have specified that when I changed the bounds, I changed them while the project was not in Isometric mode (as the project was made for orthogonal view originally, hence the bounds adjustment); I was just doing silly tampering and checking out Isometric mode. My apologies! (but thanks for the heads up)
|
This will set the pixel_z to 1/4 of world.icon_size's width. This should be the base height for sprites on an isometric map, if you have no blank space at the bottom of the icons. Otherwise, everything will glitch through the turfs as you described.
The bottom of an icon should always be aligned to the center of another icon that you want it to appear on top of.