Adding Physics to my C++ Minecraft Clone!

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • In this video, I added collisions and forces to my C++ OpenGL Minecraft Clone!
    Playlist:
    • Minecraft clone
    Source Code:
    github.com/mee...
    Join my Discord:
    / discord
    Check out My Game Midnight Arrow:
    store.steampow...
    Join this channel if you want to support me 😻:
    / @lowlevelgamedev9330
    Music:
    Evan King - Atomic Fire
    / contextsensitive
    contextsensiti...
    Minecraft soundtrack: C418 - Living Mice
    Minecraft soundtrack: C418 - Aria Math
    Minecraft soundtrack: C418 - Moog City

Komentáře • 83

  • @marco-gp2sz
    @marco-gp2sz Před 2 měsíci +10

    mom: you can't buy minecraft
    the kid:

  • @riufq
    @riufq Před 3 měsíci +49

    You got 15 missed call from Mojang

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 3 měsíci +8

      I'm a busy man 😌👉💪😤

    • @ChronoNewton
      @ChronoNewton Před 3 měsíci +4

      Mojang: Why isnt he responding? I just wanna have him in my team🤔

  • @satyamraj2476
    @satyamraj2476 Před 3 měsíci +24

    4:45 Most normal cpp dev btw nice video 😊

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 3 měsíci +2

      yes 😂😂😂😂

    • @riufq
      @riufq Před 3 měsíci

      Since when did you start learning c++?​@@lowlevelgamedev9330

    • @riufq
      @riufq Před 3 měsíci

      Btw @satyaamraj
      Your pfp, same as my banner picture. What a coincidence.

    • @satyamraj2476
      @satyamraj2476 Před 3 měsíci +1

      @@riufq yoo really cool. I like coincidence 😉

    • @riufq
      @riufq Před 3 měsíci

      @@lowlevelgamedev9330 may i know, since when did you start to learn c++

  • @Skeffles
    @Skeffles Před 2 měsíci +2

    Brilliant to see what you've faced with collisions. I've had some similar issues too.
    Also very cool seeing all the pigs flying everywhere. Great stuff!

  • @stolyartoad8640
    @stolyartoad8640 Před 3 měsíci +11

    Yo wtf is that pig physics?!

  • @Maxjoker98
    @Maxjoker98 Před měsícem

    I think the clipping through complete blocks is mostly a non-issue: Since the physics movement should be calculated per physics tick using the delta-time, the player would have to move more than a single block in a single physics tick(max_vel = 1/physics_dt), so for a physics tick rate of 30 updates/s the player would need to travel at least 30 units/s(assuming 1block = 1unit = 1meter, that's 108km/h or 67 mph).

  • @yds6268
    @yds6268 Před 3 měsíci +6

    At this point I lost all hope of ever making something comparable, but at least I can compile your game and play Minecraft without a Microsoft account 😂

    • @samlogamer2804
      @samlogamer2804 Před 3 měsíci

      Where is the game? I want to do that too!

    • @yds6268
      @yds6268 Před 3 měsíci

      @@samlogamer2804 link to the source code in the description

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 3 měsíci +3

      😂😂 ok than I will keep updating it untill you will get free minecraft basically

  • @DidIJustDoThat
    @DidIJustDoThat Před 3 měsíci +8

    You are smarter than me by a mile. And I am still here not understanding basic Opengl with its buffers

  • @Godot-Game-Dev
    @Godot-Game-Dev Před 3 měsíci +2

    Very nice! Its crazy that you made better physics than minecraft (I think minecraft only has universal friction so every block is the same?) in a fairly short amount of time

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 3 měsíci

      They also have different friction per block. Also I don't think my physics is better but still thanks 💪🙏

    • @Godot-Game-Dev
      @Godot-Game-Dev Před 3 měsíci

      @@lowlevelgamedev9330 You got this tho, your game is going to be way better than minecraft when your finished!

  • @salvadorsanchez5644
    @salvadorsanchez5644 Před měsícem +1

    I love that it is the optimized version of Minecraft. I like the game because of the redstone. Is there a possibility that mechanisms can be made?

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před měsícem +1

      yo I'd love to add it, but I'll see, its very difficult with the multi player aspect but I'll try 💪💪

  • @kQqRoElsOw
    @kQqRoElsOw Před 3 měsíci +2

    very nice work, crazy how this has 800 views

  • @ROMERO2280
    @ROMERO2280 Před 2 měsíci

    I hope that I will get to the point where I will develop my own C/C++ SDK for developing games (Base Level Minimalist Game Engine) for a wide range of games, for Windows, Linux, Android and Playstation.
    The point of making my own Engine - I have my own Big plans to develop a Big and Cool GTA game, and in order for this project to be realized, I will need the appropriate tool.

  • @cyanuranus6456
    @cyanuranus6456 Před 2 měsíci

    The Only Thing I Know About GameDev is Just Entity-Component-System
    But I Don't Know How to Do NPC Attacking The Player
    As You Playing The Game is The "Protagonist" and The NPC Attacking You is "Enemy" which is Antagonist

  • @jamesbland5082
    @jamesbland5082 Před 2 měsíci

    Would love to see shaders next just subbed

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci

      yes, I will do shaders after the gameplay, but I also hava an older video on shaders in the series if you can't wait for the new one 💪

  • @MerlinSpace
    @MerlinSpace Před 3 měsíci +2

    Cool now do physics for blocks and you‘ll be rich

    • @Memose2
      @Memose2 Před 3 měsíci +2

      I am voting for this one

  • @thegavinjackson
    @thegavinjackson Před 3 měsíci +5

    1:37 So what im hearing is there are parallel unuverses in the clone?

    • @prellit
      @prellit Před 2 měsíci

      atleast no invisible walls

    • @nicholas_obert
      @nicholas_obert Před 18 dny +1

      That's the Wave-Steve duality. Sometimes Steve behaves like a particle, sometimes Steve behaves like a wave

  • @RagBrokeHisThumb
    @RagBrokeHisThumb Před 3 měsíci +1

    Please add the hand sway and fov effects I’m dying bro

  • @pete-i7p
    @pete-i7p Před 2 měsíci

    Man you're out of this world

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci +2

      thx bro 💪💪

    • @pete-i7p
      @pete-i7p Před 2 měsíci

      @lowlevelgamedev9330 Do you think it's possible to make a M&B Warband type game in an engine like yours? (Of course not quite the same size but like a clone-demo)

  • @simonmaracine4721
    @simonmaracine4721 Před 2 měsíci

    Îmi place ceea ce faci.
    M-aș putea uita cândva la cod. Poate pot da o mână de ajutor, dar nu promit nimic. Am ceva experiență.

  • @arflopped
    @arflopped Před 2 měsíci

    Wow

  • @cursedspaceMC
    @cursedspaceMC Před 3 měsíci

    You deserve more views

  • @efeloteishe4675
    @efeloteishe4675 Před 2 měsíci

    Use Bullet physics or Jolt physics.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci

      yeah that can't happen, bullet is a big library, and I need some simple simulations. I think it would slow down the server masivly

  • @cvabds
    @cvabds Před 2 měsíci

    I doubt you can add a finite and volumetric water

  • @ben_the_potato
    @ben_the_potato Před 2 měsíci

    Is this the same way that Mario 64 calculates physics

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci

      idk but probably, many games do this

    • @PlushPilla
      @PlushPilla Před 2 měsíci

      There is a sm64 rom hack dev called Kaze Emanuar that made a video in how he fixed collisions with walls in sm64. Check out "The Problems with Walls in Super 64" for more info

    • @PlushPilla
      @PlushPilla Před 2 měsíci

      @@lowlevelgamedev9330 how about if you use a raycast instead of quatersteps?

  • @DiamondWolfX
    @DiamondWolfX Před 2 měsíci

    Couldn't you just check every block boundary between start and end, and if there's an applicable block, then resolve collision with that block?

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci

      well yes but you need to do that in a specific way, one axe at a time, otherwise it won't work properly

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci

      czcams.com/video/8JJ-4JgR7Dg/video.html

  • @yytffs
    @yytffs Před 2 měsíci

    I’ve been programming mostly web and mobile apps for years now. I want to get into low level game development. Do you have any resources to learn Physics and Maths? I suck at both of them. I am like a toddler just starting to learn. I am average at Math though although still at beginner level. Could you guide me to the correct resources? I want to learn Physics and Maths from scratch. Thank you and I love what you’re doing. It inspires me to creating something like it on my own.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci

      Yess, I have a few resources on my discord community, on dedicated channels for resources. There you will find some good stuff. Also if you need something more specific you can also tag me there 💪💪

    • @yytffs
      @yytffs Před 2 měsíci

      @@lowlevelgamedev9330 Thank you.

  • @Blutoof_
    @Blutoof_ Před měsícem +1

    How do I install it?

  • @ziphy_6471
    @ziphy_6471 Před 3 měsíci +2

    Unrelated to the video on a massive level but,
    How do I set up OpenGL in Vim

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 3 měsíci

      you can for example use my cmake templates

    • @ziphy_6471
      @ziphy_6471 Před 3 měsíci

      @@lowlevelgamedev9330 Thank you, I will come back if I fuck up again inevitably

    • @ziphy_6471
      @ziphy_6471 Před 3 měsíci

      @@lowlevelgamedev9330 Ok, so do you have to use vs to set up the templates and things or can you do the whole setup just in vim or cmake?

    • @SketchyScribe
      @SketchyScribe Před 3 měsíci

      ​​@@ziphy_6471you can use cmake from the terminal if you don't want to use VS, I havent looked at the template in a bit, but essentially you can open the terminal in the root folder, and run "cmake -S -B ". If you're not planning on using the MSVC compiler, cmake can also generate other build files, for example if you use mingw gcc, you would add "-G "MinGW Makefiles" to the previous command, or you can look up the cmake generators documentation to see others

    • @rnts08
      @rnts08 Před 2 měsíci

      Vim is just an editor, like notepad but useful. You're asking about the build pipe?

  • @kedersiz8600
    @kedersiz8600 Před 3 měsíci

    Yoooooo pretty early, gonna watch now

  • @gugomajo4161
    @gugomajo4161 Před 2 měsíci

    cool video

  • @_xerxes_5425
    @_xerxes_5425 Před 3 měsíci +2

    How do you synchronize physics between clients?

    • @kedersiz8600
      @kedersiz8600 Před 3 měsíci

      If I had to guess server to client packets on new positions

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 3 měsíci +1

      well the server will just update the clients with the correct position. The client will also simulate physics tho but it will corect itself when it gets messages from the server

  • @rch5395
    @rch5395 Před 2 měsíci

    Bro uses visual studio.

  • @swapansaha2368
    @swapansaha2368 Před 3 měsíci +2

    Can you use Vulkan?

  • @marks_shot
    @marks_shot Před 3 měsíci +2

    cmuk

  • @sadge6430
    @sadge6430 Před 3 měsíci

    cvb

  • @cvabds
    @cvabds Před 2 měsíci

    Infinite game sucks, the awesome thing would be to pre generate the world and lore before like dwarf fortress. In that way you could have random and limited resources in the world

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci +1

      I actually want to add dwarf fortreses idk how you read my mind but I'll make it procedural. It's not difficult it's just a lot of work 😭

    • @cvabds
      @cvabds Před 2 měsíci

      @@lowlevelgamedev9330 Minecraft was supposed to be somewhat inspired by dwarf fortress but the dream died when notch rode the hype like a madman. Please try to make finite water and "realistic ""blocky"" fluid dynamics" 🥺 I hate the lack of realism in survival Minecraft.

  • @evilwizardtherapist
    @evilwizardtherapist Před 2 měsíci

    I'm late. 🙁

  • @exotic42069
    @exotic42069 Před 2 měsíci

    there is already a minecraft bedrock which is written in c++ so why reinvent the wheel

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Před 2 měsíci +3

      I get this question all the time, first of all I think everyone hates bedrock but how am I supposed to learn this if not by making it myself? All the math problems in your math book have already been solved, why do you do your homework?

    • @exotic42069
      @exotic42069 Před 2 měsíci

      @@lowlevelgamedev9330 the answer is very simple, i dont

  • @epicstar86
    @epicstar86 Před 2 měsíci

    reaI