ID:970751
 
(See the best response by DarkCampainger.)
Code:
turf
Buildings
icon = 'Buildings.dmi'
density = 1
DummyB
_1
icon_state = "1"
New()
..()
overlays += /turf/Buildings/DummyB/_2
overlays += /turf/Buildings/DummyB/_3
overlays += /turf/Buildings/DummyB/_4

_2
icon_state = "2"
pixel_x=32
_3
icon_state = "3"
pixel_y=32

_4
icon_state = "4"
pixel_x=32
pixel_y=32


Problem description:
Well as the title suggests i am currently in the process of mapping my world.
Problem is that i thought a good way to map large scale building will be to define a main tile and then just set all the others pixel offsets (pixel_x and pixel_y ) accordingly , but for some reason some of the tiles blink when i get too close to said building. and by blink i mean vanish till im far enough... what am i doing wrong?


Or you can use the entire icon and set the buildings bound_width and bound_height using the built-in pixel movement.
No idea what you just said....
In response to Biond_coder
Instead of breaking the icon apart into seperate turfs(why are you using turfs here anyway? Much easier to use objs), you can use the entire icon. bound_width and bound_height control the collision box around the atom, so you can make one part of them dense and another part non-dense.
1 - problem is most of the icons i use are already broken down into multiple turf icons

2 - tried looking for bound width and height on the reference(F1) but couldn't find it O.o....
In response to Biond_coder
It's bound_width. If you don't have that entry, you need to update BYOND.
3 - Well that seems like something that could save up some time and effort, ill be sure to use that in the future.

4 - But as I already said this isn't really helpful because im working with icon files that are already broken down into tiles. Reconstructing them would be a major hassle and would take too long, PLUS it sounds more like a workaround for a problem that shouldnt happen(seeing as no one mentioned i made some error) rather than a solution.

The blinking could be caused by a bunch of things.

The obvious one I think would be that the player mob you are controlling has overlays on the same layer as the building's pixel offset overlays, so they interact with each other, and the player mob wins out in the "What do I draw at X,Y" decision BYOND has to make.

What it sounds like to me though, is that you're trying to make pixel offsets on overlays do something that you don't really want to use them for. Overlays are called such because they are non-solid things, "painted" on top of other solid objects. Those bits of your building (logically) I would think are solid, and should not share it's bounds with another dense object, like a player. So even if the rendering was correct, presumably your next issue would be "How do I stop players walking into bits of this building?".

To which, the above answers are very good ones. It possibly is just better in the long term if you merge up those chunked icons into bigger forms.

Stephen001 wrote:
The blinking could be caused by a bunch of things.

The obvious one I think would be that the player mob you are controlling has overlays on the same layer as the building's pixel offset overlays, so they interact with each other, and the player mob wins out in the "What do I draw at X,Y" decision BYOND has to make.

lol player has no overlays
What it sounds like to me though, is that you're trying to make pixel offsets on overlays do something that you don't really want to use them for. Overlays are called such because they are non-solid things, "painted" on top of other solid objects. Those bits of your building (logically) I would think are solid, and should not share it's bounds with another dense object, like a player. So even if the rendering was correct, presumably your next issue would be "How do I stop players walking into bits of this building?".

As much as i appreciate the help, and i really really do, thats a big fat DUH. It may be inefficient but i made it so that when the overlays are drawn every turf under said overlay would have its density changed to 1, making it impossible for players to go through roofs and such.

To which, the above answers are very good ones. It possibly is just better in the long term if you merge up those chunked icons into bigger forms.

I totally agree to that and have already taken steps to insure that in the future but as i said merging current icons would take too long.

Thanks Stephen001 for your attempted help, but my issue goes unresolved, why is this happening??

I have made an Example world to reproduce the event(not sure if to call it a glitch yet) Example World
Now there may be other things im doing wrong but lets try and focus on the blinking... :)
So should post this under 'Bug Reports' already or does anyone has a solution to offer? :(....
Best response
You need to set a layer for your overlays. As it is, they're on the same layer as the grass, so BYOND doesn't know which one to draw on top:
turf
Nature
Boulder
layer=TURF_LAYER+0.01
// ...
And here comes the One to the rescue xD...

Well it seems to fix the issue and everything works smoothly now.
But i still got some question regarding the issue:
a- "they're on the same layer as the grass, so byond does'nt know which one to draw..." it may be true but if so then why hasnt all the other overlays acted up weirdly rather than just a particular tile located to the bottom right(if anyone tried my Example World).

b- Why is it that the "blinking" occurs at specific location around the map, albeit randomly spread across the map, but in the sense of what differs between the tile i'm on to the one i just left that make this happen?

bottom line the whole thing still seems a little sketchy to me, but as i said the solution works(btw i also noticed it doesnt happen in the first place if i changed the type to obj like two days ago ;p) so im just grateful to all of you and especially you, the One... :)
In response to Biond_coder
It worked fine when using the /obj type because they default to OBJ_LAYER, which is already above TURF_LAYER.

As to why it only flickers for certain locations, I guess it's just the way the drawing code works out--most of the time the grass turf comes up first to be drawn, and then the overlay later; but every once in a while the internal data order shifts or something and it draws the overlay first and then the grass. I guess the best way to describe it is "undefined behavior".