Ghiliam
Member
Hi everyone, I'm new of the forum, I hope I'm doing this right.
So I'm working on an RPG and I wanted to add some depth in the Overworld. I started using the most simple method of checking wheter the player's Y was higher or lower of the other instances's Y, and then change the instances's depth consequently.
But this method doesn't allow me to create an overworld that is complex as I wanted it to be, for example I can't put two trees or bushes so close that they are touching, because their sprites are gonna mess up.
So I switched to the "depth = -y" method, that do exactly what I want, but I'm facing this problem: when instances go "up" they flicker / seem to continuously appear and disappear. After some tests, I found that only at certain points they disappear, but is more like the engine is not drawing them on screen, as everything those objects does still happens. So they are here, but they are not drawn, if I am understanding this correctly.
Further tests revealed that this probably is a matter of how many instances are present on that depth and at that position, as I have tried to use "depth = 5000 -y" on the player, and that way stopped to appear/disappear. Then I used the same thing on the other objects on screen, and the problem came back. After this, I changed it to "depth = 2000 - y" just for the player, and it stopped appear/disappear, while other objects that stayed in the 5000 kept to appear/disappear.
I want to highlight the fact that this occur ONLY when objects are moving up/north/whatever you call the upper part of the screen. Moving in every other directions works perfectly.
So is there a way to make this thing working? Am I doing something wrong?
So I'm working on an RPG and I wanted to add some depth in the Overworld. I started using the most simple method of checking wheter the player's Y was higher or lower of the other instances's Y, and then change the instances's depth consequently.
But this method doesn't allow me to create an overworld that is complex as I wanted it to be, for example I can't put two trees or bushes so close that they are touching, because their sprites are gonna mess up.
So I switched to the "depth = -y" method, that do exactly what I want, but I'm facing this problem: when instances go "up" they flicker / seem to continuously appear and disappear. After some tests, I found that only at certain points they disappear, but is more like the engine is not drawing them on screen, as everything those objects does still happens. So they are here, but they are not drawn, if I am understanding this correctly.
Further tests revealed that this probably is a matter of how many instances are present on that depth and at that position, as I have tried to use "depth = 5000 -y" on the player, and that way stopped to appear/disappear. Then I used the same thing on the other objects on screen, and the problem came back. After this, I changed it to "depth = 2000 - y" just for the player, and it stopped appear/disappear, while other objects that stayed in the 5000 kept to appear/disappear.
I want to highlight the fact that this occur ONLY when objects are moving up/north/whatever you call the upper part of the screen. Moving in every other directions works perfectly.
So is there a way to make this thing working? Am I doing something wrong?