Making a Game With C++ and OpenGL

Sdílet
Vložit
  • čas přidán 14. 07. 2024
  • I Made a Pacman Clone Game with C++ and OpenGL
    Recently I have been working on improving my C++ skills and therefore I decided to create my very first C++ game. I have used C++ before to create engines and other projects but never a game. Therefore, in this video I challenged myself to create the classic Pacman game using C++ and OpenGL. The project uses a custom framework that uses OpenGL, OpenAL and FreeGLUT. Can I successfully create a Pacman clone game or will I fail?
    The video goes over a level editor/creator, player movement, Different types of AI, Collectibles, Highscore, Game Loop and more!
    My Links:
    Discord: / discord
    Instagram: / gabzxd
    Twitch: / officialzyger
    Twitter: / zygerdesigns
    Patreon: / zyger
    Inspiration:
    ‪@Goodgis‬
    ‪@PolyMars‬
    ‪@AIAdev‬
    ‪@Pontypants‬
    ‪@barj‬
    Music:
    All my music is provided via Epidemic Sounds. Under a license.
    #C++ #zyger #gamedev #programming #csharp #cplusplus
  • Zábava

Komentáře • 103

  • @rileyhawksworth8362
    @rileyhawksworth8362 Před 5 měsíci +73

    goose. nice choice. geese are nice.

    • @pyscrap
      @pyscrap Před 5 měsíci +1

      goose? geese? GEESES?

    • @shajden
      @shajden Před 5 měsíci +1

      i agree

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

      no they are not, they are very mean

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

      ​@@shadowlordalphathey're nice to cool people

    • @shajden
      @shajden Před 5 měsíci +1

      @@shadowlordalpha too bad

  • @Rafael-yo6hd
    @Rafael-yo6hd Před 5 měsíci +20

    Nice work! Loved the goose pixel art.
    One thing I would modify is the level creator, instead of using a txt file, I would use a image file and read the color of the pixels. For the long run and customization, would save time and be faster to iterate the level designs.
    But still, great job and keep it up!

  • @duduken20
    @duduken20 Před 5 měsíci +1

    Zyger uploading, another treat for my weekend.

  • @borbzaby
    @borbzaby Před 5 měsíci +15

    Kinda looks like a Goodgis thumbnail but a completely different game. In a good way. It looks awesome

  • @swiftcreepa2096
    @swiftcreepa2096 Před 4 měsíci

    Thats freaking awesome!

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

    ZYGER UPLOAD LETS GOOOO

  • @Diverse_Gaming_Zone
    @Diverse_Gaming_Zone Před 4 měsíci +8

    I love your video I’m 11 years old and learning to code a game but it has been super boring and your making it entertaining🎉

  • @merc.5802
    @merc.5802 Před 3 měsíci

    this is the coolest thing I've ever seen

  • @Claude-bg6ef
    @Claude-bg6ef Před 4 měsíci +2

    Listen, you're really smart, I admire you

  • @tomasberzinskas8960
    @tomasberzinskas8960 Před 5 měsíci

    Great game, I love the goose!

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

    I LOVE YOUR VIDEOS AND C++ ❤

  • @kwameopareasiedu
    @kwameopareasiedu Před 4 měsíci

    Nice one. Currently creating a pacman game in C and ncurses. Just finished a level generator using wave function collapse algorithm.
    Took 2 weeks and multiple attempts to get just that working... 😅

  • @zorymoon_yes_its_me
    @zorymoon_yes_its_me Před 5 měsíci

    The thumbnail almost got me

  • @diwakar_tsn
    @diwakar_tsn Před 5 měsíci +8

    I used raylib for my c++ game pong
    semester project

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

    As someone who wrote C++ for a decent time, I have one tip: AVOID using new/delete if possible.
    For example in your struct Player you define the position as a pointer to a Vector2 (Vector2* position;) instead of a Vector2 directly (Vector2 position;). With the latter the Vector2 is always constructed/destroyed with the Player struct and you won't need to use new/delete manually.
    I guess if you come from C#/Java using the new keyword might seem normal, but in C++ it's usually considered bad practice.

    • @halfbakedproductions7887
      @halfbakedproductions7887 Před 5 měsíci +1

      Unreal Engine expects most things to be done in that way, but it has its own garbage collection going on.
      But yes, what's being used here is susceptible to memory leaks if you forget to free the pointer when the struct falls out of scope. You could use a smart pointer, something like std::unique and std::make_unique I guess.

    • @AdrienTD
      @AdrienTD Před 5 měsíci +1

      @@halfbakedproductions7887 Yes, with large classes nothing wrong with allocating them separately (best with smart pointers), but with small trivial structs like Vector2 it just makes more sense to make the Vector2 part of the struct (composition). Allocating each Vector2 individually on the heap can also cause some issues like memory fragmentation and waste.

    • @MirrorsEdgeGamer01
      @MirrorsEdgeGamer01 Před 5 měsíci +1

      I always try to allocate on the stack whenever possible.

  • @Uranerdbro
    @Uranerdbro Před 5 měsíci +1

    W goodgis thumbnail

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

    Mmyes a banger

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

    C++ game devlopment with no engine is a mark of a great programmer

    • @user-hl7lr8ld2i
      @user-hl7lr8ld2i Před 5 měsíci

      S2d (what she is using) is pretty much an engine)

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

      The video title's misleading af as it makes it seem like she's going at it raw, Carmack style, even so far as tackling the actual rendering pipeline. S2D is in fact only slightly below Godot when it comes to accessibility and solely because there's no GUI (at least I think there's none, it's hard to say, there's almost nothing about it on the net anymore) so you have to code directly, but other than that, the whole library is ready, not surprising since it's just SFML coupled with Box2D. Needless to say, SFML takes care of all the OpenGL-to-Windows linkage crap, you only need to activate it in code.
      Also, what a weird choice of engine... this thing has been dead in the water since it was released back in 2015, the original Github built was moved once to a different repo which has never since been pushed to again. The website's offline, there is zero community around this... why would anybody play around with it if so many better and well supported options are available? It really looks like she just gave a blind shot at whatever the first page of the Google search yielded that required not too much reading into before jumping in.

  • @timmygilbert4102
    @timmygilbert4102 Před 5 měsíci

    Kween is back 🎉

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

    i leave a subscribe, i really enjoy ur content :3 I am waiting for more ;3

  • @Tech_Code127-76
    @Tech_Code127-76 Před 5 měsíci

    Nice

  • @leonardo01570
    @leonardo01570 Před 5 měsíci

    Nice video! What resources did you use to implement 2d texture animation??

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

    The new Dani

  • @benpecto.benpecillton
    @benpecto.benpecillton Před 5 měsíci

    cool channel bro

  • @RealCatDev
    @RealCatDev Před 5 měsíci

    C++ LETS GOOO

  • @JoinasTV
    @JoinasTV Před 5 měsíci +1

    As a goose and gamedesigner myself, I enjoyed your video very much!

  • @marsimplodation
    @marsimplodation Před 5 měsíci +1

    finally some c++ love. Is the source code available? Would love trying out some proper fsm for the enemies, as they seem a bit dull

  • @user-de4mr7uk8d
    @user-de4mr7uk8d Před 5 měsíci +7

    it's a goose. Geese is plural form like feet, teeth, meese

  • @nkanyisoinnocentkhwane3752
    @nkanyisoinnocentkhwane3752 Před 5 měsíci +4

    Is *Project Jude* still on your itinerary?

  • @ItsOnlyTG
    @ItsOnlyTG Před 5 měsíci

    Amazing fucking video

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

    nicee

  • @randomly2000
    @randomly2000 Před 5 měsíci

    I love your Voice 😊

  • @HuntShootRepeat
    @HuntShootRepeat Před 5 měsíci

    question. I have a multiplayer game that I'll be releasing on steam. I can't find a clear answer anywhere. Does steam provide us with the use of their servers? Or do I have to pay for 3rd party servers and implement it to be used in steam?

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

    what about a 3d game in C++ and OpenGL 👀

  • @mattanimations6997
    @mattanimations6997 Před 5 měsíci

    I can’t wait for the second fps devlog (unless you cancelled it)

    • @ZygerGFX
      @ZygerGFX  Před 5 měsíci

      No its coming soon promise. Lots of new stuff :))

  • @TecnocraciaLTDA
    @TecnocraciaLTDA Před 5 měsíci

    Hellooooooo Zygerrr 🇧🇷 🇧🇷

  • @lykoseleutherios
    @lykoseleutherios Před 4 měsíci

    What's the name of the theme that showed in the start of the video

  • @TecnocraciaLTDA
    @TecnocraciaLTDA Před 5 měsíci +1

    Do a 3D game now with opengl, plss, can be simple

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

    But where is the OpenGL part
    Ive been baited

  • @TKaYonYoutube
    @TKaYonYoutube Před 4 měsíci

    I do SDL2 to learn gameDev on C++

  • @Abdullah-ww8yn
    @Abdullah-ww8yn Před 5 měsíci

    Any updates on ur multiplayer fps???

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

    What keyboard are you using😊

  • @musashi542
    @musashi542 Před 5 měsíci

    ever tried Clion ? whats your opinion on it ?

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

    Wouldn't A* or Dijkstra help with generating the level?

  • @foqsi_
    @foqsi_ Před 4 měsíci

    Did you know that a banana is a berry, and a strawberry is not a berry?

    • @ZygerGFX
      @ZygerGFX  Před 4 měsíci

      Wait what... there's no way that's actually true

  • @gruelingpine1857
    @gruelingpine1857 Před 5 měsíci

    It's a goose. Geese is the plural word. Would you try making a game with SDL?

  • @S0ggyW3tW4t4r
    @S0ggyW3tW4t4r Před 5 měsíci

    Why is the goose/geese so horrify

  • @MunaAlaneme
    @MunaAlaneme Před 5 měsíci

    Bro created Pacman Maker

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

    Diagon ally. Poof! Harry? What are you doing down here? 😊

  • @christiankm8820
    @christiankm8820 Před 5 měsíci

    singular: goose
    plural: geese

  • @ResistDemise
    @ResistDemise Před 4 měsíci

    More videos now

  • @IgorBlackHusbandElenaLitun8v0

    good work seniorita. (kohedlo/Imperial Game Engine 2 developer)

  • @TheFrostFyr
    @TheFrostFyr Před 5 měsíci

    Peck-Man

  • @Nemesisardans
    @Nemesisardans Před 4 měsíci

    What do you major in university, why did u decided to go into programming?

  • @thecookieman568
    @thecookieman568 Před 5 měsíci

    Hi! Im trying to become a game dev, if you can, can you please link the background music and sound effects because im having trouble finding good ones.

    • @ZygerGFX
      @ZygerGFX  Před 5 měsíci

      Best of luck. And music and sound effects are from epidemic sounds

  • @Zetoll
    @Zetoll Před 4 měsíci +1

    Do luau pls

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

    SECOND....

  • @danielelskamp5527
    @danielelskamp5527 Před 4 měsíci

    huh

  • @emanuelprieto
    @emanuelprieto Před 5 měsíci

    Its a Duck

  • @PaulMetalhero
    @PaulMetalhero Před 5 měsíci +1

    Good project. But you should not use manual memory management in modern C++

  • @einfachnurbaum6732
    @einfachnurbaum6732 Před 5 měsíci

    Oh girl, it's cool. But I would still using Godot Engine for game making.
    Psst How about a video about Godot Engine?

  • @JasonMortimer3
    @JasonMortimer3 Před 5 měsíci

    learn Rust and make a game with it using Bevy 💖

    • @user-hl7lr8ld2i
      @user-hl7lr8ld2i Před 5 měsíci

      Love to bevy, great engine

    • @n3y
      @n3y Před 4 měsíci

      love to engine, great bevy

  • @that_guy1211
    @that_guy1211 Před 5 měsíci +1

    welp, although i've been learning c++
    i think my worst fear is to actually have to use c++ to anything ,.,
    i'd much rather use a safer and easier language

  • @sarmalevrajitoare
    @sarmalevrajitoare Před 5 měsíci

    like if u wanted to play the game =(

  • @user-hl7lr8ld2i
    @user-hl7lr8ld2i Před 5 měsíci +2

    There was no opengl used here...

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

      Yeah, the only OpenGL code I saw was at around 0:17
      But that was just opening the window and creating the context IIRC. Might've been some GLM stuff as well

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

      ye I was curious too cause I tried to learn openGL some time ago and it was like 70 lines to show a fucking triangle, and when she showed a duck with 2 lines i was like "wait a second"

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

    where is the opengl part XD

    • @QWERTIOX
      @QWERTIOX Před 5 měsíci

      I think custom library handles opengl

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

      This engine is a Frankenstein of SFML and Box2D, they cover all OpenGL stuff. She isn't "making a game with OpenGL" any more than I am "igniting the fuel in the tank by turning the key".

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

      I was curious too, I wanted to learn OpenGL last time and it had like 70 lines of code to show a triangle and she shows ducks in 2 lines of code

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

    FIRST

  • @VineToDay_
    @VineToDay_ Před 5 měsíci

    You look like female Dani.

  • @GuiZeroUm
    @GuiZeroUm Před 5 měsíci

    Whats your LinkedIn?