Improving the Editor | Coding a 2D Game Engine in Java #47
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...
Awesome series man! Keep it up
Thanks Doug!
Almost to 3k subs man, good job !!
Thanks Fudge Racoon! The channel is slowly but surely growing haha
Never gets boring!
Great video man, keep it up! :)
Thanks MEC Craft!
I love java and lwjgl and i love your tutorials.
Thanks Abishek :)
Wow just found you and here's the new video
Awesome!
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.
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 :)
@@GamesWithGabe Thanks Gabe, I'll check out that book.
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?
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++
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.
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 :)
I'm doing a coding framework too, and wish i could build a map editor inside of it
If you have access to ImGui it should help a lot when you set up an editor :)
@@GamesWithGabe but my one is in C#
please make scratch 3.0 editor java tutorials