Adding Flag Poles to Mario | Coding a 2D Game Engine in Java #56

Поделиться
HTML-код
  • Опубликовано: 4 июл 2024
  • Join the Discord: / discord
    In this episode I add one of the final core elements to the classic Mario game, the flag pole and slide animation. I add the slide animation by manually sliding Mario down until he hits the ground, and then the code makes him walk forwards until a certain point. After it finishes playing the animation it switches back to the level editor scene.
    Code: github.com/codingminecraft/Ma...
    0:00 Intro
    0:38 Adding a Button for the Flag Pole
    1:57 Creating the Flag Top Prefab
    3:42 Coding the Flag Pole Component
    5:40 Coding the Win Animation
    11:40 Testing the Changes
    ---------------------------------------------------------------------
    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...

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

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

    I just wanted to thank you for making such awesome videos , it is genuinely one of the most entertaining tutorial series on RUclips , please never stop 😁

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

      Thanks Guareesh! I'm glad that the videos are helping you out, and I don't plan on stopping any time soon haha

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

    i dont understand how you don't have more subs, i've watched a lot of your videos in the past week and everytime i learn something new, your videos are great, thanks

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

    Thanks Man. Now i know how tot Make sonic mania and port it in a physical cartridge

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

    I subscribed to this channel when I barely had 50 subscribers...

  • @sternchenq.9657
    @sternchenq.9657 2 года назад

    Nice.

  • @DavidB-ln6rd
    @DavidB-ln6rd 2 года назад

    Again really nice! I would love to see more Clean Code. Maybe a Refactoring Video would be nice.
    Inspired by you I also start coding Mario. And I think it's really hard to do it the right way. Maybe I am overthinking things, but whatever... It's fun, too :)
    Also testing is kind of hard. Since the most stuff can only be tested manually

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

      Hey David thanks for the comment! I've been considering doing a refactoring video and I might do a video on that towards the end. Coding Mario is a bit more difficult than I originally thought it would be too haha, but I'm glad you're enjoying it!

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

    would you consider doing a tutorial series for a top-down style game? like a 2d tile-based / isometric style? i have a pretty big game project i've been working on for years and sadly i'm seeing performance issues with it on lower end systems because I'm just using out of the box Java libraries (awt.graphics). so now i'm trying to figure out how to fit it in to LWJGL's implementation of OpenGL / OpenAL and it just seems hopeless. I can't believe how different the rendering is, it's so intuitive just passing in x / y / width / height for rendering, i really don't get the GPU rendering stuff you've covered in this series.
    anyway, i can tell you're really sharp and it's been cool watching some of your stuff. i wish i could've seen your stuff years ago when i got started.

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

      Hey @LordNarwhal, I don't plan on doing a top down 2D game series next. However, you should be able to use this engine to create a top down 2D game pretty easily. It has all the core components you would need: Renderer, ECS, Audio, Input handling. The only thing it's really missing is a GUI system, which should be pretty easy to make using the components already listed

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

    Hey gabe, i got my pc, and been going through many of your videos, and it seems like you heart every comment that encourages you, yes it is good to encourage and we need to do more, but a youtube heart is a valuable power that only the youtuber has, it has to go to deserving comments, ones you really think are good, encouraging is good i too like your videos, but a heart should go to the deserving

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

      Hey CGO Clan, I think that if anyone leaves an encouraging comment that is deserving of a heart :)

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

      @@GamesWithGabeImo hearting often is a good thing if not replying... It shows that you care what your audience is saying and that you take the time to read through the comments... I am sure you have a lot to read.

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

      @@asherhaun2632 Thanks Asher, that is another reason I heart the comments. It's an easy way to acknowledge that I am reading peoples comments when they don't require a response :)

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

    I hope you complete this game engine series asap

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

    How many videos are still remaining for this series please make a short series on making games using lwjgl instead of a full game engine. I am also currently following with you and it is going great

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

      Hey Fighter Club Nashik, there are probably a few more episodes left in this series. I was trying to wrap up this series by showing how you could make a game using the engine built with LWJGL. If I were to make a game with LWJGL I would need most of the same core components we built in this series: renderer, ECS, Input handler, Window handler, GUI, etc. So the process would look very similar to this series

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

    You should make one tutorial for exporting the game now like to a windows executable

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

    Cool video again.
    I wonder if you know that java has defaults for primitive objects (like boolean defaults to false) for variables.
    Also yeah if you do a refactor i think you kinda need to do a bit of research, because i think you are also partly limited by your java knowledge in this series.
    Though not to a point where you cant refactor but i think the level you would like to refactor is right now to high. But i could ofc be wrong.
    I think i could write a small book with refactor ideas, without introducing new libraries or introducing to many new concepts.

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

    I like these tutorials, but one problem I have is that the program doesnt renders to the proper size of the primary monitor the same way I could do it in C++.

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

      Could you expand on this? This might be a DPI issue and you should be able to fix this using GLFW. The libraries that I use for this game engine are the same libraries you would use in C++ so I'm not sure what else you might be thinking of :)

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

      @@GamesWithGabe Hey Gabe, I see that you did some refactoring of the code, so I will have to do that as well to see if the same thing happens. Currently, its as if my screen zoomed in on the entire app and all I can see is part of Mario, the floating blocks and part of the Goomba.

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

      @@Murderface666 That sounds like it might be an issue with the projection matrix in your camera. I did do some refactoring and I changed the engine to use world units instead of pixel units, since Box2D operates using world units like meters. So you may have to change your scales on your objects to like 0.25 to get a properly sized object