C++ Developer Learns Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ค. 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.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 2K

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

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

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

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

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

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

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

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

    • @Ace-lw8kh
      @Ace-lw8kh 3 ปีที่แล้ว +4

      so it did

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

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

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

    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 ปีที่แล้ว +328

      - You get sponsored by some random game engine

    • @nightmanmain4858
      @nightmanmain4858 ปีที่แล้ว +90

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

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

      doodle jump this time do

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

      @@ThePapaja1996 ok yoda

    • @aqzp.
      @aqzp. ปีที่แล้ว +8

      @@nightmanmain4858 - You lose your sanity

  • @alanrigden2522
    @alanrigden2522 ปีที่แล้ว +6351

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

    • @display1235
      @display1235 ปีที่แล้ว +277

      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 ปีที่แล้ว +77

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

    • @Tobsson
      @Tobsson ปีที่แล้ว +438

      @@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 ปีที่แล้ว +18

      like seriously ur not wrong

    • @w-iz
      @w-iz ปีที่แล้ว +7

      Frrrrrrr 😂

  • @echo2302
    @echo2302 ปีที่แล้ว +1482

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

    • @Sol4rOnYt
      @Sol4rOnYt ปีที่แล้ว +92

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

    • @tophat593
      @tophat593 ปีที่แล้ว +42

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

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

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

    • @faisfaizal5194
      @faisfaizal5194 5 หลายเดือนก่อน +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 5 หลายเดือนก่อน +1

      Because you learn best with a clear goal mind.

  • @tomsterbg8130
    @tomsterbg8130 ปีที่แล้ว +627

    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 ปีที่แล้ว +57

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

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

      @@gruby21376 1.13 💀

    • @YourMom-wi5to
      @YourMom-wi5to 7 หลายเดือนก่อน +4

      10 years😂 thats just u man

    • @skycaptain95
      @skycaptain95 7 หลายเดือนก่อน +9

      ​@@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 5 หลายเดือนก่อน +4

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

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

    "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 3 ปีที่แล้ว +515

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

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

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

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

      @@raincaldwell ty

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

      lmao r/relatable

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

      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 3 ปีที่แล้ว +2118

    I didn't know '97 Matt Damon made games

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

      And I thought I looked like Matt Damon. This man's resemblance is uncanny

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

      yes

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

      4444

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

      more like Matt Demon cos there's no ressemblance

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

      daaam tru

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

    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  ปีที่แล้ว +20

      That's awesome! Keep it up

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

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

    • @cewla3348
      @cewla3348 4 หลายเดือนก่อน

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

  • @Stabby666
    @Stabby666 ปีที่แล้ว +1002

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

    • @onebigsnowball
      @onebigsnowball ปีที่แล้ว +116

      @@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 ปีที่แล้ว +36

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

    • @theseangle
      @theseangle ปีที่แล้ว +140

      @@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 ปีที่แล้ว +60

      @@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 ปีที่แล้ว +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 3 ปีที่แล้ว +2568

    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 3 ปีที่แล้ว +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 3 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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 2 ปีที่แล้ว

      I took me three months

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

    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 2 ปีที่แล้ว +20

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

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

      @@nvcbl tic-tac-toe time!

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

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

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

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

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

      @@nvcbl That's a dead language

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

    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 ปีที่แล้ว +114

    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 ปีที่แล้ว +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 ปีที่แล้ว +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 ปีที่แล้ว +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 9 หลายเดือนก่อน +3

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

    • @vintagegenious
      @vintagegenious 4 หลายเดือนก่อน

      Why not wish you learned it in middle school

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

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

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

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

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

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

  • @buddyroach
    @buddyroach ปีที่แล้ว +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.

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

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

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

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

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

      Is this kink shaming

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

      GIMP is an art program, not a kink

    • @daisuki9296
      @daisuki9296 3 ปีที่แล้ว +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 3 ปีที่แล้ว +52

      @@daisuki9296 u ok

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

      @@Banana-fl5ww no

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

    the livestream was a living hell lmao

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

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

  • @chuck8240
    @chuck8240 ปีที่แล้ว +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😊

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

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

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

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

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

    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

  • @shadowprogrammer101
    @shadowprogrammer101 3 ปีที่แล้ว +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)

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

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

    • @Batman-by5rr
      @Batman-by5rr 3 ปีที่แล้ว +18

      dani dady

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

      UP VOTE FOR DA BEAN

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

      banana

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

      I see... a man of culture as well.

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

      Daniiii

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

    The line "for bean in beans" just gets me

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

      same

    • @vekyll
      @vekyll 2 ปีที่แล้ว +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. :-]

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

    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

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

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

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

      ayy nice! welcome

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

    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

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

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

  • @1trompet146
    @1trompet146 5 หลายเดือนก่อน

    Very impressive you are able to learn so fast!

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

    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!

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

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

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

      ASTROSAM?! Dude I'm a HUGE fan HI

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

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

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

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

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

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

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

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

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

    print("woah! polymars finally uploaded!")

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

      run (hello.)

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

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

  • @bwc1976
    @bwc1976 11 หลายเดือนก่อน +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?

    • @JATorigin
      @JATorigin 4 หลายเดือนก่อน

      He used Visual Studio Code (VS Code)

    • @ZephyrysBaum
      @ZephyrysBaum 28 วันที่ผ่านมา +1

      VS code.

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

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

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

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

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

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

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

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

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

      oh awesome, that was a super cool entry!

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

    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 3 ปีที่แล้ว +1

      Oh wow didn’t expect to see you here

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

      Woah

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

      Hi Dafluffypotato, I am your fan

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

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

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

      Yo it's that guy!

  • @-CosmoCode
    @-CosmoCode 4 หลายเดือนก่อน +1

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

  • @NotExplosive
    @NotExplosive ปีที่แล้ว +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

  • @AHSEN.
    @AHSEN. 3 ปีที่แล้ว +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.

  • @rmr_md6834
    @rmr_md6834 3 ปีที่แล้ว +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 ปีที่แล้ว +13

      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 ปีที่แล้ว

      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

  • @Kokola-qh9wp
    @Kokola-qh9wp ปีที่แล้ว +7

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

  • @pkavenger9990
    @pkavenger9990 8 หลายเดือนก่อน

    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 2 ปีที่แล้ว +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 ปีที่แล้ว +3

      Believe me.
      Its pain on certain languages.

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

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

    • @NikPower-gs6hs
      @NikPower-gs6hs 4 หลายเดือนก่อน

      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

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

    as my name suggests, this is very exciting.

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

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

  • @slizzy1433
    @slizzy1433 8 หลายเดือนก่อน

    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

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

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

  • @MarquisKurt
    @MarquisKurt 3 ปีที่แล้ว +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  3 ปีที่แล้ว +3

      Thanks! Cool to see people using Pygame :)

  • @archewallarc
    @archewallarc 4 หลายเดือนก่อน

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

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

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

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

    Now Learn C in a week

    • @Simple_OG
      @Simple_OG 13 วันที่ผ่านมา +2

      Easy just don't learn pointers

    • @A10Rooms
      @A10Rooms 8 วันที่ผ่านมา

      now learn rust in a month

    • @Vortex-qb2se
      @Vortex-qb2se 5 วันที่ผ่านมา

      He already knows C if he knows C++ 💀

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

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

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

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

  • @tanishmishra8404
    @tanishmishra8404 26 วันที่ผ่านมา

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

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

    c++ will be hearing about this PyTreachery

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

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

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

    glad i caught the stream it was fun

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

    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

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

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

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

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

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

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

  • @Vortex-qb2se
    @Vortex-qb2se 5 วันที่ผ่านมา +1

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

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

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

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

    5:30 polymars gaming setup

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

    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.

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

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

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

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

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

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

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

      a real programming language!

  • @Rudxain
    @Rudxain ปีที่แล้ว +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`

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

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

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

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

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

    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 TH-cam. Mostly because Twitch is somehow even more unstable.

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

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

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

    This is just amazing!.

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

    Congratulations! You are now 99% of the community!

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

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

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

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

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

      same but javascript > python > c#

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

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

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

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

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

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

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

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

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

    I am inspired!
    Thank you

  • @jackbotman
    @jackbotman 9 หลายเดือนก่อน

    When I saw the spaces in the file name my heart cried a bit

  • @cheap_hoe
    @cheap_hoe 3 ปีที่แล้ว +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 2 ปีที่แล้ว +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 ปีที่แล้ว +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 11 หลายเดือนก่อน +1

      he knows a plethera of coding languages, never give up

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

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

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

    in 11 th grade i learned python first ly it was awesome
    but when i learned the use of nested if for loop while loop and then
    use of list in Stack and queue
    then some type of search like linear search and binary search was amazing
    some easy concepts of underflow and over flow and how to use it in stack
    later i confused by enque and deque lol but later it cleard its somewhat same as push and pop but for queue.lol

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

    Looking to the SOLID principles, there is way too much code in that one file, but good job my friend! 😎

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

    1:39 regreting life choices

  • @lextatertotsfromhell7673
    @lextatertotsfromhell7673 3 ปีที่แล้ว +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 2 ปีที่แล้ว

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

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

    This video is amazing
    I learned c and c++ in school too and now im learning python but in a mlre basic way lol

  • @ilayb
    @ilayb 11 หลายเดือนก่อน

    Use the turtle library!
    By the way, as a python programer, it's very fun to watch you learning python

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

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

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

    we have the same camera btw 1:23

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

    That was.. so freaking cool.

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

    that is such a legendary thumbnail

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

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

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

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

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

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

    • @TheCubicLog
      @TheCubicLog 3 ปีที่แล้ว +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 3 ปีที่แล้ว +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 3 ปีที่แล้ว +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 3 ปีที่แล้ว +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 3 ปีที่แล้ว +1

      Dont give up!

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

    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

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

    This is very interesting to watch