I added Entities to my Minecraft Clone 🐽!

Поділитися
Вставка
  • Опубліковано 10 чер 2024
  • In this video, I will add entities to my C++ Minecraft Clone!
    #cpp #minecraft #opengl #gamedev #programming
    Join my Discord 🕹️😎:
    / discord
    Check out my game Midnight Arrow:
    store.steampowered.com/app/23...
    Join this channel if you want to support me 😻:
    / @lowlevelgamedev9330
    Playlist 🥵:
    • Minecraft clone
    Check out Tesera:
    / @tesera_game
    tesera.io
    Repo:
    github.com/meemknight/ourCraft
    Music:
    Evan King - Virtually Impossible
    / contextsensitive
    contextsensitive.bandcamp.com/
    Minecraft soundtrack: C418 - Aria Math
    Bring Me The Horizon - Can You Feel My Heart
    Minecraft soundtrack: C418 - Minecraft
  • Розваги

КОМЕНТАРІ • 53

  • @scasz
    @scasz Місяць тому +2

    0:01 the video in the middle seems to be made by a really cool dude. Also really interesting video

  • @beepymemes
    @beepymemes Місяць тому +4

    coding an entire 3d multiplayer game in c++ without an engine requires insane skill

  • @nylvon
    @nylvon Місяць тому +16

    hey that compile time thingy reminds me of someone who also likes to overcomplicate his life with compile time thingies ;^ )

  • @Momossim
    @Momossim Місяць тому +23

    3:29 creeper ?

    • @flipfloppy1
      @flipfloppy1 Місяць тому +7

      aw man

    • @AlexanderDumb
      @AlexanderDumb Місяць тому +9

      That's actually how the creeper was originally made. Notch accidentally messed up the pig model which gave him the inspiration for the creeper

  • @Ddos2212
    @Ddos2212 Місяць тому +12

    "It took 1 entire week" dude :D. 1 week is nothing in software development, don't beat yourself up if something takes more time than expected. I had to invest a month in order to get close to a solution for a hard problem I had with a project.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому +6

      totally agreed but I'm lazy 😭😂💀

    • @knitnatsnokprogramming
      @knitnatsnokprogramming Місяць тому

      @@lowlevelgamedev9330 I mean, which programmer is not lazy 🤷‍♂️

    • @knitnatsnokprogramming
      @knitnatsnokprogramming Місяць тому +4

      @@lowlevelgamedev9330I mean, which programmer is not lazy? 🤷‍♂️

    • @TopatTom
      @TopatTom Місяць тому

      @@knitnatsnokprogramming true true.
      Dani,

    • @ckpioo
      @ckpioo 29 днів тому

      ​@@lowlevelgamedev9330 that's me with my current project with a database system I'm doing entirely from scratch, some days I'm lazy some days I'm productive as hell 😂😂

  • @ravenmillieweikel3847
    @ravenmillieweikel3847 Місяць тому +1

    One correction: In minecraft the limb animation is done with sin waves, not triangle waves.

  • @coyo_t
    @coyo_t Місяць тому +1

    i saw one of your previous videos and forgot to comment. i think the "undo system" for client side prediction and resolution of terrain updates is very clever
    i do hope you handle "bulk updates" with it carefully though (IE chain reactions that occur, such as a redstone wire updating other wires around it, or a sugarcane breaking all the ones above it, ect)

  • @bartekburmistrz8679
    @bartekburmistrz8679 Місяць тому

    6:07 The compiler actually just executes the function and stores the result as a variable, if you check disasembly you can see that there is no function call (if possible)

  • @justaway_of_the_samurai
    @justaway_of_the_samurai Місяць тому +1

    All that compile-time stuff will make compilation times longer.
    It also means that you will be more restricted to programming the game in C++ rather than using a scripting language layer at a later point.
    The memory management concern can be solved by using shared_ptr's, which are implemented in STD.
    The compile-time solution will also make it more difficult to plug-in alternate implementations of an interface class for certain behaviors, because that will require multiple definitions of the "outer" class to support other types, or have the component classes be all-inclusive instead of using different types.
    So for example, if you wanted to make one pig smarter than normal pigs, you could have a component for "AI" which provides all the abstract pathfinding logic. The smarter pig would have the "SmartPigAI" component which inherits from "PigAI".
    If you store the 2 "PigAI" components as standalone instances with shared_ptr's on the "Pig" class, you can swap out the instances at runtime to get different behaviors, as compared to removing the original pig entirely and replacing it with a "SmartPig" class instance.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому +1

      I'm too lazy to answer in detail in text to all of this so I will say that it compiles in like 2 secconds rn (I use glm that is already more heavily templated than what I will ever do) and adding a scripting language means that you need to make a binding for it, adding all sorts of problems, with no benefit except compile times, that already aren't a problem so

    • @justaway_of_the_samurai
      @justaway_of_the_samurai Місяць тому

      @@lowlevelgamedev9330 It's your game engine, so you are the boss.
      But inheritance is a design pattern that gets annoyingly complicated pretty quickly, which is why a lot of modern developers try to avoid it.

  • @Pedro-jj7gp
    @Pedro-jj7gp Місяць тому

    Could you make a video on OOP vs DOD and how you usually write code regarding this?

  • @vatyunga
    @vatyunga Місяць тому +4

    7:53 why not? Minecraft does that. You can limit pathfinding operations count per frame.

    • @depralexcrimson
      @depralexcrimson Місяць тому

      it would simply be more efficient to take all entities in a radius of the player, then calculate the fastest way to a player ONCE per x frames rather than do that every single time, maybe even limit that to hostile entities only, maybe the youtuber should also give a mob type to the entities, hostile, neutral, passive etc sort of like minecraft :)
      you could also interpolate those path findings so they look more linear rather than just giving it the new path (re-calculate) so then - a zombie following you to a block you were previously at then getting the update that you are actually on 5 x blocks away right when he's about to get to your old location, this way it looks more smooth and it'd be way more optimized than what you suggested, but then you have also other problems like mobs having different verticalities and so on, could always limit that as well in the y difference player vs mob, obviously not as easy when you actually go to implement it.
      i think minecraft did that pathfinding operation per frame solution because they're single-threaded, and on top of that they never thought about interpolating pathfindings so it'd look less weird if they dit pathfinding less often, so they just run it consistently every now and then per each entity but not all at once (because again we're single-threaded), simply doing it every 1/2 of total fps, should result in a very smooth experience regardless of what fps you have, and it'll always scale linearly with your pc's performance.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому +1

      oh interesting, did't know that but why yes since I found a better way to do it 💪

    • @depralexcrimson
      @depralexcrimson Місяць тому

      @@lowlevelgamedev9330 isopaque and istransparent is also not ideal, do bit masking instead, istransparent takes too much to execute, isopaque will also become more annoying down the road when you have more stuff to care about.

    • @vatyunga
      @vatyunga 8 днів тому

      @@depralexcrimson unless they have different goals :) then his solution simply doesn't work.

  • @ahmedkj9923
    @ahmedkj9923 Місяць тому +1

    this addition alone made your game the best minecraft clone for me, yes even better than minetest

  • @curryleavesbydhanya
    @curryleavesbydhanya Місяць тому +1

    Will you do proper pathfinding for zombies (A*) because thats what modern Minecraft does. Old versions just made zombies walk in the direction of the player.

  • @Chulama-qk9fo
    @Chulama-qk9fo Місяць тому

    Yo if you make a survival mode I have an idea:
    Retexture the bugged pig model so that it's a rock golem. It lies dormant until you alert it (how is up to you), and it'll wake up and attack you, doing a massive amount of damage and only becoming dormant again if you die or get far away. It also has a chance to turn a nearby rock into a golem.

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому

      I was actually thinking of adding golems but ther's a lot of work unti than

  • @mlodywest
    @mlodywest Місяць тому

    nice

  • @evilwizardtherapist
    @evilwizardtherapist Місяць тому +2

    Hey. 🧙🏾‍♂️

  • @Simple_OG
    @Simple_OG Місяць тому

    You are my idol. I want to build games like you.

    • @nylvon
      @nylvon Місяць тому

      start doing it then, lad.
      you will never do anything if you do not start.

  • @darkfllame
    @darkfllame Місяць тому +1

    gg to whoever found steam key before me

  • @skyde72
    @skyde72 Місяць тому

    LE COUCHON!!!

  • @knitnatsnokprogramming
    @knitnatsnokprogramming Місяць тому

    Pathfinding is not that hard. I think you could somehow use A* or smth like that and somehow make it work 3D

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому +1

      yes, it actually will be even easier than a* probably

    • @vatyunga
      @vatyunga Місяць тому

      A* works the same way in 2d, 3d or even 4d. Doesn't require any special work. For zombies every solid block that has 2 air block above should be considered walkable. It's easy to get valid neighbours and find path.

    • @knitnatsnokprogramming
      @knitnatsnokprogramming Місяць тому

      @@vatyunga Yeah, you would just need to add some more conditions for where you could walk to. But that shouldn’t be too hard.

  • @sajtcraft3473
    @sajtcraft3473 Місяць тому

    how to download?

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому

      you need to compile the project, the github link is in the description, and you also have instructions there

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому

      you need to compile the project, the github link is in the description, and you also have instructions there

    • @lowlevelgamedev9330
      @lowlevelgamedev9330  Місяць тому

      ok nvm you don't have instructions there but clone the repo, right click in the folder and select open with visual studio

  • @swapansaha2368
    @swapansaha2368 Місяць тому

    Can u pls teach us vulkan if possible. Pls plsplsplspls

  • @Classfied3D
    @Classfied3D Місяць тому

    I found something better... and it is called compile time polymorphism
    Lets go

  • @Centipede2577
    @Centipede2577 Місяць тому

    Hmmm nice game
    Try to remake it in directx8/direct3d

    • @hexiy_dev
      @hexiy_dev Місяць тому +8

      directx 8 ⁉ god damn at that point port the whole engine to windows 95 💀

    • @TechnicJelle
      @TechnicJelle Місяць тому

      Why??

  • @aleksitjvladica.
    @aleksitjvladica. Місяць тому

    I can not listen to this gay!