Powerups | Coding a 2D Game Engine in Java #51

Sdílet
Vložit
  • čas přidán 17. 05. 2024
  • Join the Discord: / discord
    In this episode I go over how to code powerups into our Mario game. I talk about how to create the Mushroom and Fire powerups and how to code the Mushroom AI. I also go over how to use Box2D's disabling collision feature to disable specific collisions.
    Code: github.com/codingminecraft/Ma...
    0:00 Intro
    0:42 Fixing Rendering Texture Issue
    3:22 Spawning Mushrooms
    7:43 Creating Mushrooom AI
    11:29 Queuing Game Objects Added at Runtime
    13:42 Fixing Rigidbody Add Velocity Bug
    14:19 Making the Mushroom "Smart"
    15:42 Disabling Collisions with Player
    17:41 Powering Up the Player
    21:15 Spawning Flower Powerups
    25:10 Thoughts?
    ---------------------------------------------------------------------
    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 • 7

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

    Hi Gabe, great video! I have 2 questions for you.
    1) Do you know how to draw dashed lines using OpenGL? I need it for graphical implementations in my Game Engine.
    2) At the end of the series will you show how to export games created with the Game Engine?
    Thanks for the videos you make for us (The yellow cursor looks great!)

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

      Hey thanks MEC Craft! I found this Stack Overflow question for dashed lines (stackoverflow.com/questions/5321226/help-to-draw-a-dashed-line-in-opengl) it uses a really old version of OpenGL, but I believe you might be able to apply those concepts to modern OpenGL. You could also implement it yourself where you draw a bunch of small quads that go in the direction of the line (maybe I'll do a small mini-series dedicated to drawing lines one day). And at the end of this series I didn't plan on exporting the game, however I might give a broad overview on how I exported my game so that you could replicate it :)

  • @jorgengullstrand5988
    @jorgengullstrand5988 Před 2 lety

    Can you do a video on how to make a particle system and have a emitter as a component that you can choose to be on all the time or to trigger? I’ve been playing around with it but can’t get it to work

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety

      Hey Jörgen, that sounds like a cool video to do one day. I haven't done particle systems yet, but I plan on implementing one sometime in the future. Once I get around to it, I'll definitely make a video on it :)

  • @LioncatDevStudio
    @LioncatDevStudio Před 2 lety

    Why doesn't obs catch yours?
    I think there might be some wrong settings somewhere
    Coz mine one shows as far as I know

    • @LioncatDevStudio
      @LioncatDevStudio Před 2 lety

      Actually lemme check now

    • @GamesWithGabe
      @GamesWithGabe  Před 2 lety

      Hey Lioncat, it catches my mouse in regular windows, but when I move my mouse cursor over a text edit box it disappears for some reason. If you find something you should definitely let me know though, or you can just ping me in the Discord :)