Possible bug in update beta101

Yesterday I made a parallax background for some combat scenes. Since these are for more of an rpg game, not a platform, I didn’t use the usual method of zooming the camera at different rates in different layers (if I’m understanding that method correctly). The characters on the battle screen don’t move, so it wouldn’t work.

I simply made 4 backgrounds, and set them moving left across the screen at different rates.

I set a condition for each background, that if there’s only 1, to create another at the right edge of the screen. This worked fine when I went to bed last night.

I wake up this morning, excited to learn of a new update, and my beautiful parallax background is broken. It was running now with a gap between the backgrounds.

Here’s a screen shot to demonstrate what I’m talking about

At first I thought, well it’s a new release, there could be a few bugs that slipped by testing. Let’s try it on the old version (beta 100). The same bug was now manifesting here too. I made no changes to anything between last night and this morning, yet for some reason it isn’t working right. I don’t know if it’s possible, but could the updated version (beta101) made some change to the json file so that it no longer worked? I can’t think of anything else.

After spending several hours troubleshooting and trying different fixes (i tried creating the backgrounds at background.X()+background.Width(), background.X()+ScreenWidth(), I tried creating a point on the right side of the background and creating a new background at that point. I tried changing the margin that the backgrounds are deleted at, using the "delete off screen behavior. I tried editing the collision masks of the item the background runs into to activate the spawn actions and probably some other things I’m not remembering now.

Here is the original code that worked last night:

The X location is just less than the right edge to account for the scrolling rate of the background so no blank spots pop up.

Here is what I did to make it work today:

If you look at the screenshot of gameplay above, you’ll notice that the foreground (background1) no longer has a gap. This is the only background that is manually deleted and not relying on the “destroy when goes off screen” behavior.

The biggest clue was that when I edit the behavior “destroy off screen” to change the margin the backgrounds are deleted, there was no change in behavior. The gap between backgrounds remained consistent. This seems to indicate that the behavior is no longer detecting the margins and deleting the objects as intended.

I am using Ubuntu linux 18; I don’t know if this bug will manifest in other versions.

If there’s anything else I can do to help isolate and identify this bug please advise, or if it’s user error.

Thank you for all your hard work in putting in new features to make GDevelop a better program.

Impossible because nothing has change is the save file. And nothing has been updated on the sprite or tiled sprite.

And maybe you have rescale the window, the aspect was great before, and false after the resize.
GDevelop can cause hallucination, yes it’s possible haha.
We can imagine a lot of possible issues, but anyways your second method is better than the first one! An expression is better than a static value.

If you see what going on in the future i’m curious to know what was the solution.

Any time you look at 1 thing for too long it can cause hallucinations lol. I read an article yesterday recommending 25 minutes of work and 5 minutes of rest when you are making a game. This seems very wise to me.

You gave me another idea: I’ll change the condition to
If background1.X()<ScreenWidth()*-1,
that way if I ever decide to change screen resolution it’ll still work :slight_smile:

You know i told you for joke, but i’ve lost things too.
Several times I’ve done many things for hours and then as I go from one feature to another all the time I don’t necessarily pay attention to what I’ve done before and so I do anything.
Taking breaks and being focused on one thing is essential.

Here’s an interesting piece of the puzzle:

I worked in beta100 yesterday, because I wasn’t sure about the issues I was experiencing. Today, I opened my project in beta101 and was greeted with this:

I tried to load the autosave and it hangs on the load…

download the beta100 again.
Now the json file doesn’t exist… I only have the autosave.

I copy the autosave and rename it to just .json. My game is there but it’s misplaced all of the resources… I guess I’ll have to reload everything in the resource editor. That’s going to take a really long time :frowning:

[edit] I was able to find the original file in my recent folder. Copy and replaced it. Try to open it in beta100. I no longer have a beta100. It looks like beta100 has updated itself even though I definitely clicked the checkbox in preferences to not auto update.

Tried to open the file from my recent folder in beta101… all of my resources are misplaced.

Here’s screenshot of the gdevelop that just got done updating itself:

I guess my plan of action is to disconnect from the internet to prevent it from updating and see what happens…

Hoping someone can take some time to investigate this. There’s definitely something wrong here.

Right click in list in resource tab, scan image, sound, etc…
If you can send the game.json malformated and the autosave we can take a look on the difference for understand what’s going on with it.

the malformed json disappeared along with everything in my game folder except for the autosave. I’m wondering if this partly was my fault… when the beta101 was trying to load the autosave it got hung. I waited over a minute and I thought it would be stuck forever so I closed gdevelop, that was when everything disappeared.

I looked for it in my /tmp folder with no success. Tried to run search on my computer for anything with .json and don’t see it.

The best I can offer is the autosave that I renamed to .json which I’m working off of now, but I don’t know if that will be useful because it appears to be working properly.

[edit] some good news. I forgot that I like to keep spares, and I have one I made yesterday to expirement with lighting layers. It’s not completely current but I think I prefer to rewrite a little bit of code than to reload all of the resources of my project. It doesn’t help to figure out what went wrong but it will save me some time :slight_smile:

I’ve sent you a pm regarding this issue. If there’s anything else you can think of that might help let me know.

Thanks again :slight_smile: