View jumps when play starts after doing a quick restore

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

View jumps when play starts after doing a quick restore

Post by BryanFRitt »

Quick restore starts with the view at one position, and once play starts happening the view will jump to a different position.
Note: START GAME IN PAUSE MODE is ON.
MAIN MENU > GAME & MENU > START GAME IN PAUSE MODE > ON
For these images the only thing done was UNPAUSE and PAUSE with spacebar.
QuickRestoredToHere.png
QuickRestoredToHere.png (56.77 KiB) Viewed 4480 times
JumpsToHereAfterPlayStarts.png
JumpsToHereAfterPlayStarts.png (52.81 KiB) Viewed 4480 times
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: View jumps when play starts after doing a quick restore

Post by Holger »

I do not understand what I have to do to reproduce the problem you described.

Could you give me a hint (or step-by-step instructions) on how to reproduce this?
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: View jumps when play starts after doing a quick restore

Post by BryanFRitt »

Holger wrote: Sun Jan 15, 2023 5:22 pm I do not understand what I have to do to reproduce the problem you described.

Could you give me a hint (or step-by-step instructions) on how to reproduce this?
Find a level that requires scrolling, and a spot roughly in the middle / center. Quick save / restore. I've seen this happen with several different levels.

Oh... Maybe it's because I changed the 'CUSTOM ARTWORK' graphics setting(s) at some point during playing with R'n'D. (or changed from/to a levelset that uses a different graphics theme) R'n'D often behaves weird if 'CUSTOM ARTWORK' graphic settings are changed without restarting R'n'D.

MAIN MENU > SETUP > CUSTOM ARTWORK > ...

After restarting R'n'D things were back to working, but after changing 'CUSTOM ARTWORK' graphic settings things were weird. A restart of R'n'D afterwards seems to fix the problems. ... Well, until next time messing with 'CUSTOM ARTWORK' graphics.

p.s. perhaps 'CUSTOM ARTWORK' could be called 'THEME' or 'THEMES' instead.
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: View jumps when play starts after doing a quick restore

Post by Holger »

OK, so apparently it has something to do with custom artwork not behaving right in some cases.

Could you please describe what I have to do to reproduce the problem, in detail? That is, we start with "vanilla R'n'D" (default setup settings, default artwork, default tutorial level set). Then we start doing things, until something happens that does not work as expected. If I can reliably and repeatedly reproduce a problem, it is often easy to fix (but not always, of course).

So, the perfect bug report works like this:

1. Describe what to do to reproduce the problem.
2. Describe what you expect to happen.
3. Describe what really happens.

To be able to reproduce the problem with such a description (bug report), it is important that there are no non-standard settings active initially from which I do not know anything, because I cannot reproduce the problem in such cases.
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: View jumps when play starts after doing a quick restore

Post by BryanFRitt »

Holger wrote: Sun Jan 15, 2023 8:42 pm start with "vanilla R'n'D" (default setup settings, default artwork, default tutorial level set)
Starting from "default artwork"
Well for this I was going through different artwork themes. Mainly the leveset's default, the default R'n'D one, jue64, jue64 mod to 3840x2160, and these three viewtopic.php?p=18071

Starting from "default tutorial level set"
For this bug I believe(aka not sure) it requires levels where level is big enough so that the view can scroll around the quick save point(both new/old themes?). If this is the case, then the bug won't show up the default tutorial level set because it's not big enough to scroll.
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: View jumps when play starts after doing a quick restore

Post by Holger »

I think this was a misunderstanding. I did not mean to reproduce the bug using only default level sets and default artwork (as you already described that the problem apparently occurs when non-default artwork is involved).

What I mean was the following:

The bug report description should assume that the starting conditions are as close as possible to "default conditions", without custom level sets, custom artwork or non-default setup settings active (which I all cannot guess if it is different form that). From this start, please describe what you did to make the problem show up.

An example of such a bug report could look like the following:

- start with default settings, default level set, default artwork set
- then change setup setting X to Y and setup setting Y to Z etc.
- then load level set ABC
- then change custom artwork to XYZ
- then do the following (description of what to do)
- then it is expected that this or that happens
- but instead something different happens (with description of what happens)

This makes it (hopefully) possible for me to reproduce the problem, just as it occurred on your system.

For the problem you described in the first post in this thread, I still do not know what exact steps are required to make this bug happen also on my system. So if you give me a step-by-step description of what to do to make it happen, I may be able to reproduce this problem, and may then be able to fix it. :)
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: View jumps when play starts after doing a quick restore

Post by BryanFRitt »

Holger wrote: Sun Jan 15, 2023 8:42 pm 1. Describe what to do to reproduce the problem.
2. Describe what you expect to happen.
3. Describe what really happens.
1.
Chose a level big enough to be able to scroll around(for both artwork themes, or just new/old?) at some point.
Get to a point where scrolling would occur from moving around. (for both themes, or just new/old?)
Do a quick save.
Change the 'CUSTOM ARTWORK' graphics theme.
Restore the quick save.

2.
The character and view to be placed where it should be, and scrolling to be smooth and not jerky. Even after changing the 'CUSTOM ARTWORK' graphics theme.

3.
The game currently does some odd scrolling for a bit after the game is quick restored, if the 'CUSTOM ARTWORK' graphics theme has been changed. It may do some jerks to next square over with each movement until things are where they should be in the view, or instantly jump several over to this spot with 1st movement(as in the original post).
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: View jumps when play starts after doing a quick restore

Post by BryanFRitt »

Maybe the two 'CUSTOM ARTWORK' themes have to be different view sizes for the bug to show up.
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: View jumps when play starts after doing a quick restore

Post by Holger »

Thanks a lot for this description! I haven't tested it yet, but I think I might have an idea what's going on there!

Especially the hint that the two custom artworks may have different playfield sizes seem to point into the right direction. The problem here may be that the "scroll offset" to put the player at the right position on the playfield (that is stored in the snapshot) simply does not match the different artwork with different playfield size, so scroll position after restoring the snapshot is wrong and gets "corrected" with the next movement, causing a "jump" to the correct position.

I'll have look and report what I found out.
BryanFRitt
Posts: 219
Joined: Mon Nov 13, 2017 4:16 pm

Re: View jumps when play starts after doing a quick restore

Post by BryanFRitt »

This time this showed up WITHOUT changing themes. This was from me starting level 89 of Rüdiger Schäfer from scratch, with a roughly new ~/.rocksndiamonds folder. Haven't restarted R'n'D yet since making this quick save. When I quick restore the game view goes to picture 1, but after moving down away 1 from that spot and back, the view goes to picture 2. What is being shown at the top and bottom of these pictures is different even though the character is at the same place.

After R'n'D restart view no longer does this jump, and looks like picture 1 on quick restore, and then after character going down one row, the view also goes one row down, but when character goes back up, the view doesn't go back up one row.

SCROLL DELAY during this was at OFF (Didn't change it after moving ~/.rocksndiamonds for testing, so I'm guessing this is default)
MAIN MENU > SETUP > GAME ENGINES > SCROLL DELAY > OFF
ViewFromRestoredPlace.png
ViewFromRestoredPlace.png (59.05 KiB) Viewed 4227 times
ViewFromRestoredPlaceMovedAndThenGoneBack.png
ViewFromRestoredPlaceMovedAndThenGoneBack.png (65.13 KiB) Viewed 4227 times
Part of me wonders if this actually two bugs(or more) with similar bug results.
Attachments
089.tape
(332 Bytes) Downloaded 106 times
Life is partially trying to strike a balance between generating new things/ideas, and making sure they are good/organized. These extremes can be said to between gibberish mess and nothing said/done.
Post Reply