libGDX Viewports

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024
  • Learn how to implement libGDX's various viewports to improve the scalability and functionality of your game.
    Follow along with full transcript and source code here: github.com/rae...
    See an interactive demonstration of all the Viewports: raeleus.github...
    Lego Batman inspired split screen sample: github.com/Rax...
    libGDX Masks: • libGDX Masks
    libGDX Viewports Wiki: libgdx.com/wik...
    libGDX Camera Wiki: libgdx.com/wik...
    A very special thanks to Groxar, Lyze, and Peanut Panda for their contributions to this guide.
    Music by Jake Stevens: / jakery1295

Комментарии • 47

  • @evieraines1333
    @evieraines1333 Год назад

    I have been actively learning the ins and outs of libGDX for a month and still didn't understanding viewports until this video. Thank you so much!

  • @ace211
    @ace211 2 года назад +9

    you deserve way more subscribers my friend, this was an awesome viewports explanation video thank you.

    • @raeleus
      @raeleus  2 года назад +3

      I appreciate you saying that!

  • @cargoload1324
    @cargoload1324 Год назад +1

    when you say "crap" it sounds sooo good

    • @raeleus
      @raeleus  Год назад

      Oh hah hah thanks!

  • @delicious_lunch3823
    @delicious_lunch3823 2 года назад +2

    Wow! What a fantastic video! I've struggled my way through many of these concepts without truly "getting it" before. Thank you!

    • @raeleus
      @raeleus  2 года назад

      You're welcome!

  • @64ryuu9
    @64ryuu9 Год назад +1

    great video
    multiple viewport use case is just what I need

  • @LuisFrontanilla
    @LuisFrontanilla 2 года назад +2

    Yaaaaaaaaaaaaaaaaaay I can now feel myself closer than ever to using viewports :D great video :3

  • @Thetimelessone1
    @Thetimelessone1 2 года назад +1

    I feel enlightened. Thank you.

  • @Fireball-2000
    @Fireball-2000 4 месяца назад

    amazing video, i dont understand why you only have 1k subs

    • @raeleus
      @raeleus  4 месяца назад

      @@Fireball-2000 aww thanks. I appreciate it!

  • @PAttah-d1c
    @PAttah-d1c 20 дней назад

    Great tutorial, I can finally feel like I am in a 70s porn film while comprehensively learning about Viewports and their constructors.

  • @camilocastillon
    @camilocastillon 2 года назад +1

    the most sexiest viewport tutorial out there

    • @raeleus
      @raeleus  2 года назад +1

      Thank you for saying that!

  • @peanutpanda628
    @peanutpanda628 2 года назад +3

    Great video!

  • @UraniumSerenity
    @UraniumSerenity 2 года назад +1

    Awesome video, so clear and fun. Wish you many subsribers sir

  • @ik1ik1ik1
    @ik1ik1ik1 2 года назад +1

    Great video Raeleus!!

  • @diegorodriguesramos8650
    @diegorodriguesramos8650 2 года назад +1

    Another great video. Thanks!

    • @raeleus
      @raeleus  2 года назад +1

      Thank you for watching!

  • @Solidux2
    @Solidux2 2 года назад +2

    gracias por comparir. Bro

    • @raeleus
      @raeleus  2 года назад +1

      Thank you for watching.

  • @accumulator4825
    @accumulator4825 2 года назад

    Thank you very much, God bless.

  • @alectriciti
    @alectriciti Год назад

    You are a GODSEND

  • @liftbridgetown
    @liftbridgetown 4 месяца назад

    i appreciate you!

  • @0xde57
    @0xde57 Год назад +1

    7:22 where is the link for Groxar's split screen? its not in the masks description either if that's where you meant it was linked

    • @raeleus
      @raeleus  11 месяцев назад +2

      It was in the description of this video, but the link has changed: github.com/Raxorg/Alejandria/blob/master/core/src/com/epicness/alejandria/showcase/modules/viewports/AdvancedSplitScreen.java

    • @0xde57
      @0xde57 11 месяцев назад

      thank!

  • @oguzhantopaloglu9442
    @oguzhantopaloglu9442 2 года назад +1

    amazing

  • @thekaimurai4146
    @thekaimurai4146 2 года назад +1

    Sooooo… the Invincible reference at the end means I should be learning unity instead? 😂

    • @raeleus
      @raeleus  2 года назад +2

      You could be, but Unity is evil hah hah

  • @keplerfinn
    @keplerfinn Год назад

    7:00 I'm wondering how you can create such a fixed-size minimap in one of the corners of a fitViewport... So with the minimap moving accordingly to the fitViewport (so it doesn't end up inside the black borders) but without resizing together with the rest of the game.
    Can you nest or chain viewports?

    • @raeleus
      @raeleus  Год назад

      I think you can achieve that by manually doing some math when the window is resized. Some viewports have properties like gutter width that you can use.

  • @igormamedes
    @igormamedes 2 года назад

    Great video!
    on minute 3:15, why do you have to call apply on screenViewport? On resize method we call update wich already call apply, and on stage.draw() the camera is updated already

    • @raeleus
      @raeleus  2 года назад +1

      When you switch viewports, you have to manually call apply() for the one you're using. Stage does not automatically do this when you call draw(). Thanks for watching.

    • @igormamedes
      @igormamedes 2 года назад

      Right. Thanks for the answer!

  • @bicben
    @bicben Год назад

    What if I don't want to use Box2D but instead want to make my own pixel based collision detection, should I still use "sane" units?

    • @raeleus
      @raeleus  Год назад +1

      You might be able to get away with it if the world area is small. Sadly it's the nature of floating point arithmetic that the larger the number is, the more inaccurate it becomes. You hit that inaccuracy faster with pixel units. Then you'll have objects tunneling through other objects randomly.

    • @bicben
      @bicben Год назад

      @@raeleus It is assumed that the world is divided into rooms like in Metroid (for example). But I still tempted to test it with world units because in this way I probably won't need to do ceil and floor shenanigans but instead just cut off the fractional part to get the tile index.

  • @LimpBizkitReal
    @LimpBizkitReal 2 года назад

    you made a minecraft book paster for 1.4 in 2012 didnt you? i just wanna thank you its my favourite thing and it still works in 1.18

    • @raeleus
      @raeleus  2 года назад

      Wow, really? I haven't looked at that project in years. Thank you so much!

  • @albertoderio2370
    @albertoderio2370 2 года назад

    Please can you help me with my code? I don't know how to use fitviewport

    • @raeleus
      @raeleus  2 года назад

      Make sure to ask on the libGDX Discord. RUclips comments are poorly designed for code help.

  • @greguar86
    @greguar86 2 года назад +1

    goood shit