Join the Discord: / discord
In this episode I go over various improvements to our physics abstraction over Box2D. This involves creating a callback method for collisions and game objects on the component level. There are 4 events that you can recieve information about, including beginCollision, endCollision, preSolve, and postSolve. I also go over how to implement raycasting using Box2D, creating sensors using Box2D, and a few more physics abstractions. Lastly, I improve the editor a bit more from the last episode by adding multi-select object highlighting, and allowing the user to click and drag and only place one object in each grid square.
Code: https://github.com/codingminecraft/Ma...
0:00 Intro
1:10 Highlighting Selected Game Objects
5:00 Fixing Duplicated Objects when Click/Dragging
11:39 Fixing Key Listener Bug
13:10 Box2D Contact Listener
15:51 Aside about Box2D User Data
19:16 Box2D Contact Listener Callbacks
25:08 Raycasting in Box2D
31:54 Various Box2D Helper Functions
37:05 Brief Note on Sensors
37:30 Back to Business
43:52 In the Next Episode
---------------------------------------------------------------------
Website: https://ambrosiogabe.github.io/
Github: https://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: https://www.gameenginebook.com/
Game Physics Cookbook (Read this before the next physics book): https://www.amazon.com/Game-Physics-C...
Game Physics (Ian Millington): https://www.amazon.com/Game-Physics-E...
Game Programming Patterns (Free): https://gameprogrammingpatterns.com/
My Recommended Beginning Game Programming Books:
JavaScript Game Design: https://www.apress.com/gp/book/978143...
My Recommended Java Books:
Data Structures/Algorithms: https://www.amazon.com/Data-Structure...
LWJGL (Free, but I haven't read this thoroughly): https://lwjglgamedev.gitbooks.io/3d-g...
Смотрите видео How to Use Box2D Physics | Coding a 2D Game Engine in Java #48 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь GamesWithGabe 29 Май 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 7,634 раз и оно понравилось 92 людям.