Mario Pipes & Editor Improvements | Coding a 2D Game Engine in Java #53
Vložit
- čas přidán 17. 05. 2024
- Join the Discord: / discord
In this episode I go over how to code the logic for pipes in Mario. This involves creating a component that allows a pipe to "connect" to an exit pipe, and to mark different pipes as an entrance. I also go over improvements to the editor controls to create key bindings to move objects and manipulate z-indexes quickly.
Code: github.com/codingminecraft/Ma...
0:00 Intro
0:36 Visualization of Pipe Logic
4:20 Creating Menu Items for Pipes
11:42 Coding the Pipe Logic 1
13:07 Adding getGameObjectByName Function
14:00 Coding the Pipe Logic 2
19:39 Setting the Player Position
20:49 Detecting Player Collisions with the Pipe
24:32 ImGui Text Edit for Strings
27:22 Adding More Editor Hotkeys
---------------------------------------------------------------------
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...
Congrats on 3k my guy! eagerly looking forward for whatever series you're planning next
Thanks Fudge Racoon! And I plan on releasing something explaining the next series pretty soon :)
Please don't stop making this series! There isn't many tutorials on making a game engine and this series is a rare and valuable gem!
I appreciate the comment Syllight! Once I finish going over how to code mario with the game engine I'm going to move on to coding Minecraft using OpenGL and C++. I hope people will enjoy that series as well :)
@@GamesWithGabe A tutorial on making Minecraft with C++?! It's my dream come true, and hopefully for a lot of other people too!
Great work! This tutorial series has come a long way and it is really helping!
Thanks DevNugget! I see you're also still making great videos on game development :)
@@GamesWithGabe :D
Gabe, what screen aspect ratio are you normally working with? I noticed that square sprites (16x16) appear taller than wide on my screen. I didn't notice so much working with the mario blocks, but it became really obvious when I added a couple of large images to my scene. I realized today that the problem is the camera's projection aspect didn't match my screen's aspect. Camera is set to 6 x 3, but I have a 1920/1080 screen. I fixed the issue by setting the camera's projectionHeight to projectWidth/screenAspect. (I added an easy way to retrieve the screen aspect from the window) Throwing this out there for anyone else building along as this same issue plagued my last engine and I corrected for it in all the wrong places, not realizing it was due to the projection.
can you do a 3d one?