C++ Developer Learns Python

Sdílet
Vložit
  • čas přidán 17. 06. 2024
  • I'm a C++ developer, but I tried to learn Python by making a game with the Pygame graphics library for the Pygame Community New Years Jam. In 2 days, I was able to put together a simple game (Flappy Bird meets Cookie Clicker?), and I learned a lot along the way!
    Check out Flappuccino here: polymars.itch.io/flappuccino
    → Source Code: github.com/PolyMarsDev/Flappu...
    Best Height Adjustable Desk Under $300 ($15 discount): bit.ly/3sKPkHe
    → Twitter: / polymarsyt
    → Twitch: / polymars
    → Join the PolySpace Discord: / discord
    --Chapters--
    0:00 Intro
    0:41 Setting Up Python
    1:20 Streaming?
    1:29 Game Idea
    2:25 Implementing Basic Gameplay
    3:15 Adding Sprites
    4:06 Collectible System
    5:18 Basic UI
    6:01 Upgrade System
    7:42 Fancy Background
    8:09 Finishing Touches
    8:47 Conclusion
    --Music--
    "Nocturnal" - PolarChips ( • Nocturnal (8 Bit Jazz) )
    "Swing" - PolarChips ( • Swing (8 Bit Jazz) )
    "Glider" - INTL CMD ( / intlcmd )
    "Breeze" - PolarChips ( • Breeze )
    "EDM Detection Mode" - Kevin Macleod (incompetech.com)
    "Sneaky Snitch" - Kevin Macleod (incompetech.com)
    "Operatic 3" - Vibe Mountain ( • 🎵 Operatic 3 - Vibe Mo... )
    --If you liked this video, here are similar ones you might enjoy!--
    PolyMars - Learning SDL2 in 48 Hours - GMTK Game Jam 2020
    • Learning SDL2 in 48 Ho...
    PolyMars - Making a Game Using Discord's Bot API
    • Making a Game With Dis...
    PolyMars++ - Teaching an Absolute Beginner to Code
    • Teaching an Absolute B...
    CodyCantEatThis - I Made Super Mario Bros but it's 3D
    • I Made Super Mario Bro...
    Dani - He said I Couldn’t Make a 3D Game… So I Made One!
    • He said I Couldn't Mak... ​
    Dani - 6 Months of Learning Game Development in Unity (Progress & Result) • 6 Months of Learning G... ​
    Sam Hogan - I Made a Game with Intentional Bugs
    • I Made a Game with Int... ​
    Sam Hogan - I Made the Hardest Game Ever
    • I Made the Hardest Gam... ​
    Mythic Legion - Remaking My First Game! | Devlog #1
    • Remaking My First Game...
    Randall - Programming a New Physics Engine for my Game
    • Programming a new phys...
    --Descriptive Description--
    I thought it would be fun to try to learn Python by challenging myself to create a video game in under 48 hours (2 days) using the Pygame graphics library. Yes, I know Python probably isn’t the best language for making a real-time game, but it’s definitely fast enough for my simple 2D games, like the one I created with SDL2 in 48 hours for the 2020 GMTK Game Jam.
    For this devlog challenge, I found a week-long game jam: the PyGame Community New Years Jam, but I decided to shorten it to 2 days and give myself only 48 hours to make a game.
    First things first, I had to set everything up, which actually ended up being pretty easy. I ran the Python installer for Windows, added the Python extension to VS Code, and installed Pygame through pip. Now we can get into the actual game-making! I decided to try to make a game similar to Flappy Bird, but vertical-you would collect coffee beans to upgrade stats like flap strength and speed in order to fly as high as possible.
    I found a Pygame example that showed me how to draw a square to the screen. Next was gravity, which is very simple for a game like this. Every frame, I add a fixed value to a y velocity variable, then I add the y velocity to a y position variable, and I draw the square at that y position. Then, I figured out how keyboard input worked in Pygame, and made it so when you press a key, the velocity variable is set to a negative fixed amount, allowing the blue square to flap. I also gave the player an x velocity that flips if its x position is less than 0 or greater than the screen width. Now the core mechanic of the game is done-you can flap and bounce off the walls.
    I created graphics for the player and coffee bean collectibles, and created a “camera” that follows the player-basically I just offset everything on the screen by the player’s y position. For the coffee bean functionality, I made a Collectible class with Vector2 to store its position, and wrote a function for rectangle collisions. I draw a list of beans above the player, and if any bean collides with the player I reset its position to a random range above the player. And with that, the main game is finished.
    I finished off the project by adding UI and other visuals, like a colorful background, and creating a shop (using bean currency) with three upgrades-one that increases your flap strength, one that makes you faster, and one that makes more coffee bean collectibles spawn. And that's where the challenge ended! This was learning Python in 48 hours with Pygame.
  • Věda a technologie

Komentáře • 2K

  • @PolyMars
    @PolyMars  Před 3 lety +3109

    what should I learn next? (subscribe and I legally have to listen to you)

    • @jmejuniper
      @jmejuniper Před 3 lety +81

      Well... The game jam WAS called New Years game jam...

    • @psyquacks
      @psyquacks Před 3 lety +17

      hey polymars you weirdly sound and look like this guy called polygon donut

    • @Povilaz
      @Povilaz Před 3 lety +5

      It's fine. It's a good video.

    • @Ace-lw8kh
      @Ace-lw8kh Před 3 lety +4

      so it did

    • @gundelf7434
      @gundelf7434 Před 3 lety +2

      haha yeah, I remembered the stream, keep doing it please!

  • @numbertoast764
    @numbertoast764 Před 3 lety +8721

    You have the perfect game dev video
    -You learn a new programming language
    -You create an arbitrary deadline
    -You make a flappy bird clone

    • @QuantumScratcher
      @QuantumScratcher Před rokem +339

      - You get sponsored by some random game engine

    • @nightmanmain4858
      @nightmanmain4858 Před rokem +93

      @@QuantumScratcher -You made the flappy bird clone better with the game engine

    • @ThePapaja1996
      @ThePapaja1996 Před rokem +7

      doodle jump this time do

    • @numbertoast673
      @numbertoast673 Před rokem +5

      @@ThePapaja1996 ok yoda

    • @aqzp.
      @aqzp. Před rokem +8

      @@nightmanmain4858 - You lose your sanity

  • @alanrigden2522
    @alanrigden2522 Před rokem +6510

    This guy has coded something more impressive in 48 hours then I have in my 2 years

    • @display1235
      @display1235 Před rokem +285

      But you are capable of coding something better than this right?
      If you can’t i highly doubt you’ve been coding for two years.

    • @Theguywithspectacles
      @Theguywithspectacles Před rokem +80

      @@display1235 if he works on projects then He should be able to do many cool things

    • @Tobsson
      @Tobsson Před rokem +449

      @@display1235 might have been stuck in tutorial hell for two years only learning to do stuff theoretical and then panicks once the text editor is up.

    • @Sol4rOnYt
      @Sol4rOnYt Před rokem +19

      like seriously ur not wrong

    • @w-iz
      @w-iz Před rokem +8

      Frrrrrrr 😂

  • @echo2302
    @echo2302 Před rokem +1569

    Dude made more progress in 48 hours than I did in 4 months

    • @Sol4rOnYt
      @Sol4rOnYt Před rokem +96

      its cuz he knows other languages, its rlly messy code tho

    • @tophat593
      @tophat593 Před rokem +43

      @@Sol4rOnYt Meh, it wasn't that bad. He had a decent idea of structure, that's not language specific.

    • @cxngo8124
      @cxngo8124 Před 9 měsíci +1

      Same 😂 but my excuse is I'm learning Rust as my first language

    • @faisfaizal5194
      @faisfaizal5194 Před 7 měsíci +4

      Dude already got the basics down, so transitioning to different language isn't hard.. Think of it like a chef learning how different countries cook food. Ofc it'll be a different story for a trainee

    • @mqtic
      @mqtic Před 6 měsíci +1

      Because you learn best with a clear goal mind.

  • @tomsterbg8130
    @tomsterbg8130 Před rokem +660

    It took me 10 years to start mastering Minecraft commands and 2 days to make my first datapack. Don't underestimate yourself. You've done amazingly well for someone new to a language!

    • @gruby21376
      @gruby21376 Před rokem +60

      i was amazing at minecraft commands, then 1.13 dropped...

    • @qwart22
      @qwart22 Před rokem +16

      @@gruby21376 1.13 💀

    • @YourMom-wi5to
      @YourMom-wi5to Před 8 měsíci +4

      10 years😂 thats just u man

    • @skycaptain95
      @skycaptain95 Před 8 měsíci +10

      ​@@YourMom-wi5tohe's obviously saying that he thought about doing it, but didn't, for the first decade. Then it actually only took 2 days

    • @MukundanGopalachary-ns6ir
      @MukundanGopalachary-ns6ir Před 6 měsíci +4

      well tbh its easy to adapt to python when u are very good at c/c++

  • @c0rlea
    @c0rlea Před 3 lety +6077

    "Terrible at coding"
    Meanwhile he learns python in just a few hours and builds a game, while for me it took me 3 days to install and setup python

    • @grgry06
      @grgry06 Před 3 lety +517

      he probably has foundation already since he knows basically the most of other prog languages like Java.

    • @grgry06
      @grgry06 Před 3 lety +161

      But ye, it took me literal 2 months to learn Javascript... Now I'm learning python. Goodluck on both of us 😉

    • @grgry06
      @grgry06 Před 3 lety +11

      @@niracaldwell ty

    • @astroorbis
      @astroorbis Před 3 lety +2

      lmao r/relatable

    • @legrinu
      @legrinu Před 3 lety +127

      If you know other programming languages you can learn Python in about two hours max, because it is Like other languages but for 3 year olda

  • @TrenBlack
    @TrenBlack Před 3 lety +2137

    I didn't know '97 Matt Damon made games

  • @TheNoemad
    @TheNoemad Před rokem +198

    I just finished my first-semester learning python at uni and this is far beyond anything I have made. I think it's really cool and stuff like this inspires me to keep learning!

    • @PolyMars
      @PolyMars  Před rokem +22

      That's awesome! Keep it up

    • @useranonymous3354
      @useranonymous3354 Před rokem +7

      Did you go into uni with no/little coding experience?

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

      @@useranonymous3354 doesn't matter (most of the time, if you're asking for uni resources check with the unis you aim for)

  • @Stabby666
    @Stabby666 Před rokem +1027

    Going from C++ to Python is like Picasso deciding to make potato prints 🤣

    • @onebigsnowball
      @onebigsnowball Před rokem +118

      @@bytekast Yet the things you do in c++ can be done by kids in python.
      Just because you use a bloated old language doesn't mean you're a better programmer. Most experienced python programmers could learn c++ in a few days if they wanted to.

    • @willr0073
      @willr0073 Před rokem +37

      @@onebigsnowball Yet most of the kids wouldn't be able to code any good game wdym???

    • @theseangle
      @theseangle Před rokem +147

      @@bytekast python is being used because of the following reasons:
      1) the development speed it brings
      2) it's interpreted, meaning a project doesn't take 40 minutes to compile each time you make a small change
      3) the amount of ready to use packages. Each package may save you 5 hours of brainstorming and coding.
      4) How easy it is to visualize data
      5) the clarity of code that it has. Other developer may glance over a piece of code, and correctly guess its purpose.
      In more low level languages, all you see is quadrillions of pointers, addresses, garbage collection mechanisms, and it takes more code and way more time to understand the purpose of the code.
      Granted, some of this depends on the developer - how well can he code self-documented code, how well can he refactor, how consistent are his conventions throughout the codebase, does he prioritize following the patterns over speed of development etc. But all of this takes time, and anyway...
      ...done is better than perfect

    • @theseangle
      @theseangle Před rokem +61

      @@bytekast and yeah python shouldn't be used in gamedev, unless it's simple 2d games and/or for educational purposes.
      With python you're more focused on logic, the important algorithm itself. In C level languages you're constantly worrying about not causing a memory leak and implementing features that should be already available by default. Even such simple things/patterns as singletons

    • @theseangle
      @theseangle Před rokem +18

      @@bytekast lol why do you like your own comments. And yeah I agree, but I think you misunderstood me as a python fanboy. No, i just listed why python is preferred in many tasks. I can write as much about advantages of C level languages. I did that because in the beginning of this reply section you seemed very blind and all you worried about was performance (speed of execution), but not speed of development and production. C like languages were developed when computers RAM was in the kilobyte range, and CPU clocks were very low as well. Of course you would prioritize performance.
      But nowadays, it's not always the most important thing. What brings more money quicker is used where it's possible. Of it's a performance dependent task, like heavy games, then of course you'll use c++

  • @wowthatsfair7982
    @wowthatsfair7982 Před 3 lety +2583

    Everyone:
    Yeah imma try to learn python like this year but it might take longer
    Polymars:
    Yeeeaaah 2 days sounds pretty legit not gonna lie

    • @mariaenigma4294
      @mariaenigma4294 Před 3 lety +61

      As a pygame learner, this guy is REALLY quick. Idk the help he got from his fans, but this man has talent

    • @monochromeart7311
      @monochromeart7311 Před 3 lety +178

      @@mariaenigma4294 look at the code itself, it's a really messy code that doesn't even have proper function distribution and most of it is literally just using pygame functions and basic python syntax, most of what he did are stuff he already knew from previous languages.

    • @jayakrishnans2785
      @jayakrishnans2785 Před 2 lety +12

      @illusionist 😂, I was wondering how the hell did he learnt the basics of python and then learned a module then made a game within 2 days. Now I understood how he did that

    • @jayakrishnans2785
      @jayakrishnans2785 Před 2 lety +4

      @illusionist oh thanks bro, I have been to coding for 2-3 years, I was not consistent 😅, now I have learnt pygame module, currently I'm making games😀

    • @mgames3209
      @mgames3209 Před 2 lety

      I took me three months

  • @StijnEngels
    @StijnEngels Před 3 lety +66

    You're truely inspiring me on trying to take up learning a coding language as well. Even though you struggled at first you got an amazing result tbf

  • @deanlongmire6166
    @deanlongmire6166 Před rokem +116

    You will make it far in programming for sure , I’m a CS major in college and I really wish that I had started in high school. No doubt your first couple years of classes will be super easy if you plan on going to college

    • @theburgersystem126
      @theburgersystem126 Před rokem +10

      I feel like I didn't get programming until super recently (I'm a junior in college) and I started senior year of hs. It really takes a while to get going depending on how fast or slow of a learner you are (I'm in the slow learner camp bt dubs).

    • @chlodowigi1833
      @chlodowigi1833 Před rokem +6

      He's a good autodidact, and every knowledge about programming is online. I think it will be far more efficient, cheaper and funnier for him to skip college altogether. He can already find a job easily and continue to learn from there. What do you think about it?

    • @Lars16
      @Lars16 Před rokem +16

      @@chlodowigi1833 You are right, he will be able to get a job. But what happens to his youth and personal development? Going to university was some of the best years I've had in terms of personal and social development. It really got me out of my shell and made me so much more sure of myself.
      I studied engineering and it taught me a lot about managing large projects, which some of my colleagues who are software devs lack.

    • @ankitsaha9024
      @ankitsaha9024 Před 11 měsíci +3

      @@chlodowigi1833 Computer science is a LOT more than just programming

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

      Why not wish you learned it in middle school

  • @MilfSlayr
    @MilfSlayr Před 3 lety +489

    It would be pretty interesting seeing you learn different programming languages and making games out of them. Can't wait to see what you do next!

    • @nvcbl
      @nvcbl Před 2 lety +20

      Now tell him to make a game in raw, uncompiled, executable bytecode

    • @spoopyscaryskelebones3846
      @spoopyscaryskelebones3846 Před 2 lety +4

      @@nvcbl tic-tac-toe time!

    • @alquinn8576
      @alquinn8576 Před rokem +4

      I'm hoping for maybe a game in Excel that runs on the Queen of All Programming Languages (VBA!)

    • @theseangle
      @theseangle Před rokem +1

      @@nvcbl why do you have to be so low level about it, at least Assembly

    • @puppergump4117
      @puppergump4117 Před rokem

      @@nvcbl That's a dead language

  • @Goodgis
    @Goodgis Před 3 lety +247

    3:25 You literally are the GIMP master. I've never seen someone works so fast in it before! XD

    • @daisuki9296
      @daisuki9296 Před 3 lety +18

      Is this kink shaming

    • @leontius5502
      @leontius5502 Před 3 lety +28

      GIMP is an art program, not a kink

    • @daisuki9296
      @daisuki9296 Před 3 lety +15

      @@leontius5502 wtf you're wrong gimp is kink of being sex slave, inkscape name came from an incident where some idiots driving tank full of ink accidentally spilt it all over a beautiful garden, name blender was inspired from literal blender.. because it's creator had a thing for blenders, it's common sense.. everything's named after kinks or incidents

    • @Banana-fl5ww
      @Banana-fl5ww Před 3 lety +52

      @@daisuki9296 u ok

    • @daisuki9296
      @daisuki9296 Před 3 lety +9

      @@Banana-fl5ww no

  • @victoriamitchell413
    @victoriamitchell413 Před rokem +34

    Now Learn C in a week

    • @Simple_OG
      @Simple_OG Před měsícem +2

      Easy just don't learn pointers

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

      now learn rust in a month

    • @Vortex-qb2se
      @Vortex-qb2se Před měsícem +2

      He already knows C if he knows C++ 💀

  • @buddyroach
    @buddyroach Před rokem +21

    The editing in this video is very good. I especially love the stick poking the coffee bean. Made me laugh. I can tell you're very talented with video editing.

  • @2ARM2
    @2ARM2 Před 3 lety +62

    Wow, he's actually alive, thought he was going to leave for another few months.

  • @floreii
    @floreii Před 3 lety +92

    The line "for bean in beans" just gets me

    • @eggmeister6641
      @eggmeister6641 Před 3 lety +1

      same

    • @vekyll
      @vekyll Před 2 lety +10

      It's normal in Python. Dave Rhodes even had a minirant of how he can't say "for request in requests" without confusing everyone (requests is a very popular Python library for HTTP). :-D Also, you can't say "for i in is" since "is" is a keyword in Python, but that's another problem. :-]

  • @gokusgunz8002
    @gokusgunz8002 Před rokem

    This is the first dev video I’ve seen that was educational funny and entertaining keep up the good work!

  • @rvieirasz19
    @rvieirasz19 Před rokem +5

    You are awesome! I’m learning Python yet but your videos help me so much!! Thank you ❤️🔥

  • @pipewarp621
    @pipewarp621 Před 3 lety +104

    the livestream was a living hell lmao

  • @falxie_
    @falxie_ Před 3 lety +85

    You just made me very self conscious knowing that you are/were a high schooler

    • @pokepe12
      @pokepe12 Před 3 lety +8

      Same... im finishing first year of cs and hes way ahead of me

    • @vekyll
      @vekyll Před 2 lety +6

      Highschoolers' greatest superpower is learning stuff quickly. They have to, in order to survive in the jungle that is high school.

  • @cd7677
    @cd7677 Před rokem +10

    I really like the transparency of this guy, makes me wonder about all those flash, web unity, and html5 games that are in those minigames pages

  • @chuck8240
    @chuck8240 Před rokem +2

    Thank you a lot, I'am very new to programming and trying to fit as much knowledge into my head as I can with your Sourcecode and video I think I will make some great steps forward😊

  • @artxemio
    @artxemio Před 3 lety +294

    PolyMars:
    says b e a n
    Me:
    That bean is looking kinda THICC

  • @Skeffles
    @Skeffles Před 3 lety +19

    Excellent dive into pygame and python! It's great to see more people looking at these.

  • @Ryanisthere
    @Ryanisthere Před 3 lety +12

    1:10 now you are legally qualitfied to work at any tech startup

  • @slipperynickels
    @slipperynickels Před rokem +3

    it's cracking me up that the thumbnail for this video is totally valid python. python doesn't care about semicolons at the end of statements, it will run that print call just fine.

  • @weirddevers9165
    @weirddevers9165 Před 3 lety +68

    It was my honour to participate in the same game jam. I made gravity adventure btw

    • @PolyMars
      @PolyMars  Před 3 lety +29

      oh awesome, that was a super cool entry!

  • @epicboxx3838
    @epicboxx3838 Před 3 lety +73

    I love the mechanics of the game it’s a good combo that I wouldn’t have thought of if I was currently developing games. Very cool polymars

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

    this was really interesting as someone who wants to peruse programing in the future this was fun to watch although i had no clue what was happening. it was fun to see you building the code as it happened

  • @bafakyh
    @bafakyh Před rokem

    i have just discovered ur channel... seems like I can finally expand my knowledge on coding .. big thx bro

  • @LexisJunior
    @LexisJunior Před 3 lety +4

    Hey Poly, I really love your videos. You are talented!

  • @msinfo32
    @msinfo32 Před 3 lety +15

    print("woah! polymars finally uploaded!")

  • @Kokola-qh9wp
    @Kokola-qh9wp Před rokem +7

    This kid is so talented, I hope he gets into a top school or makes a future top company :D

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

    Wow I can't even render a square and PolyMars made a whole game in just 48 hours! Congrats!

  • @ReeceGeofroy
    @ReeceGeofroy Před 3 lety +18

    LET'S GOOOO! Good to see you back in the game 😍

  • @dawsonplays8945
    @dawsonplays8945 Před 3 lety +3

    this is the highest production quality game dev video i have ever watched

  • @shadowprogrammer101
    @shadowprogrammer101 Před 3 lety +2

    I loved watching the stream. I think you should continue to learn pygame. (I was the one who asked about when you would make a VR game)

  • @NotExplosive
    @NotExplosive Před rokem +29

    6:45 is so relatable, every jam I lose like 30 minutes to getting the UI layout right by just guessing values and checking the result

  • @AstroSamDev
    @AstroSamDev Před 3 lety +8

    Yay polymars! Great video, I usually find it really frustrating to try other programming languages.

    • @Dorbellprod
      @Dorbellprod Před rokem

      ASTROSAM?! Dude I'm a HUGE fan HI

    • @AstroSamDev
      @AstroSamDev Před rokem

      @@Dorbellprod 😳ommmmmggg doorbellprod, how did you find this oml lol xD HIIIIII

  • @CringePoop
    @CringePoop Před 3 lety +3

    I just realized the dishes at 4:39 is him holding backspace on the code then reversing the footage

  • @1trompet146
    @1trompet146 Před 6 měsíci

    Very impressive you are able to learn so fast!

  • @johnshepard3197
    @johnshepard3197 Před rokem

    Can't believe I watched the whole thing! Interesting content!

  • @i_love_python5862
    @i_love_python5862 Před 3 lety +8

    as my name suggests, this is very exciting.

  • @gabrielmourao2854
    @gabrielmourao2854 Před 3 lety +5

    5:30 polymars gaming setup

  • @archewallarc
    @archewallarc Před 6 měsíci

    That was a funny and good video for learning all. Nice video :D

  • @onemuslim782
    @onemuslim782 Před rokem +5

    1:39 regreting life choices

  • @codergopher8270
    @codergopher8270 Před 3 lety +4

    c++ will be hearing about this PyTreachery

  • @Pranav0443
    @Pranav0443 Před 2 lety +11

    Polymars: The syntax barrier was pretty much gone now.
    Also Polymars 1 second later: Uses Semi-Colon 4:15

  • @Gibmeprimogemss
    @Gibmeprimogemss Před rokem

    I literally had an ICT exam today that had Python in it, and now this vid is in my feed (Got a full mark obvi), and I loved this challenge!

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

    CZcams recommended me this 3 years later even though I've been watching Dani since like forever

  • @AHSEN.
    @AHSEN. Před 3 lety +4

    LOL this is exactly what I went through the past two days. I was trying to create a ray marching algorithm from scratch, and settled on using pygame despite never having used python before. I figured it would be a good way to learn the basics. Almost _exactly_ the same as what you did.

  • @konpet4248
    @konpet4248 Před 3 lety +83

    I started with Python and then switched to C++. God, that was a pain, but in the end it worked out.

    • @meowjustme6865
      @meowjustme6865 Před 3 lety +3

      Damn same but i started in Javascript then Python and then C++

    • @TheCubicLog
      @TheCubicLog Před 3 lety +2

      same but javascript > python > c#

    • @nonenone9002
      @nonenone9002 Před 3 lety +2

      @@TheCubicLog no...... (maybe as long as you dont use it on electron apps)

    • @illegallyapollo1637
      @illegallyapollo1637 Před 3 lety

      i went from python to js to java, was a relatively easy transition tbh

    • @moonlitee
      @moonlitee Před 3 lety

      Went from C++ to C# to Python. It was a ride lol.

  • @slizzy1433
    @slizzy1433 Před 9 měsíci

    I love the little detail in the thumbnail, showing the semi-column(tottaly butchered that ik) is an error since you dont have to end with it in python

  • @iamm3chanic
    @iamm3chanic Před rokem

    Huuuuge thhhhhx to you guy and CZcams recs for this video, cuz it gave me such a boost of motivation that I ... I am just... Yah, opening a new pet project!

  • @Povilaz
    @Povilaz Před 3 lety +7

    *reads title*
    Ooh, python. How innovative.
    *reads title again*
    oh.... OH.

  • @DaFluffyPotato
    @DaFluffyPotato Před 3 lety +228

    Did the same thing except I learned Godot (coming from Pygame) in under 48 hours for a jam. Made a video and everything. lol
    It really is a great way to learn stuff quickly.

    • @decidev
      @decidev Před 3 lety +1

      Oh wow didn’t expect to see you here

    • @shinyduck5324
      @shinyduck5324 Před 2 lety

      Woah

    • @fdevstudio5692
      @fdevstudio5692 Před 2 lety +1

      Hi Dafluffypotato, I am your fan

    • @aMyst_1
      @aMyst_1 Před 2 lety

      when i tried godot i was confused so much but when pygame it was easier

    • @justhaydz
      @justhaydz Před 2 lety

      Yo it's that guy!

  • @codingportfolio7760
    @codingportfolio7760 Před rokem

    the thumbnail his hilarious XD the fact that there's an error bar around the semicolon really encapsulates the pain of the python language. and whitespace... oh god...

  • @Groggle7141
    @Groggle7141 Před rokem +3

    Missed opportunity to code this caffeine-based game in JAVA.

  • @Scootch
    @Scootch Před 3 lety +27

    As a barista, I approve of the name flappuccino 😂👍

  • @rmr_md6834
    @rmr_md6834 Před 3 lety +18

    Oh man. I learned this as my first programming language and learnt it for like 8-9 months and never finished a game. I gave up and am learning Godot now. At first it was very complicated because I was used to just coding everything. Anyways... now I saw this video of you making a good game with pygame in 48 hours or so without having any experience with Python and I couldn't make an average game after all those months...
    Ooooooof!

    • @somethingstuffles9084
      @somethingstuffles9084 Před rokem +14

      Don't compare yourself. He is someone who is already proficient in C++, which is a much harder language than Python and already being good with one language, means that it is way easier to switch to another. So he isn't *really* just learning it in 2 days, he has an entire background of knowledge to lean on.

    • @mariotheundying
      @mariotheundying Před rokem

      I wanted to learn python but my goal was to make games, a lot of years ago I downloaded GM to make an undertale fangame but when I was learning python I found out that the only game engine in pygame and, well, it didn't have GM's convenience of literally everything, I don't even know if you could make a complex game in python like a whole adventure rpg which I wanted to make (not small-scale, a full game) so I just went to game maker 2 which is now free and haven't made progress in learning python

  • @polarchips
    @polarchips Před 2 lety

    Wow, this was a lot of fun to watch! Feeling inspired to try making my own game :’)

    • @PolyMars
      @PolyMars  Před 2 lety +2

      Go for it! And thanks for the awesome music :)

    • @tanyamorro7454
      @tanyamorro7454 Před rokem

      @@PolyMars :)
      I love your videos 😍😍😍
      Sorry about this, I try to not overreact

  • @bwc1976
    @bwc1976 Před rokem +7

    Wow, this is actually really awesome! Congratulations on setting a challenging goal for yourself and following through with it. Also, what text editor did you use?

  • @tauheedgamedev2388
    @tauheedgamedev2388 Před 3 lety +3

    Streaming and coding at the same time is not easy. BTW Welcome to Twitch

  • @yuhsnt
    @yuhsnt Před 3 lety +4

    I didn't think cookie clicker and flappy bird would BLEND so well together.

  • @pkavenger9990
    @pkavenger9990 Před 9 měsíci

    Dude u aren't bad at coding, you are fine. And great thing is that you can also draw ur own sprite.

  • @quark_ow
    @quark_ow Před 2 lety +19

    i know you probably won't read this but gosh you're videos are awesome. im a 17 y/o just getting into coding and this makes it seem like coding and game creation is so fun. please keep up the great work.

    • @bolthesnaphakker
      @bolthesnaphakker Před rokem +3

      Believe me.
      Its pain on certain languages.

    • @MrCmon113
      @MrCmon113 Před rokem +2

      The fun parts are fun, but people don't pay high salaries for stuff that's fun.

    • @NikPower-gs6hs
      @NikPower-gs6hs Před 5 měsíci

      what you want to do is not focus on the end product that being the game but on the process of making it itself and I also suggest you sometimes try other projects as well and to use languages like c Cpp and such sorry I cannot use punctuation

  • @nonenone9002
    @nonenone9002 Před 3 lety +25

    you better still be c++ gang (or ban from codergopher++)

    • @jacksonpope3473
      @jacksonpope3473 Před 3 lety +1

      I was about to say we beter have not lost him to the dark side

    • @marcobonera838
      @marcobonera838 Před 3 lety +1

      a real programming language!

  • @Wheagg
    @Wheagg Před 3 lety +5

    press button
    lose bean
    *_GET STRONG_*
    [6:19]
    I tuned into one of these five hour streams. Was like chilling with friends which I needed in this trying time.
    Edit: I prefer streams on CZcams. Mostly because Twitch is somehow even more unstable.

  • @Vortex-qb2se
    @Vortex-qb2se Před měsícem +1

    I'd use a quadsirandom sequence to spawn the beans to ensure they aren't overlapping if you have so many.

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

    Thriving under self imposed stress is actually really accurate description for me too... That's very eye opening!

  • @Xamimus
    @Xamimus Před 3 lety +6

    This person learned more Python in 48 hours than I have in 2 months!

  • @cheap_hoe
    @cheap_hoe Před 3 lety +20

    Me: Makes in pygame image copied from google images move when u press arrows after 6 months of learning
    Also me: omg im so good
    Him: learns pygame in 2 days and makes a whole game
    Me: ...

    • @nikkiofthevalley
      @nikkiofthevalley Před 2 lety +1

      That's because he has previous experience with programming. A lot of programming concepts and general syntax are similar between languages, so it's much easier to learn a language if you already know another one.

    • @cryonim
      @cryonim Před rokem +1

      @@nikkiofthevalley + the maths. The maths he showed wasn't as intuitive to simply come by in a week or two, it must have been a pretty good maths foundation.
      So he had all the tools, maths, graphics, UI design, programming and I'm new here but most likely game dev experience as well.
      A programming language is just a toolkit, you may get a hammer and screwdriver in one kit, or a hammer and a plier in another, but it's mostly the same, it's the knowledge of how to use the hammer and where that matters. Don't feel bad, because you too can be a better carpenter if you keep at it :)

    • @imlimpoism9260
      @imlimpoism9260 Před rokem +1

      he knows a plethera of coding languages, never give up

  • @dominicballinger6536
    @dominicballinger6536 Před 2 lety

    Pretty cool! I think it's a nice basic game!

  • @bensonostler5906
    @bensonostler5906 Před rokem

    Bro you're insane! Love your vids, quick question: What helped you learn how to program the best?

  • @lextatertotsfromhell7673
    @lextatertotsfromhell7673 Před 3 lety +4

    Polymars: how do I declare a variable on python
    Me, knowing you don’t declare variables in python: I’m 4 parallel universes ahead of you

    • @vekyll
      @vekyll Před 2 lety

      Yeah... Imagine what he'd have done if he _understood_ Python's object model. :-P

  • @MarquisKurt
    @MarquisKurt Před 3 lety +16

    Looks great for a first game in Pygame, and welcome to Python! I made a game with Pygame recently for the Wowie! Jam, and it turned out alright.
    If you're still used to declaring variable types, you can supply a type annotation (VSCode should help force type checks as well): variable: str = "Hello, world!" I do this a lot since I'm used to type-checking from Swift. (edit: fixed formatting)

    • @PolyMars
      @PolyMars  Před 3 lety +3

      Thanks! Cool to see people using Pygame :)

  • @TechnicalBurhan
    @TechnicalBurhan Před 2 lety

    I dont know how many times I have watched this video but I love it

  • @Cralzen
    @Cralzen Před rokem +1

    *I’m literally gonna learn this C++ after Python*

  • @Ultimate_Refrigerator
    @Ultimate_Refrigerator Před rokem +3

    You did more things in python only in 2 days, than I did in 2 years of learning python💀

  • @nezbednik
    @nezbednik Před 3 lety +8

    i would actually enjoy a video porting this to consoles (again)

    • @softwarelivre2389
      @softwarelivre2389 Před 3 lety

      I believe it would be interesting, but he would need to port the CPython compiler alongside his source code

  • @whatisthis6259
    @whatisthis6259 Před rokem

    It’s funny how in the video you have around 100 subscribers but you make such good videos I think I’m watching a 1Mil

  • @nathanc6443
    @nathanc6443 Před měsícem +1

    **watches 1 tutorial about python**
    CZcams: I RECOMMEND EVERY VIDEO THAT HAS THE WORD PYTHON

  • @Orincaby
    @Orincaby Před 2 lety +4

    This guy can make a game in two days, I've known Python for 3 years and I can't barely do jackshit with it.

    • @ugIybot
      @ugIybot Před rokem

      Pygame has way too many built in functions for it to be considered a struggle

  • @strstella
    @strstella Před rokem +3

    we have the same camera btw 1:23

  • @BoiiBlu
    @BoiiBlu Před rokem +1

    2:26 his smile was so wholesome

  • @GamesSwedenRoblox
    @GamesSwedenRoblox Před rokem

    Thumbnail reminds me of one of our dear developers almost taking his life, he had written a date for it in the code.

  • @Syuvinya
    @Syuvinya Před rokem +5

    Wow. The first language I've learned was python, and now I'm planning to learn C++. Wish me luck!

    • @bapoTV
      @bapoTV Před rokem +2

      good luck with pointers, the rest shouldn't be that difficult

    • @alessiodaini7907
      @alessiodaini7907 Před rokem +1

      study properly pointers! After that, nothing particularly new

    • @alessiodaini7907
      @alessiodaini7907 Před rokem +1

      @@bapoTV pointers aren't so hard to understand

  • @tapoutluke
    @tapoutluke Před rokem +6

    going from C++ to Python is like taking off training weights after 3 months

    • @nolkso
      @nolkso Před rokem +1

      still can't get used to inspecific variable declaration in javascript and python

    • @unlink1649
      @unlink1649 Před rokem +1

      C++ is just a complete mess full of technical debt and so far away from what developers want to write that everything feels like a warm breeze when programming. I'd rather write Java than C++. The whole syntax is horrible. Just think of this

    • @MrCmon113
      @MrCmon113 Před rokem +2

      @@unlink1649
      Huh, that's the one thing I liked about C++.

    • @unlink1649
      @unlink1649 Před rokem

      @@MrCmon113 haha you absolute degenerate :D

    • @HassanIQ777
      @HassanIQ777 Před 3 dny

      ​@@unlink1649 🤓☝🏼☝🏼🤓

  • @noir371
    @noir371 Před rokem

    The “wait what, that makes no sense” is an essential part of any programming project

  • @Its_ME632
    @Its_ME632 Před 2 lety

    this video is soooooo cool bro your areTHE KING OF THE COFFE

  • @Rudxain
    @Rudxain Před rokem +7

    2:56 Python allows you to use type annotations. And most type checkers support type inference. So you should declare `velocity` as `float`, because the type checker will assume it's an `int`

  • @barj
    @barj Před 3 lety +183

    Haha you should have used Java for this. Haha get it? 😐

    • @PolyMars
      @PolyMars  Před 3 lety +90

      something is wrong here...
      twitter plays snake: a game about snakes made in java
      flappuccino: a game about coffee made in python

    • @jmejuniper
      @jmejuniper Před 3 lety +1

      @@PolyMars Oh no XD

    • @ahmetemiruludag
      @ahmetemiruludag Před 3 lety +2

      @@PolyMars LMAO

    • @SummonerArthur
      @SummonerArthur Před 3 lety +13

      @@PolyMars you can still fix this doing bejeweled on ruby LOL

    • @btsbiot1340
      @btsbiot1340 Před 3 lety +1

      One of the biggest twist ever

  • @JosaxJaz
    @JosaxJaz Před 7 měsíci

    4:46 I have no clue why, but the line "for bean in beans" makes sense but is so hilarious to me

  • @arbitervildred8999
    @arbitervildred8999 Před 2 lety

    a cool feature would be an "enemy or a wall" you know, something that would make the player go up or down in order to not take contact and get a slow effect or lose coffe XD

  • @TheCac
    @TheCac Před 3 lety +40

    this is inspiring me to actually learn coding since ive tried 5 times but gave up every time

    • @TheCubicLog
      @TheCubicLog Před 3 lety +11

      you tried 5 times? did you try jumping straight in to something complicated? try codecademy or something... don't learn on your own until you understand the fundamentals of programming

    • @abbywiley6467
      @abbywiley6467 Před 3 lety +9

      Keep going at it, programming is really fun and powerful. I personally recommend learning Python first, as it is really simple. I wish you the best of luck

    • @TheCac
      @TheCac Před 3 lety +1

      @@TheCubicLog nah i did the fundementals and stuff but in the end i just couldnt do anything without a video reference so i gave up

    • @TheCubicLog
      @TheCubicLog Před 3 lety +9

      @@TheCac I think that's where you're going wrong. You can't expect to get good at something if you are just going to give up. Try learning python first. It is really easy to learn and still quite powerful. Follow video tutorials to get hold of the basics and it will come natural. Good luck if you decide to try it :)

    • @menyepy
      @menyepy Před 3 lety +1

      Dont give up!

  • @menyepy
    @menyepy Před 3 lety +5

    Im guessing it took you longer to edit and upload!

  • @Fabik11
    @Fabik11 Před rokem +1

    That was.. so freaking cool.

  • @halted_code
    @halted_code Před rokem

    i basically did the same thing for a computer organization class, i had to make an emulator that implemented memory, and the assembly isa that my teacher made for us, then i had to make it work, i had a month to do this but i did this in the last two days as well in python which i did not know at the time, thankfully my time in c++ made it so i needed about an hour to get up and running from install to actually working on the project. all in all it took me like 12 hours of coding.