Navigation

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

    Split screen?

    Advanced
    6
    16
    1622
    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.
    • Martin
      Martin Fuze Team last edited by

      Absolutely - create 2 images, each half the size of the screen either vertical or horizontal and use each of these as draw targets.

      So, in pseudo-code...

      leftHalf = createImage(gWidth() / 2, gHeight(), false, image_rgb)
      rightHalf = createImage(gWidth() / 2, gHeight(), false, image_rgb)
      
      do loop
          setDrawTarget(leftHalf)
          // Do all your usual stuff, including clear and update
          setDrawTarget(rightHalf)
          // Same again
          setDrawTarget(frameBuffer)
          clear()
          drawImage(leftHalf, x, y, etc.)
          drawImage(rightHalf, x, y, etc.)
          update()
      repeat
      

      That's the basic principal - assuming I understood you correctly

      1 Reply Last reply Reply Quote 7
      • LinkCraft
        LinkCraft F last edited by

        Cool thanks that will be fun to play around with

        1 Reply Last reply Reply Quote 0
        • Zypher
          Zypher last edited by

          Holy christ my game can have multiplayer now thank you haha

          1 Reply Last reply Reply Quote 4
          • LinkCraft
            LinkCraft F last edited by

            Zypher is happy lol

            Zypher 1 Reply Last reply Reply Quote 4
            • Zypher
              Zypher @LinkCraft last edited by

              @LinkCraft02 hey man do your 3d objects unload when the origin of the objects are behind the camera? Try the demo for 3d objects camera movement that you find in the help menu, and you'll see that the floor can unload if you look at it while the box in the air is behind you. This screws me up so bad and idk how to fix it.

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

                Yes they disappear and it ruined my game

                1 Reply Last reply Reply Quote 0
                • M
                  Maxwello F last edited by Maxwello

                  Can't you make the origin the last part of the object to go offscreen?

                  1 Reply Last reply Reply Quote 0
                  • Zypher
                    Zypher last edited by

                    @Maxwello yeah. When it does the whole object disappears. I cant find a fix.

                    1 Reply Last reply Reply Quote 0
                    • Dave
                      Dave Fuze Team last edited by

                      You've just confirmed a bug! The objects should unload when the entire object goes off screen, not the origin. I'll report this now and this will be fixed!

                      1 Reply Last reply Reply Quote 3
                      • Spacemario
                        Spacemario F last edited by

                        Resurrecting an old thread: is it possible to have separate sprite cameras per player?

                        The help for "setSpriteCamera() implies that it's possible by stating that this function moves the camera position "for all sprites", but it doesn't take a sprite as an argument: https://fuzearena.com/help/view/setSpriteCamera

                        I'm wondering if there is an undocumented way to use this. Thanks in advance!

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

                          So sprite camera goes off of x and y positions so all you need to do is setspritecamera(player.x, player.y) for all the different sprites you want cameras on. I use this in Missiles dogfight.

                          Spacemario 2 Replies Last reply Reply Quote 1
                          • Spacemario
                            Spacemario F @LinkCraft last edited by

                            @LinkCraft Thanks for the quick reply! I'm not 100% sure I follow, but I think it'll make sense if I tinker with it based on what you just said.

                            1 Reply Last reply Reply Quote 0
                            • Spacemario
                              Spacemario F @LinkCraft last edited by

                              @LinkCraft I got it, your explanation got me unstuck! I'm now able to dynamically draw up to four separate buffers, and render them to the backbuffer in the correct locations.

                              If there is one player, the view takes up the whole screen; two players and they each get half; three players, third person gets part of the bottom (centered); fourth person, everyone gets a quarter of the screen.

                              And the camera follows each player independently! Like you said, you just call "setSpriteCamera()" when rendering each player's buffer.

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

                                I probably could have explained it better but I’m glad you got it.

                                Spacemario 1 Reply Last reply Reply Quote 0
                                • Spacemario
                                  Spacemario F @LinkCraft last edited by

                                  @LinkCraft You did enough :) Now I'm messing with my good ole friends "sin" and "cos", trying to get player movement to work after I invoke "setSpriteCameraRotation"... but that can be another post some other day, if I can't figure it out.

                                  I originally wanted to use a mix of 2D and 3D for this, with polygonal walls and sprite actors-- but I gave up at the matrix math "convert 3D to 2D coordinates part".

                                  Enough rambling :D

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