Making a GAME in ONE HOUR using MY ENGINE

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2019
  • Game Code ► github.com/TheCherno/Hazel1Ho...
    Patreon ► / thecherno
    Instagram ► / thecherno
    Dani's video ► • Making a Game in ONE HOUR
    Game Engine series ► thecherno.com/engine
    Hazel ► github.com/TheCherno/Hazel
    Version of Hazel I used ► github.com/TheCherno/Hazel/tr...
    Twitter ► / thecherno
    Discord ► thecherno.com/discord

ความคิดเห็น • 616

  • @Danidev
    @Danidev 4 ปีที่แล้ว +4774

    Dude that was awesome, I feel totally outdone haha! Good job!
    I actually used your videos when I started learning programming 2 years ago!

    • @cinnamon8908
      @cinnamon8908 4 ปีที่แล้ว +167

      Hey Dani

    • @TheCherno
      @TheCherno  4 ปีที่แล้ว +844

      Haha thanks, and thank you for the video idea! 😊

    • @seedzy3877
      @seedzy3877 4 ปีที่แล้ว +16

      Wo,haha,me too

    • @mohammedyussif8893
      @mohammedyussif8893 4 ปีที่แล้ว +17

      yoo my man Dani

    • @CODEDSTUDIO
      @CODEDSTUDIO 4 ปีที่แล้ว +53

      Dani and Cherno are my best motivators ever, #CODEDVYBES

  • @LudwigvanBeethoven2
    @LudwigvanBeethoven2 4 ปีที่แล้ว +1599

    It takes me one hour to choose a name for a variable

    • @manualvarado2212
      @manualvarado2212 4 ปีที่แล้ว +79

      But you compose wonderfully.

    • @youngtrader6968
      @youngtrader6968 4 ปีที่แล้ว +9

      I just name it a letter if im learning😂

    • @iamlordstarbuilder5595
      @iamlordstarbuilder5595 4 ปีที่แล้ว +13

      Bish I call it “fart” or “Thing”

    • @menicman7044
      @menicman7044 4 ปีที่แล้ว +3

      I usually call them something like 'ghfhhyg' so when I come back to them I think "oh, that's the one that starts with a 'g' , this must be the _______"

    • @decrodedart2688
      @decrodedart2688 4 ปีที่แล้ว

      ♫♪Ludwig van Beethoven♪♫ i bet its a good name but

  • @Skyrunner-nu8dp
    @Skyrunner-nu8dp 4 ปีที่แล้ว +452

    Cherno: spends 1 hour making the game
    Me: spends one hour naming the game
    Dunno how i got that many likes this wasn’t even that funny in my head..
    Well thanks lol

    • @xrafter
      @xrafter 4 ปีที่แล้ว +3

      There something called preparation
      Read about it

    • @Skyrunner-nu8dp
      @Skyrunner-nu8dp 4 ปีที่แล้ว +4

      I spend 1 hour naming a game m8
      I don’t have time to read

    • @xrafter
      @xrafter 4 ปีที่แล้ว +3

      @@Skyrunner-nu8dp
      Poor man 😢
      May the god give more time

    • @Tygo01
      @Tygo01 3 ปีที่แล้ว

      I always make the stuff first, then name it

    • @PabTSM-OfficialChannel
      @PabTSM-OfficialChannel 2 ปีที่แล้ว

      @@xrafter and there's something called a joke

  • @DizZyANDCost1a
    @DizZyANDCost1a 4 ปีที่แล้ว +183

    Cherno : "I´m making my own Engine!"
    Also Cherno: "don´t think hazel can do triangles" ^^

    • @rod-abreu
      @rod-abreu 4 ปีที่แล้ว +11

      @Gerson Ferreira Well, we can actually learn a lot from that crazy effort. I've started on games by making my own engine for my finals at school, just met Unity later on after that, then I moved to Unity and I was comfortable with most of the stuff because of my previous researches about engine programming :)

    • @Tygo01
      @Tygo01 3 ปีที่แล้ว +2

      @Gerson Ferreira in his opengl series from 2017 he made a triangle with 4 lines

    • @ben.pueschel
      @ben.pueschel 2 ปีที่แล้ว +3

      @Gerson Ferreira Triangles are actually the most basic building block for geometry in most engines (including Hazel)

    • @agoogleuser3853
      @agoogleuser3853 2 ปีที่แล้ว +2

      @@ben.pueschel but that is for 3d

    • @aquaponieee
      @aquaponieee 2 ปีที่แล้ว

      @@agoogleuser3853 if you make it. Usually you can just make a triangle and it will be a 2D triangle

  • @shubhamsingh2719
    @shubhamsingh2719 4 ปีที่แล้ว +76

    To be honest .. This is way more awesome than any unity or unreal game making tutorial on TH-cam

    • @blackcitadel37
      @blackcitadel37 2 ปีที่แล้ว +5

      Making your own stuff from scratch is 10x the effort and time but it's way more interesting

    • @Scotty-vs4lf
      @Scotty-vs4lf 2 ปีที่แล้ว

      @@blackcitadel37 10x the effort but 1000x the knowledge

  • @lukefox836
    @lukefox836 4 ปีที่แล้ว +663

    Wish you didn't fast-forward. I would have watched the whole duration.

    • @shonjones7231
      @shonjones7231 4 ปีที่แล้ว +13

      Agree

    • @cankarkadev9281
      @cankarkadev9281 4 ปีที่แล้ว +10

      I would appreciate that as well for future videos

    • @Firestar-rm8df
      @Firestar-rm8df 4 ปีที่แล้ว +36

      I would like to see a real-time one, but I understand why he would speed it up. There is also less to do a voice over for as he can hit highlights. I would request just dumping the Raw footage on a second channel, no fancy edits, because as someone who tried to make videos, I know that takes a TON of time, and I get that the raws aren't for everyone, but it would be cool to see, a lot like some gaming channels put highlights on their main channel, and dump their streams on a second.

    • @connorking9217
      @connorking9217 4 ปีที่แล้ว

      Me too

    • @angelex2483
      @angelex2483 4 ปีที่แล้ว +2

      @@shonjones7231 slow the video down maybe idk

  • @CodeBeetle
    @CodeBeetle 4 ปีที่แล้ว +17

    That was pretty cool actually and love the honesty (2nd timer, etc)

  • @sarahkatherine8458
    @sarahkatherine8458 4 ปีที่แล้ว +97

    2:51 The title should be changed to "Making a GAME and THE OTHER HALF OF THE ENGINE in ONE HOUR using HALF OF MY ENGINE"
    3:50 "HA! The Unity Paricle System. I'll just use the Hazel Particle System." "Oh wait..."
    4:43 So even Random Map Generation can be solved using triangles.
    7:31 "Flaaaames...."
    13:00 And the journey of the Cherno Ship starts... (it already started 3 minutes before)
    14:53 Stack Overflow has joined the game.

  • @systematicloop3215
    @systematicloop3215 4 ปีที่แล้ว +81

    You should totally revise this as the engine gets more features in a future video a few months from now.

    • @lilcatfriend4575
      @lilcatfriend4575 4 ปีที่แล้ว +4

      "Revisiting Hazel!" Yeah I like

    • @JustARegularPlayer
      @JustARegularPlayer 2 ปีที่แล้ว

      That video will now last about 8 minutes then lmao

  • @Fobber92
    @Fobber92 4 ปีที่แล้ว +2

    Awesome video being it the first ever showcase of the engine itself and its application since the start of this series. Thank you

  • @DebatableSnowman
    @DebatableSnowman 4 ปีที่แล้ว +9

    Channels like this deserve more attention! These channels put so much work in videos!

  • @lengors1674
    @lengors1674 4 ปีที่แล้ว +31

    7:34 me, when I find out everything that I'll have to study for my exams

  • @vamidicreations
    @vamidicreations 4 ปีที่แล้ว +14

    Holy sh*t this was amazing. You really showed things where I'm struggling the most and that is dealing with time and seeing what is important. I always want to tweak and make it "pretty" but you were really pushing yourself to continue and finish it on time. I would like to see how you tackle that maybe an idea for me or other people.. basically the do's and don't, but other than that, great job! Looking forward to your next little game projects!

    • @klaus9503
      @klaus9503 2 ปีที่แล้ว +1

      Just focus on the destination first. Don't optimize too early.

  • @Rouce1
    @Rouce1 4 ปีที่แล้ว +10

    Watching for ten minutes to list all the features Hazel does not have is maybe the best ten minutes of this video

  • @franciscofarias6385
    @franciscofarias6385 2 ปีที่แล้ว +2

    As a web dev I've started learning game dev in C++ recently and this kind of content helps me immensely. A small code base written by a pro that I can dive into in little time and still learn so much is the perfect material for someone in my situation. Thanks so much for this.

  • @AndySomething
    @AndySomething 4 ปีที่แล้ว +4

    3:46 I remember using that short video clip of the rocket as a loop for the splash page of a space themed website in my coding boot camp 😅

  • @nikolaiarsenov1595
    @nikolaiarsenov1595 4 ปีที่แล้ว +8

    Nice video!
    Please do these challenges once in a while to test the existing features, this is awesome!
    Looking forward for scripting language feature :D

  • @AltamishM
    @AltamishM 3 ปีที่แล้ว

    Just want to say I love the way you shot this - super pleasant lighting and overall aesthetic.

  • @calebstevens8269
    @calebstevens8269 4 ปีที่แล้ว +1

    Bro you're still around! When I was in 7th grade I made my first "game" following your java tutorial about 6 years ago. So glad you exist man

  • @anigol92
    @anigol92 4 ปีที่แล้ว +9

    ImGui rules! I did a project for my Master's degree with a custom-made engine along 20 other people and without it we couldn't have done it. It's so cool to see you use it

  • @luisponce3580
    @luisponce3580 4 ปีที่แล้ว

    Great video! (Loved the editing as well :D )

  • @tarasboichuk3958
    @tarasboichuk3958 4 ปีที่แล้ว +55

    Oh, particles... we dont have particles

    • @pladselsker8340
      @pladselsker8340 3 ปีที่แล้ว +6

      Dany: you're depressed? Have tou tried *unity's particle system* ?
      Hazle: uh *we don't do that here*

  • @vincentsalgueiro
    @vincentsalgueiro 2 ปีที่แล้ว +7

    You should totally host a game-jam focussed testing exclusive to Hazel when its semi-ready!

  • @nt4f04und
    @nt4f04und 4 ปีที่แล้ว +3

    Dude you are incredible, keep doing this amazing stuff

  • @sakshamjain7984
    @sakshamjain7984 4 ปีที่แล้ว +6

    His hard work is really appreciable

  • @ensiferrus9090
    @ensiferrus9090 4 ปีที่แล้ว +220

    It's pretty painful to recognize, that I have no friends to share your video with :-(

    • @RAFMnBgaming
      @RAFMnBgaming 4 ปีที่แล้ว +19

      I have friends, I definitely have friends. Objectively I can say that I have all the friends.
      Sadly, musical theatre nerds don't exactly appreciate much about programming so whenever I'm doing anything cool, I really have no one to tell about it either.

    • @MouseGoat
      @MouseGoat 4 ปีที่แล้ว +15

      I feel a deep connection with you tho that one painful reality that we both share. >___>

    • @ensiferrus9090
      @ensiferrus9090 4 ปีที่แล้ว +7

      @@MouseGoat bro (っ˘̩╭╮˘̩)っ

    • @LeoN11rus
      @LeoN11rus 4 ปีที่แล้ว +2

      Бро

    • @torpy9212
      @torpy9212 4 ปีที่แล้ว +5

      We are the lonely people and the introverts here

  • @NaughtyKlaus
    @NaughtyKlaus 4 ปีที่แล้ว +281

    This guy looks like a model, not a game developer.

    • @CaptainJeoy
      @CaptainJeoy 4 ปีที่แล้ว +52

      He's actually not a Game Developer, he's a Game Engine Developer.

    • @NaughtyKlaus
      @NaughtyKlaus 4 ปีที่แล้ว +63

      @@CaptainJeoy Technically he's both.

    • @CaptainJeoy
      @CaptainJeoy 4 ปีที่แล้ว +2

      @@NaughtyKlaus Well, you can say that

    • @RAFMnBgaming
      @RAFMnBgaming 4 ปีที่แล้ว +15

      I'd say he looks more like a full motion video to me.

    • @NaughtyKlaus
      @NaughtyKlaus 4 ปีที่แล้ว +3

      @@exrcises1782 I don't give a rats ass about what he said. I'm just saying that's what he looks like.

  • @stephen9849
    @stephen9849 3 ปีที่แล้ว +3

    Cherno has a TH-cam channel for 8 years! 290k subscribers
    Dani has a TH-cam channel for 1 year! 1 million subscribers

    • @mghq-mobilegamerzhq2533
      @mghq-mobilegamerzhq2533 3 ปีที่แล้ว +1

      Actually Dani has been on TH-cam for 10 years, he was banned for 5 years even, He wanted a fresh start and made his newest channel

    • @ilikebanana5214
      @ilikebanana5214 3 ปีที่แล้ว +2

      @@mghq-mobilegamerzhq2533 yeah but he started this new channel from scratch so it doesnt really matter

  • @PrinceGupta-jo8lo
    @PrinceGupta-jo8lo 4 ปีที่แล้ว +5

    Damn I was planning on to follow game engine series soon after my semester's exams are over. Guess there might be some instability.

  • @fadge316
    @fadge316 ปีที่แล้ว +1

    Hazel has come along so much since this video!! Well done

  • @noamrozov3569
    @noamrozov3569 4 ปีที่แล้ว

    Nice 👍🏼 Really liked the style of the video

  • @960Design
    @960Design 4 ปีที่แล้ว +106

    I can't even build a basic pixel character idle animation in an hour.

    • @victornaut
      @victornaut 4 ปีที่แล้ว +13

      Yes you can.

    • @jacobsucks
      @jacobsucks 4 ปีที่แล้ว +5

      @@victornaut you are so goddamn cool bro

    • @lavodnas7899
      @lavodnas7899 4 ปีที่แล้ว +5

      @@jacobsucks yo i know right this guy is so cool bro

    • @ClicStudio
      @ClicStudio 4 ปีที่แล้ว +3

      Epic guy giving confidence to others

    • @hey-ml4gd
      @hey-ml4gd 4 ปีที่แล้ว +2

      @@lavodnas7899 you're do right hes so cool

  • @DaneC020
    @DaneC020 4 ปีที่แล้ว

    Great video! Nice to see what you can do with a basic engine. :)

  • @cheako91155
    @cheako91155 4 ปีที่แล้ว

    U can use tags to mark important commits, to publish it's a little non obvious `git push origin `

  • @youni9634
    @youni9634 4 ปีที่แล้ว

    Im waiting to use your engine, so finish it.
    Dude you are awesome.

  • @Kostu96
    @Kostu96 4 ปีที่แล้ว

    I really like the montage style of this video :D it makes it funnier to watch

  • @YoloMonstaaa
    @YoloMonstaaa 4 ปีที่แล้ว +2

    This gonna be a fun video, I can already tell.

  • @kazuhakaedehara2881
    @kazuhakaedehara2881 4 ปีที่แล้ว

    Fantastic video and well done!

  • @jorgegomes83
    @jorgegomes83 4 ปีที่แล้ว +17

    24:28 So, does this means we'll never see you in a possibly near future 24h Hazel Game Jam?

  • @Youngermaster
    @Youngermaster 4 ปีที่แล้ว

    Just amazing!
    Keep it up the videos :D

  • @SunSurfSnow1990
    @SunSurfSnow1990 4 ปีที่แล้ว +1

    Bro, found ur channel from the UE5 commentary, was intrigued when u mentioned ur making ur own.
    I have a question, and maybe a good video for you to make, “if you had to pick one or so games out now, which best represents ur engines inspiration for its first full-featured/non-dev build?” Good luck, u have taken on a big one

  • @stdDizzasTeR
    @stdDizzasTeR 4 ปีที่แล้ว +15

    Reminds me of when I made a 2d flying plane shooter in C++ (SFML) - Enjoyed the video

  • @CaffeineInjected
    @CaffeineInjected 4 ปีที่แล้ว

    Really love your channel, keep up the good work. I want to see hitboxes and collision detection. For example.. a. Sword colliing with a shield. 🤗

  • @RobertTamlyn
    @RobertTamlyn 4 ปีที่แล้ว +14

    Game Code tomorrow. Is that like "Free Beer Tomorrow"?

  • @705am
    @705am 4 ปีที่แล้ว +3

    You re just awesome i ve learned alot from you thanks alot
    , you make it very simple
    I m waiting for some Qt framework tutorials, plz? It wud be very nice ^^

  • @narge100
    @narge100 4 ปีที่แล้ว +2

    Loved the humor in this one ahah!

  • @littleclouds1
    @littleclouds1 4 ปีที่แล้ว

    Pretty pretty cool I have to say. A recommendation/wish for the next clips would be batch rendering/instancing and GUI order drawing

  • @nulljupiter6636
    @nulljupiter6636 4 ปีที่แล้ว

    Great videos i really learned pretty much everything i know about graphical programming at a low level from you. But one thing i keep missing all over TH-cam is how to actually do 3D animation with OpenGL. Maybe you could do something like this in a video for your OpenGL Series. (I would love to see it)
    Keep on going :)

  • @GendaijinBlog
    @GendaijinBlog 3 ปีที่แล้ว

    This is great stuff.
    I love the topic man.

  • @theswipt
    @theswipt 4 ปีที่แล้ว +1

    Very interesting video ! Don't hesitate to do something like that soon ahah

  • @jonhaasnoler
    @jonhaasnoler 4 ปีที่แล้ว

    Hi! since you mentioned audio. Are you gonna make an audio engine for hazle in the future? If so, are you gonna use something like wwise or fmod or are you gonna make your own from scratch? Im planning on becoming an audio programmer so that would interest me a lot.

  • @oreostastegoods
    @oreostastegoods 4 ปีที่แล้ว +1

    Cool idea to test your engine like that

  • @deltaghostprofessionalgame875
    @deltaghostprofessionalgame875 4 ปีที่แล้ว +3

    Cherno heard about desktop PC's? Ohh look at me it's 2019 hehehehe nice video

  • @markyrocks69
    @markyrocks69 4 ปีที่แล้ว

    Totally awesome. I'm definitely amazed.

  • @rmt3589
    @rmt3589 8 หลายเดือนก่อน +1

    This is very inspiring! Didn't think a barebones engine like that could be made public. I feel a lot more confident now in starting to make my own engine!

  • @mrstarfire9336
    @mrstarfire9336 4 ปีที่แล้ว +5

    Literally came to say i have massive respect for anyone building their own engine when it would be a LOT easier to use a pre-built engine...

  • @ChristopherToro
    @ChristopherToro 4 ปีที่แล้ว

    After you finished the game it looks like years were taken off your life haha - great job on utilizing that engine of yours. Impressive for sure!

  • @SealDev
    @SealDev 4 ปีที่แล้ว

    Awesome video!!

  • @aspergale9836
    @aspergale9836 3 ปีที่แล้ว

    Looking forward to the detailed look.

  • @gdjosef
    @gdjosef 4 ปีที่แล้ว +1

    just started to watch again, i forgot what this was. gonna predict 90% just adding features in Hazel 10% making the actual game

  • @blokvader8283
    @blokvader8283 4 ปีที่แล้ว +1

    I saw the thumbnail and thought "Hey! I also love Dani!"

  • @darkerbit
    @darkerbit 4 ปีที่แล้ว

    Well there's one of my engine name ideas gone! Excellent work

  • @ecarter2747
    @ecarter2747 3 ปีที่แล้ว +1

    Good on you, nice to see there are others like me making their own engines from scratch (and in C++ - something that is relatively rare these days on both counts). I won't touch pre-built engines like Unity with a barge pole, since a. they usually have horrible limitations to what you can do with them (no matter how 'advanced' they think they are), and b. though time-consuming and often frustrating, it's just way more satisfying when you can create an entire game completely from scratch.
    I cannot make the claim of 'a game in 1 hour' in my engine, but that's because I'm writing - also in C++ - a purpose-built, 3D engine/game (rather than a general engine for game-building), based on a 20+yo game and it's sequel. While not strictly 'playable' as a game yet (only one actor class has been created for testing the backend), it's almost in what I'd consider a 'releasable demo' stage; in the long term I've still got a metric f^(ktonne to do. But meh... It's a hobby project, and I'm having so much fun writing it that I really don't care how long it takes.
    It's still in heavy development, but so far it includes: support for both forward and deferred shader-driven rendering on the GPU, and realtime raytracing - slow, sure, but playable - on the CPU (an old-school edge-based renderer is also planned); dynamic world deformation (player / actors perform tasks which change the terrain, and the map-editor is built into the engine for WYSIWYG map creation); all collision (both on-screen and in-world) is handled by raycasting (so, no cumbersome per-object-type clipping code - in fact, the raycaster is the same one used for raytraced rendering); isometric (with rotation, tilt and zoom) and first-person camera views, depending on what you are currently doing in-game; event-driven audio system controlling both in-game effects and music; most in-game elements are defined in an XML-based definition file (making it easy to create new terrain types, actors, game actions, sound effects and music, without ever recompiling the game code).

  • @tomaskot9278
    @tomaskot9278 4 ปีที่แล้ว

    Just as a note to anyone else doing something similar in the future - checking the vertices of the player's rectangle against the obstacle triangle is not enough, you can have a collision of the two shapes while none of the vertices of either shape is inside the other shape. But considering how small the player is in this game and how it flies forward, it is very unlikely to cause any problems at all (probably even impossible).

  • @MicheleTurchiarelli
    @MicheleTurchiarelli 4 ปีที่แล้ว

    I really hope the Game Engine series will be long... long live the Game Engine playlist!

  • @Ramp10er
    @Ramp10er 4 ปีที่แล้ว

    What does Sparky Engine used for rendering? Can it use any platform in rendering like octane, vray, redshift and the new d5 renderer?

  • @Gunslinger962
    @Gunslinger962 4 ปีที่แล้ว +5

    This series is getting really interesting!

  • @dogefu273
    @dogefu273 4 ปีที่แล้ว +1

    I Really Really like you videos!

  • @kodiererg
    @kodiererg 3 ปีที่แล้ว +1

    I'm a little late, but you could do music and sound effects by playing midi beeps. That's pretty easy in
    C++.

  • @Alien_Sauce
    @Alien_Sauce 2 ปีที่แล้ว +2

    lmao i realized that it looked like dani's video and i heard that voice and scrolled down and saw his comment XD this is great

    • @JustARegularPlayer
      @JustARegularPlayer 2 ปีที่แล้ว

      if you listened to dani's video here at a certain moment you'll hear him say "u n i t y ' s p a r t i c l e s y s t e m"

    • @Alien_Sauce
      @Alien_Sauce 2 ปีที่แล้ว

      ​@@JustARegularPlayer XD

  • @giorgichubinidze3756
    @giorgichubinidze3756 4 ปีที่แล้ว

    I think you should check triangle vertices in rectangle as well, because there is a case where non of the rectangle vertices are inside the triangle, but triangle vertex is in the rectangle.

  • @dimitar1443
    @dimitar1443 4 ปีที่แล้ว

    Really, really interesting!

  • @simonhadfield8540
    @simonhadfield8540 6 หลายเดือนก่อน

    Whenever i call a method or function from Hazel engine i get an unresolved external symbol lnk2019 linking error. Any tips to resolve it. Im trying to do my own version of it and ive stuck to using a dll instead of static lib

  • @smrtfasizmu6161
    @smrtfasizmu6161 2 ปีที่แล้ว

    You can solve colission detection by analytical geometry (one of the most creative parts of highschool math in my opinion). Since graphics is all about drawing triangles, the question is really how do you determine that a certain point belongs to a triangle or not. You represent all three sides of a triangle with a linear equation. Then you put an arbitrary line through that pixel, check whether the line intersects the triangle, and if it does intersect it, check whether the pixel is in between the intersection points.
    Pixel is inside a triangle if and only if it intersects 2 out of 3 lines and it is in between the intersection points (feel free to point out flaw in my logic if there is one).
    For instace if you have a triangle whose vertices are:
    A(100, 100),
    B(200, 100),
    C(150, 200)
    How do you figure out the equation of a line? Easy, every linear equation is of the form y =kx +n
    K is the derivative, the slope, rise over run. N is how much the function outputs at x=0.
    You will have the following equations for the lines of the triangle.
    Line AB
    k = 0, there is no rise (no change in y coordinate).
    So, we have y = n,
    y is constant and it is equal to 100.
    So the equation for the line AB is y = 100, x€(100, 200)
    The equation for AC is the following
    A(100, 100)
    C(150, 200)
    rise is 200-100 = 100
    run is 150-100 = 50
    k = rise / run = 100 / 50 = 2
    So, we have y = 2x + n
    Plug in values for y and x from either of the points, let's choose point C.
    200 = 2*150 + n
    200 = 300 + n
    n = - 100
    The equation for this line is
    y = 2x - 100,
    x€(100, 150), y€(100,200)
    Repeat the same process for the last line.
    Now, imagine a pixel M inside a triangle. If you put an arbitrary line through that pixel M, that line must intersect the two sides of the triangle. That's the first condition which must be satisfied in order for a pixel to be in the inside of a triangle.
    Then, if that condition is satisfied, you have another, final condition.
    If a pixel M is inside a triangle then that arbitrary line which goes through the pixel M must intersect the triangle in such a way that the intersections with the triangle are on the different sides of the pixel. In other words, the pixel M will be between the points of intersection of our arbitrary line with the triangle if and only if pixel is inside the triangle.
    Let's do this on our example. Let's check whether Point M(120, 130) is inside our triangle ABC.
    Create any line which is true for x = 120, y = 130
    For instance y = x + 10.
    Check whether that line intersects the sides of the triangle.
    Let's try the side AC
    y = x + 10
    y = 2x - 100, 100

  • @ahurein1641
    @ahurein1641 4 ปีที่แล้ว +16

    I've been learning c++ for three months now in college, the game c++ source file scared me to death. too many concepts and use cases i've never seen before.i have a long way to go lol

    • @s-sugoi835
      @s-sugoi835 4 ปีที่แล้ว +3

      Been studying c++ in like a year and half and still am stuck at basic STL lols.

    • @ahurein1641
      @ahurein1641 4 ปีที่แล้ว +1

      @@s-sugoi835 I'm not alone 😪

    • @Betospin1
      @Betospin1 4 ปีที่แล้ว +3

      It is the beginning of a beautiful and terrifying road to the wonders of programming :)

  • @IPlayKindred
    @IPlayKindred 4 ปีที่แล้ว +2

    That was awesome

  • @Lita1
    @Lita1 2 ปีที่แล้ว

    Interesting...I was thinking of something like this so it can skeleton key basic mechanics, pre-coded, just needs to be ladled. Then like a puzzle just put it together and then just compile it for the platform you want. The main point of it is you can express creativity and high graphics, plus all of the pre-codes are C++ therefore maximizing the devices potential, and not stressing the devices memory, preventing crashes liked this video yes!!!!👍😅

  • @54546546ish
    @54546546ish 4 ปีที่แล้ว

    whats laptop do you use for programming? just realised you are using a laptop and that would be really useful to buy some :}

  • @mathewo07
    @mathewo07 4 ปีที่แล้ว +1

    Question, maybe you can answer this. So when I was younger , I used to mess around with GameMaker 3D and what not. I had no clue what I was doing. But what I did like was that it had its own IDE in its engine. Which was really nice because if let’s say you had a Mac or something the IDE was universal. So you didn’t have to worry about things like oh do I have to use XCode or do I use Visual studio? Plus, all the header files that the engine needs are there by default. So adding headers to visual studio or Xcode wouldn’t really be needed. Since the engine and the IDE are basically one. Why don’t all game engines have this feature?

    • @dhkatz_
      @dhkatz_ 4 ปีที่แล้ว +1

      Because IDEs are a pain to maintain. Modern IDEs are going to have way more features that developers want. Besides, the whole pain of building has nothing to do with IDEs, its because C++ doesn't have modules which makes linking fall apart from system to system.

    • @mathewo07
      @mathewo07 4 ปีที่แล้ว

      Doctor I see that makes sense, I can definitely see them being hard to maintain as the company would always have to keep up with changes and what not. Not sure if you ever used gamemaker but how come they were able to do it? It wasn’t as efficient as a regular ide, it was mainly just a script page and you tell the object what you want it to do. Nothing like real object oriented programming

  • @lafeo0077
    @lafeo0077 3 ปีที่แล้ว

    hey what do you write in that notebook? do you have notebooks for seperate ideas? And which notebook is that?

  • @HugRunner
    @HugRunner 4 ปีที่แล้ว

    I think a video that would compare how the different engines, e.g. Unity, Unreal, Godot and Hazel tackles a game like this would be really interesting.

  • @VileStorms
    @VileStorms 4 ปีที่แล้ว +2

    the thumbnail makes you look like an Aussy Chris Pratt, thats a compliment btw :P

  • @runar5269
    @runar5269 4 ปีที่แล้ว

    This was unique, and i like it

  • @luckylove72
    @luckylove72 4 ปีที่แล้ว

    Thanks needed this for my perfectionism

  • @beoxsgaming9388
    @beoxsgaming9388 4 ปีที่แล้ว +18

    "What have I gotten myself into?"
    The question I ask myself everyday I sit at a computer staring at an IDE. I usually follow it up with depression, crying, and even a little bit of gnashing of teeth.

    • @maritomesquita6719
      @maritomesquita6719 4 ปีที่แล้ว

      why?

    • @OrionFH
      @OrionFH 4 ปีที่แล้ว +9

      @@maritomesquita6719 Probably just started programming.

    • @maritomesquita6719
      @maritomesquita6719 4 ปีที่แล้ว +2

      @@OrionFH must be

    • @beoxsgaming9388
      @beoxsgaming9388 4 ปีที่แล้ว +1

      @@maritomesquita6719 I am a n00b. I admit it. I was making a half-joke in my comment ("gnashing of teeth). But I've also heard that a lot of talented programmers (and many skilled people in general) always think they're a hack or a fake. "The War of Art" by Steven Pressfield is a good book to read when feeling like this. (Spoiler: It's not just for artists.)
      I've been trying to teach myself through tutorials over the last year or two, but I've learned that not all tutorials are created equal. I'm just experiencing those growing pains of learning a new and different skill. Photography comes easy to me. Programming...... not so much. I'll get there........................eventually.

    • @maritomesquita6719
      @maritomesquita6719 4 ปีที่แล้ว +5

      @@beoxsgaming9388 i feel you, being self taught is hard.. but you did't gave up and if you don give up on something that means it has value, keep it up. if you need help drop you email down bellow i will try to share with you some of the knowledge i have..

  • @phanuwatchalee8690
    @phanuwatchalee8690 3 ปีที่แล้ว

    How can I get visual studio settings like him? the color looks very nice.

  • @giannicrivello2451
    @giannicrivello2451 4 ปีที่แล้ว

    The "We don't have that in Hazel, at all" Cherno

  • @leo_barth
    @leo_barth 2 ปีที่แล้ว +2

    I believe an RNG system would be pretty helpful for a game engine. Especially if you could change the likelyhood of the event that any given number is generated.

  • @kongolandwalker
    @kongolandwalker ปีที่แล้ว

    Usually the phrase "how hard could it be" is a spell which multiplies time by rand_between(3,10).

  • @higtmance3641
    @higtmance3641 4 ปีที่แล้ว

    Would you mind sharing your Visual studio theme? It looks really nice in my opinion, and I have tried to find it for ages

  • @McKayStewart
    @McKayStewart 3 ปีที่แล้ว

    I minored in programming, hats off to you for biting the bullet on your own engine. What problems are you trying to solve with your own engine or are you just doing it for the love of it? I mean, UE 5 looks insane. Also, do you shoot on Red? A) your videos looking amazing B) your camera overheated :]

  • @MasteAlex95
    @MasteAlex95 4 ปีที่แล้ว +2

    Привет Ян, отличные видео :)

    • @MasteAlex95
      @MasteAlex95 4 ปีที่แล้ว +2

      И спасибо за все уроки и проекты что ты ведёшь :)

  • @CodeTechandTutorials
    @CodeTechandTutorials 4 ปีที่แล้ว

    You are one exceptional man.

  • @WhiteSkyMage
    @WhiteSkyMage 4 ปีที่แล้ว

    I spend like 5 days on a freaking GAS system in Unreal and i'm still not done with it...
    DAMN dude, I saw your code and my brain just melted while seeing all that math and matrices. I wish you did a series talking about what kind of knowledge other than the C++ language itself a game developer needs to do this... Do you have a MATH DEGREE or something?

  • @anshulb.9212
    @anshulb.9212 3 ปีที่แล้ว

    idk whether my comment will be lost, but can someone please explain what a sandbox is? ive seen that term in gamedev and game engines everywhere, so what does it really contain?

  • @yahiaghadiry9885
    @yahiaghadiry9885 4 ปีที่แล้ว +1

    great video

  • @drfleka
    @drfleka 4 ปีที่แล้ว

    Hi! I have really good idea for a game. I mean it's so good that i can't believe nobody made something like that yet. I mean that idea will be in full glory in few years, that's why i would like to make it perfect until the time comes.

  • @n4_ku
    @n4_ku 3 ปีที่แล้ว +1

    Can you post the full video of you writing the code? That would be awesome.

  • @yogissjkaio
    @yogissjkaio 4 ปีที่แล้ว

    nice content and a n awesome video, ! 10:20 so, in a hurry to beat the timer :)

  • @zel7579
    @zel7579 4 ปีที่แล้ว +2

    BRO DUDE I LEGIT HAD A CONCEPT FOR A PROGRAMMING LANGUAGE CALLED HAZEL AND A PROTOTYPE