Page 1 of 1

Moving camera breaks titlemap menu

Posted: Wed Jan 23, 2019 8:51 pm
by gramps
The game menu disappears after a few seconds when using a titlemap and a Moving Camera.

Steps to reproduce:

- Set up a titlemap with a Moving Camera thing and path nodes for it.
- Set the player's view to the camera, using Thing_Activate(tid); ChangeCamera(tid, 1, 0); in an ACS script.
- Run the game, open the menu right away, wait a few seconds. Menu disappears. Resizing window will replace the menu.

After the menu disappears (or if enough time passes before you open it), hitting a key to open/close it will still make the noise, but the menu won't display.

Commenting out either Thing_Activate or ChangeCamera, the menu works fine.

Tested in 3.8 pre-238.

Will create a test map when I have more time if needed.

Re: Moving camera breaks titlemap menu

Posted: Thu Jan 24, 2019 12:10 am
by _mental_
gramps wrote:Will create a test map when I have more time if needed.
Please do.

Re: Moving camera breaks titlemap menu

Posted: Thu Jan 24, 2019 12:44 am
by gramps
Huh, this is weird... it only does this when the ceiling is a sky. When it's a flat texture, the bug doesn't happen.

This is the titlemap I was messing with, so it's probably more detailed than necessary to show the bug, sorry about that.

Try opening it in a map editor and set the ceiling to one of the wall textures or something, bug goes away.

Also, sky texture needs to be defined in mapinfo, or you get the blue and white checkered texture. Not sure if that could be relevant or if that's how it worked before. And something seems to be wrong with the way the sky renders, didn't notice this before, had the sky blacked out. But when the menu glitch happens, the sky jumps from one screwed up rendering to another. This may actually have something to do with hitting portal limit, not sure. Hard to describe, check out demo.

Re: Moving camera breaks titlemap menu

Posted: Thu Jan 24, 2019 3:32 am
by _mental_
This is a bug in OpenGL renderer. It has nothing to do with moving cameras, menus, or timemaps.

The problem was introduced with this commit.
Debug build has another indication that something went wrong, a failure of this assertion.

Re: Moving camera breaks titlemap menu

Posted: Thu Jan 24, 2019 2:31 pm
by gramps
Actually, if you uncomment that fade in the acs script, you'll notice that breaks too when the bug happens... it suddenly jumps to no fade. Might have to extend the length of that fade a bit to see it.

So maybe it affects all stuff drawn to HUD, like menu and fade.

How did you track it to that commit?

Re: Moving camera breaks titlemap menu

Posted: Thu Jan 24, 2019 2:56 pm
by _mental_
gramps wrote:How did you track it to that commit?
By doing Git bisect between g3.6.0 and g3.7.0 tags.

Re: Moving camera breaks titlemap menu

Posted: Thu Jan 24, 2019 3:51 pm
by gramps
I meant, are you doing that manually or do you have a setup for `git bisect run` to check the assert that failed or something?

Re: Moving camera breaks titlemap menu

Posted: Fri Jan 25, 2019 12:15 am
by _mental_
Manually. Some commits don’t compile or don’t run, they should be skipped or fixed by hand.

Re: Moving camera breaks titlemap menu

Posted: Sun Mar 03, 2019 6:23 am
by Graf Zahl
Fixed the cause of the glitch - but this map's portal setup is bound to cause recursion issues no matter what. This creates a huge amount of portal viewpoints to render which for me peaked at ~900 depending on the angle. Even over 4 iterations it's an exponential growth with a base of roughly 6. And 6*6*6*6 is 1296.

I'm sorry but you'll have to rework the map, this cannot work without render errors and performance degradation.