Improving the Editor | Coding a 2D Game Engine in Java #47

Sdílet
Vložit
  • čas přidán 20. 05. 2024
  • Join the Discord: / discord
    In this episode I go over the first steps in improving the editor workflow. This is mainly about implementing a multi-select box, where you can drag and select multiple objects to move and edit. However, I also go over some important utility functions like converting world coordinates to screen coordinates, and screen coordinates to world coordinates. I also abstract the key combos and mouse control logic all into one place, that way it's much easier to find and implement new logic for those controls.
    Code Diff: github.com/codingminecraft/Ma...
    Code : github.com/codingminecraft/Ma...
    0:00 Intro
    2:01 Abstracting Key Combos
    3:00 Quick Disclaimer
    3:14 Back to Business
    5:42 Key Combos for Multi-Select
    7:49 Adding Multi-Select to Properties Window
    10:49 Debugging
    11:45 Adding Read Pixels to Picking Texture
    13:54 Mouse Listener Fixes
    16:21 Screen To World/World To Screen
    23:03 Abstracting Mouse Picking
    25:42 Drawing Multi-Select Box
    29:09 Debugging
    31:08 Back to Business
    36:01 In the Next Episode
    ---------------------------------------------------------------------
    Website: ambrosiogabe.github.io/
    Github: github.com/ambrosiogabe
    Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)
    My Recommended Game Engine Books:
    Game Engine Architecture: www.gameenginebook.com/
    Game Physics Cookbook (Read this before the next physics book): www.amazon.com/Game-Physics-C...
    Game Physics (Ian Millington): www.amazon.com/Game-Physics-E...
    Game Programming Patterns (Free): gameprogrammingpatterns.com/
    My Recommended Beginning Game Programming Books:
    JavaScript Game Design: www.apress.com/gp/book/978143...
    My Recommended Java Books:
    Data Structures/Algorithms: www.amazon.com/Data-Structure...
    LWJGL (Free, but I haven't read this thoroughly): lwjglgamedev.gitbooks.io/3d-g...

Komentáře • 22

  • @DougHigashi
    @DougHigashi Před 3 lety +1

    Awesome series man! Keep it up

  • @fudgeracoon2529
    @fudgeracoon2529 Před 3 lety +1

    Almost to 3k subs man, good job !!

    • @GamesWithGabe
      @GamesWithGabe  Před 3 lety +1

      Thanks Fudge Racoon! The channel is slowly but surely growing haha

  • @buggybaka
    @buggybaka Před 3 lety

    Never gets boring!

  • @meccraft0418
    @meccraft0418 Před 3 lety

    Great video man, keep it up! :)

  • @ABHISHEKSINGH-nv1se
    @ABHISHEKSINGH-nv1se Před 3 lety +1

    I love java and lwjgl and i love your tutorials.

  • @dev_insights101
    @dev_insights101 Před 3 lety

    Wow just found you and here's the new video

  • @marcusslover
    @marcusslover Před 3 lety

    Awesome!

  • @jonfisher4728
    @jonfisher4728 Před 3 lety

    These tutorials are really great! I binge watched/coded through the first 35 over the last few days. Last fall I made an engine using lwjgl that started with the ThinMatrix tutorials and I broke off at some point and made my 2D engine with it....I really like using it but recently was thinking I may need to go for a complete overhaul as my conversion to 2D left some things to be desired and I wanted a level editor, etc...I stumbled onto your channel at exactly the right time and so happy to see you are still making these. I think you started from the ground up with all the right engine features (editor, game object/component model, batching, etc) rather than adding them as an afterthought like I always try to do. I will look forward to (hopefully) some help with how we decouple the editor and build the game for distribution.

    • @GamesWithGabe
      @GamesWithGabe  Před 3 lety

      Hey Jon, I'm glad that the tutorials are helping you out! It sounds like you're on a similar journey to what I was on too, so I have a feeling you'll be able to take these concepts much further than I do in this series. If you want some more in depth info about AAA game engines, you should check out Game Engine Architecture by Jason Gregory (you can probably find a free PDF). It's really good at filling in the gaps on those low-level engine details :)

    • @jonfisher4728
      @jonfisher4728 Před 3 lety +1

      @@GamesWithGabe Thanks Gabe, I'll check out that book.

  • @fudgeracoon2529
    @fudgeracoon2529 Před 3 lety +1

    Hey gabe, I was wondering if there are any plans to integrate a scripting language for the game engine with a scripting window UI. Maybe something like lua?

    • @GamesWithGabe
      @GamesWithGabe  Před 3 lety +1

      Hey @FudgeRacoon, I'm not sure if there's any easy way to do this using Java since most languages are written in C. I don't plan on covering that for this tutorial series, but I may have standalone series in the future that go over this using C++

  • @abrahamor4025
    @abrahamor4025 Před 3 lety

    Gabe i have an important question , how i build a jar that runs without errors using gradle ?
    I am a big fan of your work and
    your videos are very helpful, i hope you can answer me.

    • @GamesWithGabe
      @GamesWithGabe  Před 3 lety

      Hey Abraham, thanks for the comment! I'm not sure how to do that. I never really learned Gradle and if I ever build JARs I usually use IntelliJ's built-in feature to do that :)

  • @renatocesar9972
    @renatocesar9972 Před 3 lety

    I'm doing a coding framework too, and wish i could build a map editor inside of it

    • @GamesWithGabe
      @GamesWithGabe  Před 3 lety

      If you have access to ImGui it should help a lot when you set up an editor :)

    • @renatocesar9972
      @renatocesar9972 Před 3 lety

      @@GamesWithGabe but my one is in C#

  • @mwbgeometrydashpcaccount6372

    please make scratch 3.0 editor java tutorials