Fireballs and Bug Fixes | Coding a 2D Game Engine in Java #57

Sdílet
Vložit
  • čas přidán 17. 05. 2024
  • Join the Discord: / discord
    In this episode I go over how to code the Fireball ability in Mario. I also go over a bug-fix for entering pipes. Before you had to hit the pipe just right to be able to travel through it, but I've fixed it so that it should work as expected. Lastly, I go over a bug-fix for the debug drawing. We were drawing too many lines before which can cause weird issues on alternative Operating Systems, but that should be resolved now.
    Code: github.com/codingminecraft/Ma...
    0:00 Intro
    0:30 The Logic of Fireball Powerup
    4:29 Generating Fireball Prefab
    7:05 Coding the Fireball Logic
    15:44 Making Fireballs Deadly
    17:38 Fixing the Pipe Entrance Bugs
    23:03 Fixing Debug Draw Buffer Overrun
    ---------------------------------------------------------------------
    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 • 19

  • @gebriish
    @gebriish Před 2 lety +3

    I just wanted to say thankyou for making suck awesome videos , it really helps. Please never stop

  • @NotGeri
    @NotGeri Před 2 lety

    Just thank you!

  • @LeeringDeer
    @LeeringDeer Před 2 lety

    these vids are so good. Gosh I wish this wasn't Java, tho

  • @percival477
    @percival477 Před 2 lety +5

    Since it looks like its going to be the end soon, have you thought about doing an episode on refactoring and moving more the engine type components out and working on a reusable api?

    • @Charlito33
      @Charlito33 Před 2 lety +2

      Working on reusable API will maybe be hard / long, but a good challenge :)
      I want to keep this engine for my games because recreate one engine every time is very long...
      So after I finished the tutorial I will transform the "Mario" engine to a "universal" engine I think
      Your comment is great idea but maybe make it reusable is not the objective :/

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety +2

      Hey Alex! I probably will be adding a few episodes on refactoring some of the code, however I don't think I'll do any serious work on separating engine code from game code. However, it shouldn't be too much work. The game code is almost entirely contained in the components for the game, so it should be a simple matter of removing all the components that were used for the mario game and creating new components for a different game :)

    • @percival477
      @percival477 Před 2 lety

      @@GamesWithGabe I think all you would have to do is change the gradle project structure to where the engine is in a lib folder and the game is an app folder. I look forward to seeing your minecraft and seeing if making a java version would be possible.

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety

      @@percival477 I think you're right :). I guess it depends on if I want to make the engine an application or a library though, because I feel like with a little more work I could make the engine the application and provide a class that you inherit from when using it, which let's you use the engine as a library as well :D. That way the end user doesn't have to worry about initializing the window and everything, but I may be overcomplicating things here haha

  • @hackersparadise6963
    @hackersparadise6963 Před 2 lety +4

    Can anyone help cloning this GitHub project because when I clone it and open it in intellij idea it askes for whether it is a gradle project or a maven project if I choose maven project it does not recognize jbox2d library and when I chose gradle it does not index other files and the output is just a window with gridlines on it. Would appreciate any help. Thankyou!

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety +2

      Hey Hacker's Paradise! I added a README with instructions on how to get the build running. The gradle build is the only one I have working right now (somebody provided the maven build file for me), but let me know if you have any trouble with the new README :) github.com/codingminecraft/MarioCZcams#coding-a-2d-game-engine-in-java

    • @hackersparadise6963
      @hackersparadise6963 Před 2 lety +1

      @@GamesWithGabe Thanks man you are great.

  • @gamingcool6190
    @gamingcool6190 Před 2 lety +2

    I have a question - Java.swing vs javafx which should i learn or use for making games in java

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety +4

      If you're just beginning, either should be fine. But if you want to make games that you'll eventually be able to ship, and you have some experience, I would definitely recommend LWJGL. It's a lower-level API that gives you direct access over the GPU :)

    • @gamingcool6190
      @gamingcool6190 Před 2 lety +2

      @@GamesWithGabe Thanks and can you tell me how much experiance i need to know to get started with LWJGL. I have finished variables,abstarct classes, polymorphism, Java swing, Lists, and a lot more. Should that be enough to start learning LWJGL

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety +2

      @@gamingcool6190 Yea sounds like you have a pretty firm foundation. I guess the ultimate test would be if you can build a terminal based hangman game in Java. If you can do that, you're more than prepared for LWJGL. I will warn you that it's a very different programming technique than CPU based rendering, so it will take awhile to understand well (but don't be discouraged if it takes awhile to understand things :) ). It took me around 1-2 years before I really started understanding LWJGL, and if you know how C++ libraries work that's definitely a bonus in understanding LWJGL :D

    • @gamingcool6190
      @gamingcool6190 Před 2 lety +3

      @@GamesWithGabe what kind of game is hangman

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

      @@gamingcool6190 Ah it's a word game kind of like a pasttime like tic-tac-toe or crosswords. My main point was that if you can build a text based game, and programming something like that doesn't seem daunting, then you should be well prepared :). The specific game doesn't matter too much