Building the new 3D engine for my game

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

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

  • @Samsam-kl2lk
    @Samsam-kl2lk 2 года назад +520

    with the fixed camera perspective, you also only have to create meshes for two sides of the cubes (as long as that doesn't give issues with shadows)

    • @geekume5539
      @geekume5539 2 года назад +2

      does he have a discord server?

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

      I think that likely would cause issues as the other faces would be needed to calculate shadows

    • @jdh
      @jdh  2 года назад +102

      this was something I considered :) but as the shadow meshes need all faces (all back faces at least) the mesh still needs to contain the whole cube unless I wanted to start building two separate meshes.
      However you could always cull other faces via normals during the color/normal pass or index the mesh to only draw -Z and +Y faces on cubes. lots of potential solutions!

    • @luna010
      @luna010 2 года назад +6

      @@jdh disclaimer: this is less of an actual suggestion and more of things that i think would be cool and interesting.
      maybe you could something like screen space shadows/raytracing for this. They have the benefit of being pixel perfect, and it seems to me like an orthographic voxel game with 2d sprites is pretty optimal for using them.
      Raytracing voxels is pretty simple, especially if you don’t have to do anything other than shadows. for the sprites, screen space shadowing could be used. the main limitations of screen space shadows are that it only uses depth information so it can’t draw things off screen or tell the thickness of objects, but the sprites don’t have varying thickness and are small and unlikely to cast shadows from offscreen.
      You could also probably just do some skewing/stretching to the sprites since it’s all orthographic. and they’re in the form of textures.
      i might try making a shadertoy with some orthographic shadow stuff now..

  • @memetech-
    @memetech- 2 года назад +728

    This guy is like “welcome to remaking minecraft, today we’re doing something completely different”

    • @jdh
      @jdh  2 года назад +250

      the classic bait and switch 😎

    • @memetech-
      @memetech- 2 года назад +9

      @@jdh yup. Just below the right amount of variety with is very slightly more than I like

    • @memetech-
      @memetech- 2 года назад +4

      Great video though

    • @memetech-
      @memetech- 2 года назад +5

      @@jdh also I suggested in another comment that you should add smaller light-only voxels to make the already barely noticeable effect even less noticeable

    • @aprilnya
      @aprilnya 2 года назад +5

      and then just remakes minecraft again

  • @freezado8573
    @freezado8573 2 года назад +587

    I find it still hard to sense the correct depth and everything. Maybe you can make surfaces (textures) increasingly darker the lower you get height-wise. Kinda like prebaked shadows

    • @jowsey
      @jowsey 2 года назад +45

      Yeah that seems like a good idea, I also still found it really had to understand the depth

    • @samuelmcgowan2565
      @samuelmcgowan2565 2 года назад +2

      I second this.

    • @Kopigan
      @Kopigan 2 года назад +36

      Probably the perspective is the problem. Currently it looks like a 45 degree angle, so the front of a block blends perfectly with the top of a block two places in front. Maybe the angle should be steeper.

    • @nsa3967
      @nsa3967 2 года назад +5

      @@Kopigan agreed. the character also looks funky with that angle

    • @Phroggster
      @Phroggster 2 года назад +10

      It sounds like this just needs some 2.5-dimensional ambient occlusion.

  • @Pneuma-Studios
    @Pneuma-Studios 2 года назад +271

    Damn I kinda wish we would've got the "Minecraft-ultra-deluxe-Amogus-Edition"

    • @marvinhermann2300
      @marvinhermann2300 2 года назад +10

      A M O G U S

    • @splatuuber4233
      @splatuuber4233 2 года назад +5

      Maybe next time... I mean we still can dream

    • @Pneuma-Studios
      @Pneuma-Studios 2 года назад +3

      @SplÅtuuber I hope 🙏

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

      Honestly I would buy that

    • @Pneuma-Studios
      @Pneuma-Studios 2 года назад +2

      @Trayambak It's too late 😔
      Let's shoot for 420 xD

  • @blehmeh9889
    @blehmeh9889 2 года назад +107

    2:00
    Woah, you should turn this into an Isometric dwarf-fortress-like strategy game and release it as "Ruby Dung".

    • @cst1229
      @cst1229 2 года назад +8

      BTW I think RubyDung stood for Rubylands Dungeons. Can't remember the source.

    • @jdh
      @jdh  2 года назад +37

      wow what a good idea! maybe when that project gets stale I can reuse the textures for some cube based survival game later on!

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

      @@jdh xD, btw this game looks great. I am learning opengl too and I'm recreating Minecraft, that's how I found you. And I'm so glad I did! Tysm for the content!

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

      Fun fact: rubydung was a predecessor to minecraft (which also was made by notch)

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

      @@jdh yeah at the 2:00 mark, I'm trying to learn C++ (I'm literally a nub still though) so I could basically remake a DF like game (could implement The Sims style view as well, where it cuts away a portion of the material to see through things, since it's multi level). The biggest take away from Dwarf Fortress is that it's not multithreaded well if at all, and there's no art. That 3d view that you have is literally something I want in the future.. we'll see if I can even make it that far at all...

  • @notalostnumber8660
    @notalostnumber8660 2 года назад +23

    As the other comments say, change the angle, as the perfect π/4 makes it harder on the depth perception
    Orthogonal projection is hard, but it's looking neat!

  • @7amalex763
    @7amalex763 2 года назад +144

    JDH, you inspire me with your PC Building and coding.
    I jumped into a new job soldering electronics to PCBs, and I am equally excited about software, too.
    I wouldn’t have gotten as far this year without your inspiring youtube videos. Thank you 🙏

  • @raidcrhonos
    @raidcrhonos 2 года назад +96

    * Dude's spending years making an easy and intuitive interface for their 3D modeling software *
    This dude: nah... I'll just "type" it out

  • @alexr.j2518
    @alexr.j2518 2 года назад +11

    I think having the whole perspective rotated around the up axis would make it easier to feel the depth of the world. Great video :D

  • @memetech-
    @memetech- 2 года назад +49

    Maybe make the light calculated using 9ths of a tile or even just 4ths so it’s harder to tell it’s just voxel lights
    Voxel lights lite
    Voxel lites

  • @CreaZyp154
    @CreaZyp154 2 года назад +8

    I love your videos. For the game, I suggest reducing the brightness (making it darker) of the blocks depending on its height

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

      I'm guessing he tried something like that but there's 16 levels of block height and 16 levels of brightness so it might be weird

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

    One technique you could try to improve the light map is to track the light level using a fractional value rather than an integer. The algorithm is exactly same, with one exception: the first iteration of light propagation gets a directional bias (from the light's intensity, to the intensity - 1) depending on where the light source is within its source tile. That should smooth things out and make the tiling less obvious while the light source is in motion.

  • @GerinoMorn
    @GerinoMorn Год назад +2

    Interestingly, you are literally reiterating my thoughts and ideas, testing them, and hitting all the pitfalls I was afraid of.
    Meaning I will wait for you to succeed and then have my gamedev be a breeze ;)))

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

    Funny how I just made something like this 2 months ago, only in the reverse direction your project is headed. I started with a 2d engine that rendered tiles isometrically but contained 3d data structures for the world. After a lot of struggling when it came to the concept and visual design, I ended up rewriting it into a 3d engine instead and just making it 1st person while the underlying code remained mostly the same.
    I look forward to seeing what you do with this concept. It's tricky but there is some potential for unique gameplay mechanics if you can solve the visual design issues.

  • @fntthesmth423
    @fntthesmth423 2 года назад +5

    This guy is the antithesis to "graphic design is my passion"

  • @thatoneguyyouforgotthenameof
    @thatoneguyyouforgotthenameof Год назад +3

    “I won’t abandon it after two videos”
    Hey at least it took over two videos

  • @harshchikorde9495
    @harshchikorde9495 2 года назад +2

    Can you please make your videos a little more descriptive like about an hour because I love what you do and wanna get through your process of learning and execution in detail.

  • @raphaelmateusdasneves772
    @raphaelmateusdasneves772 2 года назад +28

    I have never seen the inline keyword being used so much outside my own code. Maybe it will become strong again one day :')

    • @jdh
      @jdh  2 года назад +13

      inline = speed ofc

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

      Or you can be a menace and use it on your global variables

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

      @@jdh I heard it's slow to compile lots of inline functions

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

      friendship ended with inline, constexpr is my best friend now

  • @CYON4D
    @CYON4D 2 года назад +3

    Very nice work but I would have definitely kept the isometric perspective since it is the best view for conveying the sense of depth.

  • @loganhodgson6343
    @loganhodgson6343 2 года назад +2

    A better way to get some depth is to change the angle of the camera slightly to make the elevation change of the tiles a different size than the surface tiles.

  • @krtee43
    @krtee43 2 года назад +6

    You should do a series where you break down each stage of game development and explain some of it in more detail

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

      Including developing the engine? Seems like a good way to kill months and lose subscribers. It's paint drying level boring when you get into the nitty-gritty.
      It's more interesting to me than the average person, and a lecture on quaternions still about killed me. Game developers clench their teeth through those bits so they can get to the stuff that's actually fun about game development.

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

      @@ossiehalvorson7702 Maybe the real fun about game development was the math we learned along the way

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

      @@puppergump4117 :|

  • @smellthel
    @smellthel 2 года назад +2

    I’m excited for where he goes with this!

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

    The camera angle makes everything really confusing most of the time, even with hard edges. Others have sugested changing the angle (just the tilt) to break the simmetry between the side face and the top face, I also wanna suggest experiment with not perfect cubes, e.g. the cube's height is 90% of the top face's lenght, so it's still a square face at the top but more of a squashed down cube.
    Other than that, loved the art style, good job!

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

    I was once creating very similar game in terms of looks, but never finished, so I like to see that you are doing something similar. To make the depth be even clearer, you could tint the blocks based on how far are them from camera, kind of what they are doing with the dwarf fortress steam release.

  • @divine203
    @divine203 2 года назад +16

    The best engineer on youtube....wish to be as good as you someday

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

      Same 😂

    • @mgssscrazy
      @mgssscrazy 2 года назад +4

      Practice makes perfect! Choose project ideas and implement them. The best way to learn many of the topics in his videos is by building stuff. You'll get there with dedication and effort 😉

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

      @@mgssscrazy cant even come up with ideas 😂

  • @Kiwi-fl8te
    @Kiwi-fl8te 2 года назад

    You'll have to do something for the player to be visible in tight places or behind walls. I think one possibility would also maybe be to let te player rotate the camera by increments of 90 degrees. But even that won't fix the issue of tight spaces. Maybe when the player character goes behind a wall, that wall should become transparent ? Seems like for a Minecraft-type game this might be tough. If I recall correctly MiniCraft, one of Notches smaller projects, had only two layers, with the ground you walk on and 1 height of walls. Something akin to Don't Starve. You'd then go underground at specific places and the underground would be a two-layer space following the same rules.

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

    JDH: releases 2 videos to us in under a month
    Me: why the gods have bestowed upon us
    **LIGHT**

  • @Test-iv4pm
    @Test-iv4pm 2 года назад +3

    It is difficult for me to tell what is casting a shadow sometimes when the shadow is next to an edge-detected edge.

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

    this looks great. I'm excited to see where this project is going.

  • @ganglians
    @ganglians 2 года назад +3

    You've successfully coded your way out of drawing

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

    i have only few youtubers i get excited when they upload and you are one of them(been since you made your first c++ mc vid)

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

    Very nice.
    I always get excited to see those when they come out

  • @martingogaming1777
    @martingogaming1777 2 года назад +2

    Where did you learn OpenGL? Nice vids, can't wait until the next one!

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

      He has mentioned his tools in description

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

      @@mashug1731 THANKS, how didn't I see that lol

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

    I don't care how much the game changes, whether it's a good or bad game, or whether or not you finish it (although for your sake I hope you do). I'm subscribing because I love devlogs. So please, please keep this up longer than 2 episodes!!!

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

    it may be easier to discern differences in height with something like minecraft's connected textures (i think just a modded in thing). so like on the inner edge of a block there are some tufts of grass, and everything is a little darker, and on the outer edge it kinda falls off a bit. or something like that. bricks could use a different arrangement that creates a border, plain dirt could have rocks on the inner edge instead of dirt, etc. though i do admit that it would be more work than what you did already.

  • @M4gidev
    @M4gidev 2 года назад +2

    This is very similar to the game I'm making, making it really difficult to understand the depth of the objects, the solution I came up with was to make a blur and fog based on the height, the most challenging of all is to make a good algorithm to be possible see inside closed areas, this is not found on the internet, I had to create my own solution.

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

    I think it's looking pretty interesting thus far in terms of the graphics style. Interested to see where this goes

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

    can you make a video about minecraft?

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

    I really like how stylised the game became as the video progressed. I've been thinking if similar lighting could be possible in 2D isometric games without resorting to 3D. 3D might just be the easiest option 🤷‍♀️

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

    Could you theoretically make the lighting spherical instead of “diamond-shaped” by replacing the breadth-first search with one that works based on the Euclidean distance from the center?

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

    Please finish this project... It has a lot of great engineering from ground 0 🙏

  • @tristacho5472
    @tristacho5472 2 года назад +2

    2:00 gives me age of empires 2 vibes for some reason I dig it

  • @HedenCop
    @HedenCop 2 года назад +3

    Super cool video. I'm blown away that you can hard code all this. I'll stick to my nice premade 3D engines 😳😂. I would like to add that i am not so sure about the perspective, i still can't tell how tall things are and where they are in the map. That being said this was still an awesome video, looking forward to more

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

    I hope you make the player's movement fixed on the x and y axes, otherwise thatll be really weird

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

    Ah, so we're remaking Habbo hotel now. Got it

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

    I think you should use a camera angle like at 2:00.
    It way better to give perspective. In the other, even with black edges, we cannot estimate height.

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

    I feel like the grass blocks should have a normal map too because now it looks a bit like plastic with a flashlight shining on it, keep up the good work.

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

    Your smooth lighting is much better than minecraft's! Minecraft has had broken ambient occlusion since it was first added, and you just... didn't do it wrong. What an amazing thought.

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

    The first test looked the best, try putting the camera angle diagonal, it will be better

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

    I'm creating a very similar project, we convergently came to the same conclusion, though the results on your project exceed anything I've ever created. not salty about it anymore.

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

    at first i thought you were using an ide because of the code completions and bottom tmux screen, your vimrc is amazing

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

    Two games you might find inspiration from could be Dead Cells and Octopath Traveler. Dead Cells had 3D models which were then converted into 2D via rotoscoping if I remember correctly. Octopath Traveler is a 2.5D game that has a similar look to the first iteration of the sprite earlier in the video.

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

    I unfortunately could not make out half of the parenthesis and punctuation symbols because of their lack of contrast against the background. Maybe make them brighter and/or more accessible?

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

    Your hard work is appreciated!!

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

    I love how I didn't have to watch any of your previous videos to understand "and no, I won't abandon this one after 2 videos".
    (#LifeOfAGamedev)

  • @Serioustar
    @Serioustar 2 года назад +5

    I imagine you're one day going to make your own coding language

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

      He has, iirc he made an Assembly language for his own computer

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

      Maybe he can name it after a snake and completely destroy the meaning of programming

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

    can Conway's game of life be used do calculate light or something else?

  • @hrisheekeshdandekar5126
    @hrisheekeshdandekar5126 2 года назад +2

    Which Gruvbox theme is he using??????? I NEED THOSE BOLD KEYWORDSSS

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

    dont worry the 6 months upload schedule if far better than code bullet's 1 year(maybe) schedule

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

    why do the axis-aligned orthographic matrix tho? that just seems like a massive shot in the foot for no real reason.
    you can make the player/npc movement axis-aligned, and have the camera at a slight angle

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

    2:04 that could be a really cool wallpaper

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

    For those who want to know what’s his neo vim theme is, it’s called *gruvbox*

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

    one of the best coding channel, your videos are really realxing

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

    you actually dont have to do any rotation malarky for the camera if you hadn't figured that out
    you just have to modify one of the skew parameters of the view or projection matrix

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

    I'm annoyed youtube doesn't recommend me your videos. I love them u_u

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

    Same reasoning about pixel art and making rendering 3d models as Randy did for his project.
    Also, seeing std::vector

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

    What did you study in school that taught you these things?

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

    i actually love the 2d sprite with 3d lighting

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

    Great job jdh, thanks for being so inspiring!

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

    @randygg been doing this for 2years now! Where you at ?

  • @ЭнрикеЧурин
    @ЭнрикеЧурин 2 года назад

    I think this can go on forever

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

    That lighting technique is cool o-o

  • @Psychx_
    @Psychx_ 2 года назад +2

    Great video! What's that "console IDE" you're using called? It seems very efficient.

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

    This reminds me of LandTraveller, it had the same 2.5D style voxel aspect.
    And I tried to go for a similar style but 3D hard.

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

    That 3d to pixel art idea sounds a lot like what Randy is doing.

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

    Hmm... The 3D-to-pixel thing seems right up the alley of something that @RandallThomas would do

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

    Video 2 of asking for a video of mining silicon for your own chips

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

    Perhaps a Minecraft-inspired voxel ambient occlusion method could help with defining depth in your render?

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

    My favourite part of this video is when multiple times I understood a concept *better* than I did after he explained it.

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

    The lack of a border at the edge closest to the camera is kind of weird looking. Mathematically I understand why it is happening, with both faces visible it is a peak rather than a cliff, but having the border on only certain edges of the blocks is odd.

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

    I really need to know what education you have (i’m danish)

  • @asian-ginga
    @asian-ginga 2 года назад

    Imagine you make it as in-depth as terraria with mods. That would be sick, I'd be down to make some mods for this game. Plus you could add different planets, multiplayer system, etc. This game could actually be really cool and really big.

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

    Can you make tutorial how to make minecraft

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

      Hey If you know basics of any language and Rendering library then you can use this tutorial:
      ruclips.net/p/PL80Zqpd23vJfyWQi-8FKDbeO_ZQamLKJL
      Though this is in Java

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

    could you like in-depth tutorials on rendering cause that would be epic

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

    2D sprites with normal maps... this looks awesome.

  • @vincentv.b.2132
    @vincentv.b.2132 2 года назад

    This dude makes it look so easy. Unfair :(

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

    Randy did this same thing, it's crazy bruv....

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

    This man is the definition of "hey Ferb What are we gonna do today?"

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

    I think you should add the possibility to rotate the camera because if the game is indeed 3d you can do that. With normal 2d game you can't.

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

    Could you please create a playlist of the songs you use in your videos?

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

    It looks nice but it's hard to tell depth of the object even if it casting some shadow.

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

    I haven't watched the full thing yet but from the initial part, it seems like you're after a similar effect as to what Randy is (was?) going for with his game/engine

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

    this is like roller coaster tycoon craft

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

    You make more progress in one day than Randy makes in a year

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

    Nice :D
    I think the edge lines need to be more subtle. Also, they appear to be on the outside of blocks, rather than part of them, which is a bit jarring. I don't know how easy that is to fix?

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

      Also some random rotation could be nice for the textures to prevent tiling.

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

    1:59 if you kept this you could have recreated rubydung!

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

    Can you please make a setup tour or workflow type of video i would love to see how the heck you code gigantic things in just few days 😁😁

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

    I think the edges need to be sharper, even with your implementation It still can be a bit disorienting sometimes.

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

    I'd recommend the MIT and GPL licenses.

  • @123TeeMee
    @123TeeMee 2 года назад

    Dynmap for minecraft shows an isometric render of the game, but it’s quite limited. Maybe you could do something similar instead of making a whole game yourself.