davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
97 stars 25 forks source link

Unimportant login pane presentation inconsistencies. #209

Open ghost opened 6 years ago

ghost commented 6 years ago

This issue is not at all important per se (for the time being), but because how it's possible related to the bug that made the choose deck panel lower row deck avatars hide the small clickables Starter Decks | Custom Decks | Library but only if the client was running fullscreen on a 15:10 display (here's only an issue commenting the rev that made the bug disappear). Similar bugs like that one could be expected in the future.


Look this pictures carefully. They are slightly different:

screen shot 2018-04-29 at 13 38 52 screen shot 2018-04-29 at 13 38 59

Both are the login pane in the same device, which is a 13" 16:10 laptop running AA in full screen mode. This seems not to be reproducible when running 16:9.

This is very likely related to how at the login pane py(1) yields different results depending on whether the client has ever reached the main lobby or not.

You can reach the situation in the first image by not passing through the main lobby. You get the situation in the second image when you get there having ever stepped into the main lobby.

This issue might be somewhat related to https://github.com/davewx7/citadel/issues/179.

Learning to control these inconsistencies might allow for more complexity in the login pane, if that's ever necessary.

ghost commented 5 years ago

Maybe relevant:

https://github.com/anura-engine/anura/blob/7657c9f107b68f328cb4c08668cf03aa7bfd7246/src/formula.cpp#L3980-L4004

https://github.com/anura-engine/anura/blob/7657c9f107b68f328cb4c08668cf03aa7bfd7246/src/formula.cpp#L4082-L4110

Some comments from the referenced blocks:

    [...]
    //a special callable which will throw an exception if it's actually called.
    //we use this to determine if an expression is static -- i.e. doesn't
    //depend on input, and can be reduced to its result.
    [...]
        [...]
        //we want to try to evaluate this expression, and see if it is static.
        //it is static if it never reads its input, if it doesn't call the rng,
        //and if a reference to the input itself is not stored.
        [...]
                [...]
                //this expression is static. Reduce it to its result.
                [...]