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

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

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

  • @NNOTM
    @NNOTM 2 года назад +181

    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.

  • @aupaca
    @aupaca 2 года назад +146

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

  • @plebisMaximus
    @plebisMaximus 2 года назад +46

    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

  • @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!

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

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

  • @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.

  • @HoldMeForever
    @HoldMeForever 2 года назад +11

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

  • @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 ?

  • @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

  • @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!

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

    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.

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

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

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

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

  • @spacelem
    @spacelem Год назад

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

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

    amazing work! but please more Ants

  • @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.

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

    Excellent work, looks beautiful!

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

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

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

    Wow! Amazing work! This is looking great

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

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

  • @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 :)

  • @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.

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

    Absolutely fantastic ❤️❤️❤️

  • @DiceDrivenGameDev
    @DiceDrivenGameDev Год назад

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

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

    This looks sooo great!

  • @joe_croupier
    @joe_croupier Год назад

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

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

    thanks for sharing the spring code! looks great!

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

    Amazing work!

  • @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!

  • @呂皓恩
    @呂皓恩 Год назад

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

  • @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)

  • @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....

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

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

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

    Man I really love what you do👻

  • @TheTimeProphet
    @TheTimeProphet 4 месяца назад

    Well done. How did you decide on the screen resolution for the game. Does it resize for different screensizes?

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

    Looks awesome!!

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

    You make it look so easy man 😭

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

    Amazing~! Really awesome~!!

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

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

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

    Impressive work.

  • @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++

  • @raphango
    @raphango Год назад

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

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

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

  • @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 2 года назад

      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 2 года назад

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

    • @tissuepaper9962
      @tissuepaper9962 2 года назад +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.

  • @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.

  • @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?

  • @sebastianwardana1527
    @sebastianwardana1527 Год назад

    thats insane...

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

    cool result

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

    Really cool 👌

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

    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.

  • @Tomab3
    @Tomab3 Год назад

    Wow just wow

  • @vintagekyoshodotcom
    @vintagekyoshodotcom Год назад

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

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

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

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

    Nice Music!!

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

    Centipede next please?

    • @623-x7b
      @623-x7b 2 года назад

      Yes please

  • @icemojo
    @icemojo 7 месяцев назад

    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!

  • @hawk8566
    @hawk8566 6 месяцев назад

    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.

  • @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 :)

  • @mmankt
    @mmankt Год назад

    lovely :D

  • @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

  • @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?

  • @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?

  • @Trapezoideris
    @Trapezoideris 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

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

    Like it

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

    cool

  • @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! 😁

  • @shadowop-bgmi2202
    @shadowop-bgmi2202 2 года назад

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

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

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

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

    Do we have a download link for this?

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

    github?

  • @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/

  • @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 года назад +1

    & tell me you are good at math

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

    What does this have to do with ants?

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

    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? )

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

    Are you college student?