Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Screen resolution is 1280x720 in docked mode [solved]

    Bug Reporting (FUZE 4 Nintendo Switch)
    screen setmode
    3
    11
    868
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • spikey
      spikey F last edited by spikey

      If I have my switch in the docking station and start a project the screen resolution is 1280x720 and gWidth() and gHeight() are showing this by returning 1280 and 720.
      Is that on purpose?

      Just a situation that was confusing, also you can resolved this by setMode(1920, 1080) on the very first line:
      If the game uses setMode(1920, 1080) later and does a clear(blue) for example, any update() call after a restart will draw a black box in the top left corner until setMode(1920, 1080) and clear() was called again.

      The other problem with that behaviour is, I tend to do projects with avoiding setMode() and therefore I just modify the object sizes according to gWidth() and gHeight().

      1 Reply Last reply Reply Quote 0
      • spikey
        spikey F last edited by

        To clean the screen properly (if docked) it seems to need two clear() calls. This cleans the screen:

        setMode(1920, 1080)
        clear()
        update()
        clear()
        // main loop
        // with an additional update()
        
        1 Reply Last reply Reply Quote 0
        • Spacemario
          Spacemario F last edited by

          What I do to avoid this is internally render my game at 1920x1080, then scale / draw it each frame to a 1280x720 target if the player is in handheld mode. Both "Skatey-Cat" and "Dredge" do this.

          That way, all of the math in my game to position things stays static. Plus, it has a "cool" factor in that it's how modern game engines work (their internal resolution is always different than the final output resolution, after image reconstruction, temporal anti-aliasing, etc.).

          1 Reply Last reply Reply Quote 1
          • Kat
            Kat Fuze Team last edited by

            I'm not sure I understand. If you have a program like this:

            print( gWidth(), " ", gHeight() )
            update()
            sleep(5)
            

            Does it not show "1920 1080" when you run it in docked mode?

            1 Reply Last reply Reply Quote 1
            • spikey
              spikey F last edited by spikey

              @Kat the first time it shows 1920 1080, the second time I run it, it shows 1280 720.
              😳 I hope my switch is not broken.
              After restarting FUZE it only shows 1280 720.
              Also after reboot ing the Switch.

              1 Reply Last reply Reply Quote 1
              • Kat
                Kat Fuze Team last edited by

                That's very strange. I've not heard of that happening before but I'll see if I can find a way to recreate it. I wonder what would display if you ran the example code for the docked() function. But if your Switch is still sending signal to the TV even when it's showing 1280 then I guess that's not related.

                spikey 1 Reply Last reply Reply Quote 1
                • spikey
                  spikey F @Kat last edited by

                  @kat the docked() example code from the help works: it shows Consoel is in TV mode

                  1 Reply Last reply Reply Quote 1
                  • Kat
                    Kat Fuze Team last edited by

                    Thank you, that's good to know.

                    1 Reply Last reply Reply Quote 1
                    • spikey
                      spikey F last edited by

                      1 Reply Last reply Reply Quote 0
                      • spikey
                        spikey F last edited by

                        @Kat thanks for your efforts. I got feedback on twitter, that brought me to the solution: it was a problem of the attached screen. I tried it with another screen and everything works fine, I get 1920x1080 as the default resolution. But I will think about, how to apply setMode(), if someone plays with a screen that does not support 1920x1080. It looks like one should not avoid setMode() if the games calculations are done based 1920x1080. And its also not enough to just check if docked() is true or not to switch the resolution.

                        1 Reply Last reply Reply Quote 1
                        • Kat
                          Kat Fuze Team last edited by

                          Ahh ok that makes sense. Glad you got to the bottom of it! :)

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post