I’m working with the volume control/toggle sound example, and have run
into a really strange issue.
First, I’m only interested in the volume control portion. So, I grabbed
the original volume_slider.png, volume_background.png, and
slider_button.png, customized the colors (but keeping everything else the
same for now because of what I’m about to describe).
First, if I replace the linked versions from the json file (via edit
object/delete/add the saved file) where the saved version is in the same
directory as the “game”, nothing changes. So I created a directory
called VolumeAssets and moved them all there. Now the changes work.
That’s the first mystery: why don’t the changes work when the existing
files are modified and I change the objects to use the new files?
Second issue: I can change the volume_background.png file and the
volume_slider file (making sure to add back the “button” point at the
same location, 200,5), and everything continues to work fine. However,
when I replace the slider_button with the real file, same dimensions
(again, just changing color), the slider button is no longer where it was
when I run the demo, but instead, is now slightly below the
volume_background and volume_slider (which are where they should be),
and will only move to the right (increase volume). The two attached
images show what it’s supposed to look like (where it works properly) and
how it looks when I replace the slider_button, and only increased the
I’ve gone through the code for this so many times that I’m confident that
I understand how it works … and can’t find any reason why simply
changing the image (again, the right way—using GDevelop5’s Edit Object)
would change this behavior so drastically.
Does anyone have any idea what could be going on?
Oh, and while I’m here, I experienced what might be a bug in beta88 (had
to switch back to beta83 to get back to normal): While working on this
last night, I somehow got switched back to a much earlier version of my
game. Ok, fine, I closed the game (and then, when that didn’t help,
closed gdevelop), and replaced the game.json (removing all autosaves)
with one from the previous night’s backup. Then, when I restarted
gdevelop and loaded the game again, using the previous night’s game.json,
I was still on the very old version. Switched back to beta83, repeated
all of that, and was back to the previous night’s version. I should also
add that, while I do save the game.json files at checkpoints (e.g., get
something done, save game.json to
game.26Mar-0752-GotSomethingWorking.json (with a history file providing
more detail), I save these in their own subdirectory, not in the main
game directory, so the old version should not have even been seen in the
first place. Bug? I don’t know, but I really hope it’s not intended
behavior, because before I thought to switch back to beta83, I was about
to toss the whole game (Asteroids Mk II, close to getting it done…but
then, given limits inflicted by my first cancer, “close to getting it
done” could still mean weeks or worse. When I can’t work on it because
of those limits, I dare not try, as I’ll screw it up to extremes).
This is how it looks in the original (with the objects linked to the source):
And this is what it looks like after you simply replace the linked images with the same images (except for changing the colors)…and this only works for increasing the volume:
I just can’t see how replacing a linked image with the actual image could break this. Anyone? Thanks. Btw, I get exactly the same result with both GD5 beta 83 and beta 88.