Creating a Space Invaders clone using my C++ engine and SFML

Поділитися
Вставка
  • Опубліковано 19 чер 2024
  • Step by step process of the creation of my Space Invaders clone using raw C++ and SFML.
    Steam link store.steampowered.com/app/18...
    A big thanks to AlexIsLouis for the sprites, musics and sounds :D
    His channel / @alexislouis2320
    The music • Space Invaders | Remix
  • Наука та технологія

КОМЕНТАРІ • 131

  • @osartur
    @osartur 2 роки тому +145

    congratulations you do a great job, i want to be a programmer like you one day

  • @NNOTM
    @NNOTM 2 роки тому +179

    Really cool.
    Probably makes sense to add the pixel grid overlay before distorting the screen shape, since the shape would affect the grid as well.

    • @stephaneduhamel7706
      @stephaneduhamel7706 2 роки тому +12

      Shaders are often counter-intuive. In this case, if you want to have the distortion affect the grid as well as the image, it's better to do the "distortion" first.
      When doing the distortion, what happens is that the coordinates of each pixel are transformed to correspond to another texel on the image. You can then use these same transformed coordinates to draw the grid.
      And the effect would be pretty much the same (though with possibly better quality, and faster) than if we first added the grid on top of the image, and then distorted the new image in another pass.(it would use 2 shaders instead of 1)

    • @lepels
      @lepels 2 роки тому +4

      @@stephaneduhamel7706 Is there not also a chance of blurring the pixel grid? You'd of course want crisp crt lines, not them being blurred because of a distortion effect.

    • @BranchBruh
      @BranchBruh 2 роки тому +3

      the human brain doesnt think like that. it adds more emersion to the game if you do it like this. since the goal is to make it look like a rounded tv screen your brain seeing the squares curve will actually give you the image better.

  • @plebisMaximus
    @plebisMaximus 2 роки тому +45

    You're brilliant, man. Doing as much as you can in just code is incredible, really shows how far you can get with nothing but C++ and an iron will.

  • @dandymcgee
    @dandymcgee 2 роки тому +48

    Hah, love it. I like how you somehow made this a tutorial withing droning on for hours about each line of code. Straightforward, beautiful and to the point. I'm not a big fan of bloom in games; I feel like every single person I've seen use bloom applies like 700% too much and it just washes out the whole scene, but after you applied the pixel grid it toned it down a bit so it didn't look as bad. The end result was quite impressive. Thanks for sharing.

    • @PezzzasWork
      @PezzzasWork  2 роки тому +25

      Yes it's easy to over use bloom :D in this case I indeed forced it a bit because of the crt shader which tends to mitigate the effect

  • @GMPranav
    @GMPranav 2 роки тому +13

    The game looks so neat! I would like to see an option to disable the chain labels though, they just cover the beautiful particle effects.

  • @supereligo
    @supereligo 2 роки тому +15

    I love the way you have implemented the modern touches. I especially like how dynamic feeling you have made the game with the springs.

  • @iamdozerq
    @iamdozerq 2 роки тому +9

    Springs and physics alone make a lot of fun already, all other things just multiply it. Great work, dude!

  • @pixeltochi4961
    @pixeltochi4961 2 роки тому +12

    I'm very happy that I discovered your channel a year ago. You inspired me so much by your videos that I learned C++ and SFML library which helped me understand a lot of things that I didn't know about physics and maths by making different programms/games. and now, I'm making my own engine :D

    • @jhoanmartinezsilva2609
      @jhoanmartinezsilva2609 2 роки тому +2

      What should learn first, smfl or create my own engine?

    • @pixeltochi4961
      @pixeltochi4961 2 роки тому

      @@jhoanmartinezsilva2609
      You should learn SFML first, then make your own engine by the help of SFML :0

    • @PezzzasWork
      @PezzzasWork  2 роки тому +5

      Thank you very much! your message makes me really happy :) good luck with your projects, I wish you success in doing what you want :D

    • @Momoyon
      @Momoyon 2 роки тому +1

      Im having trouble linking my header files in vscode... Any help?

    • @pixeltochi4961
      @pixeltochi4961 2 роки тому

      @@Momoyon
      I can help, but I just need to know how are you trying to link them or do you just don't know how to link them with vscode ?

  • @eboatwright_
    @eboatwright_ 2 роки тому +8

    This is amazing! I love how polished the final game looks!

  • @HoldMeForever
    @HoldMeForever 2 роки тому +11

    It looks so good that I want to download and play it!

  • @alittlewooper9276
    @alittlewooper9276 2 роки тому +1

    i can't believe you added a remix of prodigy's "invader's must die", that is the cherry on top

  • @softed
    @softed 2 роки тому +1

    The Prodigy - Invaders Must Die remix fits so well not gonna lie

  • @jannesnagel6995
    @jannesnagel6995 Рік тому

    Awesome. Love the quality of the end result. You inspired me to pick up one day mini jams again to try my engine on smaller stuff!

  • @francisxavier1633
    @francisxavier1633 Рік тому

    Excellent work, looks beautiful!

  • @Mat-pu7sk
    @Mat-pu7sk 2 роки тому

    I really enjoy these videos. :)
    They're very nice, and I like having them in the background while I work.

  • @TreeFrogOnATree
    @TreeFrogOnATree 2 роки тому +3

    Great stuff, as always.

  • @soma_donat
    @soma_donat 2 роки тому

    Wow! Amazing work! This is looking great

  • @sheepthehack
    @sheepthehack Рік тому

    All this shows is that good artist trumps a massive physics brain every single day of the week when it comes to video games :)

  • @roach590
    @roach590 Рік тому

    Wow, I really didn't expect it to be so polished. This is great.

  • @spacelem
    @spacelem Рік тому

    Wow, that actually looks really cool and fun. I'd play that!

  • @YannSchmidt
    @YannSchmidt Рік тому

    This is exactly what I wanted to make. You are an inspiration !
    Just need to learn C++ now...

  • @MysteryPancake
    @MysteryPancake 2 роки тому

    thanks for sharing the spring code! looks great!

  • @krccmsitp2884
    @krccmsitp2884 Рік тому

    This looks sooo great!

  • @yemyint9725
    @yemyint9725 2 роки тому

    Absolutely fantastic ❤️❤️❤️

  • @W4ReLL
    @W4ReLL 2 роки тому +1

    Amazing work!

  • @experimentierer3909
    @experimentierer3909 2 роки тому

    Looks awesome!!

  • @raducristiandimitrie
    @raducristiandimitrie 2 роки тому +3

    amazing work! but please more Ants

  • @c3stoy
    @c3stoy 2 роки тому

    Amazing~! Really awesome~!!

  • @joe_croupier
    @joe_croupier 10 місяців тому

    11:07 fantastic! All that’s missing is a 2’ tall ashtray full of stinking mint gum butt ends 😂😂😂
    Blown away thxs !!

  • @DiceDrivenGameDev
    @DiceDrivenGameDev 7 місяців тому

    Wow, I couldn't do something with same level of polished not even with GameMaker (even if possible), congrats looks amazing !

  • @s4degh
    @s4degh 2 роки тому

    Impressive work.

  • @dandymcgee
    @dandymcgee 2 роки тому +1

    A tiny bit of torque spring on the player ship could feel nice. But it's totally not necessary. Too many springs makes everything feel too loose, and it's nice to have a few things be very crisp and stand out as special. It also helps avoid confusion about where the player's hitbox is.

  • @Teegik
    @Teegik 2 роки тому

    Really cool 👌

  • @OneEgg42
    @OneEgg42 2 роки тому

    that is the coolest space invaders remake game I have ever seen!

  • @louisrubet4626
    @louisrubet4626 2 роки тому

    Man I really love what you do👻

  • @lepels
    @lepels 2 роки тому

    Nice little Prodigy ode in the music ;) I kept thinking "what is that from??" until I realized it's literally "Invaders Must Die" by The Prodigy.

  • @robertjjack
    @robertjjack 2 роки тому

    cool result

  • @itay1232
    @itay1232 2 роки тому +3

    Wow! Amazing job on this one as always! Will you please share this project with us? I'd love to read some of your code to get better, (and maybe to play the game a bit, it looks quite fun)

  • @richardleandro8694
    @richardleandro8694 Рік тому

    Nice Music!!

  • @marseele6683
    @marseele6683 2 роки тому +1

    You make it look so easy man 😭

  • @sebastianwardana1527
    @sebastianwardana1527 Рік тому

    thats insane...

  • @Beatsbasteln
    @Beatsbasteln 2 роки тому

    you are great at making games feel vibrant after applying only a little bunch of shaders

  • @user-uu5ml5dc6n
    @user-uu5ml5dc6n 10 місяців тому

    This is so good!!! I wonder how long it takes you to build this.

  • @convince_me
    @convince_me Рік тому

    very nice

  • @mmankt
    @mmankt Рік тому

    lovely :D

  • @BillyH6
    @BillyH6 2 роки тому +2

    Are you releasing this as a game on maybe steam? Is it done or will you be developing further on it?

  • @amosnimos
    @amosnimos Рік тому

    cool

  • @mirrork8895
    @mirrork8895 Рік тому

    Like it

  • @artemonstrick
    @artemonstrick 2 роки тому +1

    Make Contra! With such effects I am sure shooting and destruction will be 100000% fun

  • @rukna3775
    @rukna3775 2 роки тому

    how did u break the things? and how did u make ur custom enemy movement patterns?

  • @Bingo901
    @Bingo901 8 місяців тому

    Wow just wow

  • @charetjc
    @charetjc Рік тому

    I've never understood how one would relocate colors to another pixel with shaders. Impressive result overall.

  • @raphango
    @raphango 11 місяців тому

    Woooooooooooooowsome!🎉🎉 Just loved it! God bless you! How can I play it?

  • @hermenthicclol1848
    @hermenthicclol1848 2 роки тому +1

    Wow super cool, hope this will be a game one time:)

    • @PezzzasWork
      @PezzzasWork  2 роки тому +1

      Thank you! It is available for free on steam if you want to try it store.steampowered.com/app/1885460/Invasion_From_Space/ :)

    • @hermenthicclol1848
      @hermenthicclol1848 2 роки тому

      @@PezzzasWork ooooo cool thanks

    • @hermenthicclol1848
      @hermenthicclol1848 2 роки тому

      @@PezzzasWork i am downloading the game now... and i have it now, great :)

    • @PezzzasWork
      @PezzzasWork  2 роки тому +1

      Hope you will like it!

  • @nicholaslaux
    @nicholaslaux 2 роки тому +2

    What are the memory/storage requirements of the compiled code in the final version? I'm curious if this could have, in theory, been made back when c++ was released, if you could take the coffee from all of the libraries back with you, or if any level of modern hardware is required for any of the physics/graphics requirements?

    • @RomanSteiner_xD
      @RomanSteiner_xD 2 роки тому

      Shaders require a GPU with shader support. I think the first "T&L" hardware came out in the 90s, like 10 years after c++

  • @hawk8566
    @hawk8566 23 дні тому

    Can someone provide a link for further details on implementation of spring joints in sfml? I really liked the wobbly movement of the enemies and want to try that myself.

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

    Amazing work.
    Is there any chance the game is going to be available as a tutorial series?
    Anytime someone searches for C++ game programming with either SDL or SFML, they're either 10 years old, or the final result game is boring as heck. We need more high quality C++ tutorials which produces high quality end products. Please!

  • @MaroneQ
    @MaroneQ 2 роки тому

    can you make a tutorial where you show how to get the same versions of SFML and compiler, and how to install it?

  • @thehambone1454
    @thehambone1454 2 роки тому +1

    Next gen space invaders! How cool! How did you approach breaking apart the squares? Just broken into a lot of triangles?

    • @tissuepaper9962
      @tissuepaper9962 Рік тому

      My guess is:
      1. Pick a certain number of random points inside the square to be the vertices where different cracks intersect.
      2. Calculate the dual of the Voronoi diagram for those points
      3. Each connected region in that diagram is instantiated as a physics object, and the original square is deleted.
      Alternatively, if you don't care about making sure that the debris can be reassembled into the original image, you could just manually make a couple of different particles out of parts of the spaceship sprite, and randomly spawn them at the same moment that you delete the original ship and render the smoke.

    • @multiarray2320
      @multiarray2320 Рік тому

      @@tissuepaper9962 this sounds like a lot of work for this small effect.

    • @tissuepaper9962
      @tissuepaper9962 Рік тому +1

      @@multiarray2320 the point of the "hard way" is to make the debris look more realistic. One should be able to take the debris and reassemble it into the original sprite, and every sprite shouldn't break apart exactly the same way.
      It really isn't that much extra work, and you could precalculate a few different options to make it faster at runtime.

  • @operator8014
    @operator8014 Рік тому

    No gravity in space! The debris should just travel in whatever direction it was already going till it collides with something or exits the screen.

  • @AndyPynch
    @AndyPynch 2 роки тому

    can you please do a code tutorial on this? Or at least open source it? I wanna do stuff like this but have no idea where to begin

  • @jacobpeifer2875
    @jacobpeifer2875 2 роки тому

    My only suggestion would be that the debris from the destroyed aliens should either explode outwards in all directions, or the player's ship should be a tank with the ground beneath it. It doesn't make sense for everything to be subjected to a such a significant gravitational force if they're fighting in space. Unless the player is defending an absolutely gigantic space station, or the battle is taking place in the earth's upper atmosphere? Which in either case should be represented graphically.

  • @jhoanmartinezsilva2609
    @jhoanmartinezsilva2609 2 роки тому

    What should I learn, smfl first, engine games first? It's so fun, any book or course you recommend, I really love your vids

    • @PezzzasWork
      @PezzzasWork  2 роки тому +1

      SFML is a good start since it will allow you to get your hands dirty on more and more complex projects until you create your own game :)

  • @MirzaMughal86
    @MirzaMughal86 Рік тому

    Awesome. Although its space, why are the pieces falling downwards.

  • @rototype786
    @rototype786 2 роки тому

    Do we have a download link for this?

  • @chriswinslow
    @chriswinslow 2 роки тому +4

    This actually looks very fun to play. Everything looks so well put together. Is there a download for it for your fans? Lol

  • @rgbeans
    @rgbeans 2 роки тому +4

    Centipede next please?

  • @CristiNeagu
    @CristiNeagu 2 роки тому +2

    2:44 So... what happens if an alien is identified as, say, the right hand blue limit (3:16) and then the last left hand orange block is destroyed? Will the blue block bounce off of the left hand wall if there is no orange block?

    • @VestigialHead
      @VestigialHead 2 роки тому +4

      When the orange block is destroyed the code will look for the next leftmost alien which in this instance will be the same as the rightmost alien. So that alien will now be the orange and the blue.

    • @puppergump4117
      @puppergump4117 2 роки тому

      @@VestigialHead A mixed-color alien....

  • @silvertakana3932
    @silvertakana3932 2 роки тому +3

    was this Box2D or your own physics engine?

    • @PezzzasWork
      @PezzzasWork  2 роки тому +9

      It is my own physics engine

    • @silvertakana3932
      @silvertakana3932 2 роки тому +5

      @@PezzzasWork that is very impressive! Can it handle destruction? Or is it prebuild mesh? Is this available for download?

  • @rukna3775
    @rukna3775 2 роки тому

    github?

  • @ShortBusTrip
    @ShortBusTrip 2 роки тому

    Very cool. I like the spring. I’m able to pause and see the strict but how do you implement it on your enemy pawns?

  • @shadowop-bgmi2202
    @shadowop-bgmi2202 2 роки тому

    Hey Help us how to master c++ it would be great

  • @HoldMeForever
    @HoldMeForever 2 роки тому +1

    Where can I download/play this?

    • @PezzzasWork
      @PezzzasWork  2 роки тому +2

      I am working on a steam release, will post something when it will be ready

    • @HoldMeForever
      @HoldMeForever 2 роки тому +1

      @@PezzzasWork Thanks a heap, I can't wait! 😁

  • @gabrielfuhr5964
    @gabrielfuhr5964 2 роки тому

    This could be released as a AAA space invaders remake and nobody would know that it was made by 2 people.

  • @boco000
    @boco000 2 роки тому

    ...Can i play your games? I wanna do that every game that you made.....PLZ!

    • @PezzzasWork
      @PezzzasWork  2 роки тому

      This one is on steam store.steampowered.com/app/1885460/Invasion_From_Space/

  • @kahwigulum
    @kahwigulum 2 роки тому +2

    What does this have to do with ants?

  • @EST_111
    @EST_111 2 роки тому

    Are you college student?

  • @shadowop-bgmi2202
    @shadowop-bgmi2202 2 роки тому +1

    & tell me you are good at math

  • @nemesisurvivorleon
    @nemesisurvivorleon Рік тому

    Too many clones... imagine if the popular games arriving at the right time were different from space invaders, tetris, mario, super breakout, etc. How crazy would it be if a strategy had been popular lol. I guess everyone was playing cards and chess for that. ( "strategy games existed though". And they were the most popular games at the time that get talked about and cloned the most to this day? )

  • @vintagekyoshodotcom
    @vintagekyoshodotcom Рік тому

    That’s very impressive. I would love to know how you did all that.