Sprite Position Bug -- Are other creators Seeing this?

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
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?

#1 Post by Rosstin »

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.

Image
Image

User avatar
78909087
Veteran
Posts: 277
Joined: Sat Aug 16, 2014 2:33 pm
Completed: Dungeons and Don't Do It, Wake Up
Projects: Lethe
IRC Nick: Pacermist
Contact:

Re: Sprite Position Bug -- Are other creators Seeing this?

#2 Post by 78909087 »

Bumped.

As posted in the other topic. I have also experienced this bug, even in completed games.
I am not friends with the sun.
Image

User avatar
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?

#3 Post by PyTom »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
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?

#4 Post by Rosstin »

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.
OK, I can work with that. Where can I read up on this or get some code snippets?

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?
Image

User avatar
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?

#5 Post by Rosstin »

I have an idea.....

right now if I type....

Code: Select all

show eileen at floor_left with move
the glitch happens occasionally during skipping or backtracking/forwardtracking.

HOWEVER, what if I used...

Code: Select all

show eileen at floor_left with move
show eileen at floor_left
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.
Image

User avatar
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?

#6 Post by Rosstin »

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)
Image

User avatar
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?

#7 Post by PyTom »

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
Software > Drama • https://www.patreon.com/renpytom

User avatar
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?

#8 Post by Rosstin »

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?
Laiska and I will make a simple example game to send you. Give me 20 minutes.
Image

User avatar
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?

#9 Post by Rosstin »

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.
Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Sprite Position Bug -- Are other creators Seeing this?

#10 Post by xela »

*This should be fixed in Q&A section unless I missed something, outdated code was used in the project.
Like what we're doing? Support us at:
Image

Post Reply

Who is online

Users browsing this forum: No registered users