Sprite Position Bug -- Are other creators Seeing this?
- Rosstin
- Veteran
- Posts: 368
- Joined: Mon Jan 31, 2011 5:43 pm
- Completed: Rex Rocket, Kitty Love, King's Ascent
- Projects: Road Redemption, Queen At Arms
- Organization: Aqualuft Games
- Contact:
Sprite Position Bug -- Are other creators Seeing this?
We've had this bug forever in Queen... if the player skips animations in any way, by clicking quickly, by scrolling backwards and forwards, some of the game sprites get placed in a 'default' position. IE, the character is placed in the center of the screen, on top of the bottom of the screen.
After a lot of careful testing I am 99% sure this is a bug in the Renpy engine. I wish I could isolate this bug further but it's not 100% consistent to repro. It happens frequently enough to be BAD, though.
This looks fine for a lot of games, to the extent that I think our team is one of the few teams that has noticed this bug. But I've heard about it affecting other games as well. (Even if you don't have full-body sprites like we do, it can be annoying to see your characters appearing in the center of the screen if you wanted them on the left or right.
We're releasing on Steam very soon and I really want to fix this embarrassing bug once and for all.
If anyone has a suggestion to fix this other than "cut off the characters feet" I'd really appreciate it. I really don't to ship to Steam with this bug in the game if I can possibly kill it.
After a lot of careful testing I am 99% sure this is a bug in the Renpy engine. I wish I could isolate this bug further but it's not 100% consistent to repro. It happens frequently enough to be BAD, though.
This looks fine for a lot of games, to the extent that I think our team is one of the few teams that has noticed this bug. But I've heard about it affecting other games as well. (Even if you don't have full-body sprites like we do, it can be annoying to see your characters appearing in the center of the screen if you wanted them on the left or right.
We're releasing on Steam very soon and I really want to fix this embarrassing bug once and for all.
If anyone has a suggestion to fix this other than "cut off the characters feet" I'd really appreciate it. I really don't to ship to Steam with this bug in the game if I can possibly kill it.
- PyTom
- Ren'Py Creator
- Posts: 16093
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
Are you assuming ATL runs to completion? (Or at all?) Neither is a safe assumption in the face of skipping, so each ATL block should either set up its precondition, or not assume a precondition.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- Rosstin
- Veteran
- Posts: 368
- Joined: Mon Jan 31, 2011 5:43 pm
- Completed: Rex Rocket, Kitty Love, King's Ascent
- Projects: Road Redemption, Queen At Arms
- Organization: Aqualuft Games
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
OK, I can work with that. Where can I read up on this or get some code snippets?PyTom wrote:Are you assuming ATL runs to completion? (Or at all?) Neither is a safe assumption in the face of skipping, so each ATL block should either set up its precondition, or not assume a precondition.
I need to set up a precondition in each ATL block so that my sprites don't get put into this default position when skipping?
- Rosstin
- Veteran
- Posts: 368
- Joined: Mon Jan 31, 2011 5:43 pm
- Completed: Rex Rocket, Kitty Love, King's Ascent
- Projects: Road Redemption, Queen At Arms
- Organization: Aqualuft Games
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
I have an idea.....
right now if I type....
the glitch happens occasionally during skipping or backtracking/forwardtracking.
HOWEVER, what if I used...
I think that we would not observe this glitch.
I can probably write some regex that will convert all of our scripts to this multiline solution.
right now if I type....
Code: Select all
show eileen at floor_left with move
HOWEVER, what if I used...
Code: Select all
show eileen at floor_left with move
show eileen at floor_left
I can probably write some regex that will convert all of our scripts to this multiline solution.
- Rosstin
- Veteran
- Posts: 368
- Joined: Mon Jan 31, 2011 5:43 pm
- Completed: Rex Rocket, Kitty Love, King's Ascent
- Projects: Road Redemption, Queen At Arms
- Organization: Aqualuft Games
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
I'm trying to write some regex code to make this find and replace task easier
Code: Select all
show .* with (d|p|e|m)
- PyTom
- Ren'Py Creator
- Posts: 16093
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
That helps narrow things down quite a bit. Let me think about how to fix this. Can you give me a few lines of code from right before and right after the with move?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- Rosstin
- Veteran
- Posts: 368
- Joined: Mon Jan 31, 2011 5:43 pm
- Completed: Rex Rocket, Kitty Love, King's Ascent
- Projects: Road Redemption, Queen At Arms
- Organization: Aqualuft Games
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
Laiska and I will make a simple example game to send you. Give me 20 minutes.PyTom wrote:That helps narrow things down quite a bit. Let me think about how to fix this. Can you give me a few lines of code from right before and right after the with move?
- Rosstin
- Veteran
- Posts: 368
- Joined: Mon Jan 31, 2011 5:43 pm
- Completed: Rex Rocket, Kitty Love, King's Ascent
- Projects: Road Redemption, Queen At Arms
- Organization: Aqualuft Games
- Contact:
Re: Sprite Position Bug -- Are other creators Seeing this?
I zipped up a project that demonstrates the problem for PyTom, I will post it for you guys as well.
https://drive.google.com/open?id=0B-KLE ... GpGd2tfMGM
Just, you know, don't delete it from my Google Drive or anything because I want Tom to see it.
To replicate the bug, just view the short game once, then try to skip through it the second time with CTRL. You should see something weird. Then you can also try using the mousewheel scroll backwards to also trigger it.
The relevant code is all in script.rpy.
I apologize for the file size (100mb), it would take me over an hour to carefully extract all the code referencing the game images.
https://drive.google.com/open?id=0B-KLE ... GpGd2tfMGM
Just, you know, don't delete it from my Google Drive or anything because I want Tom to see it.
To replicate the bug, just view the short game once, then try to skip through it the second time with CTRL. You should see something weird. Then you can also try using the mousewheel scroll backwards to also trigger it.
The relevant code is all in script.rpy.
I apologize for the file size (100mb), it would take me over an hour to carefully extract all the code referencing the game images.
Re: Sprite Position Bug -- Are other creators Seeing this?
*This should be fixed in Q&A section unless I missed something, outdated code was used in the project.
Who is online
Users browsing this forum: No registered users