A little game made with Python and Pygame

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2012
  • The title says it all. The sound effects are very quiet. This is the link to the source code for learning purposes:
    pastebin.com/VW9maqHf
    and the YAML files:
    pastebin.com/g1T5HW4N
    pastebin.com/tkfnzQxc
    Be warned though I am a total noob programmer, and I make tons of mistakes. I've only been programming for half a year or so. It took 1 month to make in my free time.
    Credit to Clinton Myers for parts of the Ragnarok engine code that I used as basis.
    I've also used this module for 2d vectors: (change "vec2d" to "vector")
    www.pygame.org/wiki/2DVectorClass
    For all the people asking for how i made this,
    I learned alot from this:
    goo.gl/ptVSY (went offline)
    web.archive.org/web/201306290... (the same link, but from the wayback machine)
    and this:
    goo.gl/D9pJN
    and these two "game engines":
    goo.gl/Ey2M7
    goo.gl/5t8OQ
    For the pixel art, here is a tutorial playlist that i used, by SolarLune:
    • Pixel Art Videos
    Also, if you just want to learn python, codeacademy is a good option, as was suggested in the comments by TAYDEON23:
    www.codecademy.com/tracks/python
  • บันเทิง

ความคิดเห็น • 626

  • @rocky6345
    @rocky6345 10 ปีที่แล้ว +836

    Cool! I just learned how to do this:
    print('Hello World')
    6 Year Update: I am now in college and can still only print.
    8 Year Update: I am now entering my senior year of college and can reverse a linked list.

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

      Ayushmaan G Thanks for the option but I would like to learn Python first and then learn some web browser language. :D

    • @194856327
      @194856327 10 ปีที่แล้ว +6

      TheCoolCreeper I'm using inventwithpython.com (first book: Invent Your Own Computer Games with Python). Almost finished with it and then I'll just start the next book (Making Games with Python and Pygame) which continues after the first one, which I'm assuming goes into more details with pygame, as the first book only introduces you to it.

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

      ninja9812 Would you please share with me a copie of these books if you want. Thx. Excuse my english

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

      ninja9812 Thanks for the recommended book. I've already begun reading it, but I have very very very little time to read sadly with all my school work. But thanks again! :P

    • @194856327
      @194856327 10 ปีที่แล้ว +6

      Abdelbasset Ouery The books can be found at inventwithpython.com and are free to use, copy, and share. At the site are provided .pdf files that you can use to print them out, or you can read the book online by following the provided links (The ones that say "Read the book online for free!")

  • @soulfinder223
    @soulfinder223 10 ปีที่แล้ว +433

    LOL! smoother gameplay than battlefield 4. Great job man!

    • @pythypython3989
      @pythypython3989 9 ปีที่แล้ว

      what do you mean?

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

      Pythy Python On launch day, Battlefield 4 was rushed to launch at launch day instead of being delayed which ended up broken and very buggy. Then it would be completely fixed a year later. EA pressured DICE man...

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

      I don't get why "big companies" like EA are still needed nowadays, could you explain me? I don't know much about this business but I suppose it's like the music business, nowadays artists pretty much don't need "the big labels" to help them, they can distribute their own stuff through the internet and perform for money. Isn't it the same for the game industry? I mean, small companies doing their own stuff at their own pace and releasing when it's done, like a movie or something. If they release something cool, they will start a following which will stay with them for years.

    • @DarkShroom
      @DarkShroom 7 ปีที่แล้ว

      you need a PC

    • @somerandom7672
      @somerandom7672 7 ปีที่แล้ว

      @FeelingShred I don't think it's as much that they're _needed_, as that they are simply 'there' and successful..
      Indie game devs and small companies can't create projects of the same size, and don't have the same resources.
      They have screwed people over countless times, but all the same I'd hate to see an end to them... Made a lot of great stuff over the years that has inspired many people.

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

    This is such a simple video, but this really kickstarted me into game development using small frameworks / building my own engines. It really showed me, that you don't need crazy complicated C++ and OpenGL engines / knowledge to make games. Thank you

  • @zebmaxwell7979
    @zebmaxwell7979 8 ปีที่แล้ว +215

    Better then 90% of Steam Greenlight games.
    and this was made in 2012, Keep up the grate work!

    • @dc9591
      @dc9591 6 ปีที่แล้ว

      RIP Greenlight

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

      Great*

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

      OboPlays Correcting a 2 year old comment lol

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

      I care about spelling

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

      a bit too much if i do say so myself

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

    Nice looking game.
    Loving the pixel art and when you finish I would love to try it out.

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

    Love the sound effects!

  • @karzyarmycat
    @karzyarmycat 10 ปีที่แล้ว +14

    Great job man! good luck with the game.

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

    This is sick man. Love how smooth it was and the animation, amazing :)

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

    this is actually really amazing! i looked at the source code and, i must say, it is very well written. you are obviously no noob! lol

  • @bramsnijders
    @bramsnijders  11 ปีที่แล้ว +13

    I did exactly the same :) and once you have learned a bit of python or ruby, C++ doesn't seem so difficult anymore. Just keep programming.
    - Bram

  • @eeejayseven
    @eeejayseven 7 ปีที่แล้ว

    You don't know how much inspiration this gave me. Thanks!

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

    Yo dude, I new to this coding stuff... but i'm pretty sure that what you made is awesme

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

      If you are beginner in python then must visit to this blog.
      Learn some basic python concepts through game.
      technoworld281571492.wordpress.com/2018/03/05/one-program-that-will-cover-basic-python-concepts/

  • @zzzzzz...9902
    @zzzzzz...9902 7 ปีที่แล้ว +5

    That is so cool. I am currently working on a little more simpler game, which is Stacker. Started working on it yesterday and right now I got the first level of blocks done. The second level of blocks is almost there, I just have to allow for where it is acceptable range to make it equal to the previous level and then if they lose one or two blocks. Then the second level will be done. Then it is the third, forth, ect.

    • @z_.v
      @z_.v 7 ปีที่แล้ว

      How is the game going so far?

    • @zzzzzz...9902
      @zzzzzz...9902 7 ปีที่แล้ว +1

      Going great. I am actually done with it. I then created a flappy bird game. It is pretty good but there are still some things that could be improved.

  • @michaelross6953
    @michaelross6953 9 ปีที่แล้ว

    Game looks pretty tight. Love how you included source code. Thanks for that! Might dig later on and find something useful ;P

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

    Fucking beautiful man. Great graphics, fluid animation and gameplay, interesting dialogue, simply awesome.
    If only I had the skills to make something like this ~

    • @erehh9817
      @erehh9817 5 ปีที่แล้ว

      twobarells do you have the skills now?

  • @moth.systems
    @moth.systems 4 ปีที่แล้ว

    the sound effects on this are sooooo crisp, its incredible

  • @junkmortha
    @junkmortha 10 ปีที่แล้ว

    Wow this looks like a great game. Please make more to it this game looks very VERY expandable and well mi sure this will be huge if you complete it and release to like steam.

  • @PANDXMS
    @PANDXMS 11 ปีที่แล้ว

    HALF A YEAR? bro, this is awesome.

  • @Shendue
    @Shendue 9 ปีที่แล้ว

    Brilliant. I love the style and the humour.

  • @TelemanNers
    @TelemanNers 11 ปีที่แล้ว

    The movement, sound effects, and physics all look fantastic. The level design isn't stunning but still great, the one thing that is lacking is the dialogue. Great game!

  • @roman.venica
    @roman.venica 9 ปีที่แล้ว +1

    This is one of the best characters i've ever seen.

  • @Neregy
    @Neregy 8 ปีที่แล้ว

    And you say you're a noob?? no way!!! I wanna see the things you will do when you be a pro. Keep going dude, you're awesome.

  • @ethanmcrae6708
    @ethanmcrae6708 6 ปีที่แล้ว

    Thank you for letting us see the source code! I am sure I will learn a lot from it.

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

    That is insane how good people are in programing:O

  • @Love0Me0Hate
    @Love0Me0Hate 5 ปีที่แล้ว

    Very impressive man! Great job!

  • @bramsnijders
    @bramsnijders  10 ปีที่แล้ว

    No problem.
    There's a collision check for the door and when that returns true and the z key is active the door object plays an animation and then loads a new level.

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

    Half a year of experience and this took you a month of free time? This is very inspiring. I am gonna try Python as well. I hope I can make games that look like Minecraft and Terraria with Python only.

    • @conman2317
      @conman2317 8 ปีที่แล้ว +6

      +Ilia S if you know python, its easy to learn any other language, no need to stick with python only just because its all you know.

    • @FockeWulfFW200
      @FockeWulfFW200 5 ปีที่แล้ว

      ReliveTheDream I guess its the same the other way, Im not a pro at C and C++, but I can make a simple 2D games using SDL, so pygame + python its... like a piece of cake (comparing them with C + SDL, of course)

  • @izstrella
    @izstrella 6 ปีที่แล้ว

    This is really cool-great job!

  • @goodgamegod8099
    @goodgamegod8099 6 ปีที่แล้ว

    Really neat! Hopefully I'll be able to make something like that! I've had experience with a language called "SmileBASIC" but not much in python. This inspires me to work harder, thank you!

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

    This main character looks hilarious. :D good work.

  • @calebbradley7151
    @calebbradley7151 6 ปีที่แล้ว

    You are going places man

  • @MutantMilitary
    @MutantMilitary 8 ปีที่แล้ว

    Nice! Keep up the good work man!

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

    Great work!
    Motivates me to learn more of Pygame

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

    Wow, excellent work. As a rookie it's great tosee what Python can do. This reminds me a lot of Fez

  • @bramsnijders
    @bramsnijders  10 ปีที่แล้ว

    Have a look at the button and the menu class in the pastebin, and the Button_level_1 class.

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

    hopefully ill be able to program something like that in the future, but yea great job, inspires me a lot

  • @NonsenseWorks
    @NonsenseWorks 10 ปีที่แล้ว

    Awesome Work. Very impressed

  • @omkarchakraborty1739
    @omkarchakraborty1739 7 ปีที่แล้ว

    You just inspired me a lot, I am currently learning Python.

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

    reminds me of poptropica. it's good cause i always loved it and always played it… this game too

  • @greghadden1104
    @greghadden1104 11 ปีที่แล้ว

    This is excellent. I am still a newbie to Python and Pygame, but this is the type of game I'm aiming to create. Quite inspiring.

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

      Its been 7 years, how are your python skills now?

  • @fanreymysterio619
    @fanreymysterio619 10 ปีที่แล้ว

    Epicnerd73 Then keep learning, good sir :)

  • @danvanelli3318
    @danvanelli3318 8 ปีที่แล้ว

    Looks really fun !

  • @face0mcgace
    @face0mcgace 11 ปีที่แล้ว

    This is really amazing, one of the best pygame versions. Are you planning on developing this further? Do you have a dedicated website?

  • @hunterkepley236
    @hunterkepley236 10 ปีที่แล้ว

    Amazing. I just started learning python, hopefully I can get this good in the future.

  • @femboygaming64
    @femboygaming64 5 ปีที่แล้ว

    This is really nice :)
    It's food to know It's possible to make good quality games in python, since it's all I know how to use :)

  • @boavapor7425
    @boavapor7425 10 ปีที่แล้ว

    Cool! This just re-inspired me to keep learning python...

  • @bramsnijders
    @bramsnijders  11 ปีที่แล้ว

    I developed it in my free time, just for fun. I have made the graphics with GIMP/Photoshop and Pixen. I took some inspiration from two other engines I found on the pygame website, in the description I've posted some more info.

  • @cwjakesteel
    @cwjakesteel 11 ปีที่แล้ว

    Wow that looks amazing.

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

    im a beginner learning python, are there any tutorials about adding the visual graphics to the game thats being coded?

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

      Get the module "Pygame" import it, make something with paint or something like.. Else.. Then I forgot how you load it and stuff but search a tut

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

      You can find a fast tutorial for beginners on learnpython.org or if you want to find one from the official site, go to docs.python.org

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

      Aadi Ringay xD i wanna know too

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

      Aadi Ringay or maybe he gave up and chosed other language to learn, who knows

    • @fabiboiii
      @fabiboiii 5 ปีที่แล้ว

      When thinking about visuals, always think of the rendering/blit like LAYERING IN PAINTING
      This game has at least 3 layers for example: Background, Player, Foreground
      Background is rendered first (if you have multiple objects in a cluster you might add another layer to make it clear which is behind what)
      Then you draw the player onto the surface
      And finally you draw things in the foreground (can be player clothes, fences, grass)
      It's all up to your personal preference and effort/time
      EDIT:
      push all the objects into a container, then draw them with a loop

  • @ugamer20
    @ugamer20 9 ปีที่แล้ว

    Lovely neat piece :) i like it .

  • @Meowfy
    @Meowfy 11 ปีที่แล้ว

    I'm a noobie at coding, and Python and Ruby are the first two languages I've been really looking into (tried Java and C++ a long time ago, they don't seem very noob friendly) and this game looks so adorable and cool :D I hope I can someday get to create something like this, and take it somewhere.

  • @chrismac4441
    @chrismac4441 6 ปีที่แล้ว

    That's so cool :) just started learning python about 4 hours ago. 100% programming noob. So far I know how to create a list and a dictionary, and ask the user for an input. Shit....long way to go to get to game dev level, but this little demo has inspired me to crack on. Right...back to the laptop

  • @itsnariah
    @itsnariah 5 ปีที่แล้ว

    Just learning Python in 2 days and now I wanna try how to make games in python and this video made me inspired!

  • @erehh9817
    @erehh9817 4 ปีที่แล้ว

    This is what originally got me into game development all these years ago.

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

    This is an inspiration
    I have been trying to make games but never had time and internet but soon i will

  • @DrKorvett
    @DrKorvett 8 ปีที่แล้ว

    I just started learning python with the (extremely long term goal) of becoming a game developer for fun. This is extremely inspiring!

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

      For people who are reding this,
      If you want to progress through making games, python is not the lang.
      Learn c++/java/c#

  • @ComputerFiguur
    @ComputerFiguur 8 ปีที่แล้ว

    learning Python atm.. its nice to see some results of things made with it! :)

  • @LatitudeMexico
    @LatitudeMexico 5 ปีที่แล้ว

    Great job man! I’m playing with python too using Cocos2d, thanks for sharing 👍

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

    this is very spiritual. i love it

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

    Whoa looks cool man.

  • @NataChocoLatte
    @NataChocoLatte 11 ปีที่แล้ว

    thanks for posting the source code! will help me alot with pygame. awesome game btw!

  • @Fenixloquendofull
    @Fenixloquendofull 6 ปีที่แล้ว

    Well done dude! :D

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

    This is really awesome. Although python is generally an easier language to learn than others, pygame seems way more difficult to work with than unity and other game engines

  • @dawidsierpinski2593
    @dawidsierpinski2593 8 ปีที่แล้ว

    This is sick great game mate

  • @WilliamSlatton
    @WilliamSlatton 11 ปีที่แล้ว

    not bad, good job with the physics

  • @mymusikrawks
    @mymusikrawks 11 ปีที่แล้ว

    thanks bram, it looks great!

  • @Sprouze2
    @Sprouze2 10 ปีที่แล้ว +14

    Awesome! That's the games i like to see people make, instead of making a shitty 3d first person shooter with a level that's only 2000px long!

  • @alexhramalho
    @alexhramalho 10 ปีที่แล้ว

    Hi There Bram! :-) Nice game you have there. I'm just starting to learn Pygame and Python. I'm wondering if you drew all these graphics yourself and what took you the longest to do, the graphics or the game logic coding?

  • @manualvarado2212
    @manualvarado2212 6 ปีที่แล้ว

    Such a beautiful thing

  • @WaffleDude1000
    @WaffleDude1000 10 ปีที่แล้ว

    Good job man, this inspires me to learn Python so I too can make my own games in Python. :)

  • @bramsnijders
    @bramsnijders  11 ปีที่แล้ว

    Thanks :)
    "TheEasternAmerican" also asked the same question in the comments earlier.

  • @goldenraspberries713
    @goldenraspberries713 8 ปีที่แล้ว

    This is fantastic! How long did it take you to make it?

  • @7arkan
    @7arkan 8 ปีที่แล้ว

    all i can say is "thats the best thing iv seen all day
    and btw did you have anyone help you with that?
    or did you do it on your own?
    thnx for sharing this vi, loved it

    • @7arkan
      @7arkan 8 ปีที่แล้ว

      +N H P nvm the " in the mid of the first line

  • @face0mcgace
    @face0mcgace 11 ปีที่แล้ว

    Oh, I worded that weirdly, I mean versions as in out of the people to make a pygame game this def is up there with the best. But I love the pixel art thinking about building a game in this fashion although maybe with elements of C tied to it.

  • @bramsnijders
    @bramsnijders  11 ปีที่แล้ว

    Yes,
    google "python modules" and click the first link; they explain more about modules there.

  • @joeeeee256
    @joeeeee256 5 ปีที่แล้ว

    Really impressive stuff! 🙂

  • @tanweerahmad9049
    @tanweerahmad9049 8 ปีที่แล้ว

    Missing my starting days with java :p
    Good work.

  • @nolanrudolph5463
    @nolanrudolph5463 6 ปีที่แล้ว

    Jesus, I'm just getting into pygame and this is beyond impressive

  • @bramsnijders
    @bramsnijders  10 ปีที่แล้ว

    Thanks :), I made the graphics myself and the game logic coding took me the longest by far.

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

    Woah this is cool. i'm learning pygame ,and this inspires me

  • @NgoWunKnows
    @NgoWunKnows 9 ปีที่แล้ว

    This is pretty neat.

  • @Patrick-nt9tu
    @Patrick-nt9tu 8 ปีที่แล้ว

    This is motivating. Thank you :D

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

    Awesome I love this what module did you use?

  • @sidharthsk3807
    @sidharthsk3807 7 ปีที่แล้ว

    wonderful, really great work,so much like the hit games which are simple and cute :)

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

    hey could you maybe share some of the modules (can't pip vector for instance). Looks good though!
    groetjes medenederlander

    • @bramsnijders
      @bramsnijders  8 ปีที่แล้ว

      +Sam Beard Haha dankjewel!
      There is a link to the vector module in the description (rename "vec2d" to "vector"). Just put that in the same directory. Then it should work.

  • @Shejken1337
    @Shejken1337 11 ปีที่แล้ว

    Nice work! How did you learn Python and Pygame? I am trying to learn at the moment and this is the direction im aiming for :)

  • @billyjoelfan123
    @billyjoelfan123 10 ปีที่แล้ว

    Hi! This game looks really nice!
    I have a couple questions I hope you can answer. I'm a noob (little experience) so you probably know how i feel. I want to make a 2D game that can run as a standalone exe.
    1) Can pygame make .exe games?
    2) How did you start - did you start with pyhton and then move to pygame?
    3) Do you know any good starting places/tutorials for a beginner?
    Thanks so much! I really want to make a game that others can enjoy.

  • @danji9485
    @danji9485 8 ปีที่แล้ว

    In C11 when you create a function with variables from a struct, do you pass them as pointers or references? and what is the difference between references and pointers?

  • @bramsnijders
    @bramsnijders  10 ปีที่แล้ว

    thanks
    1) I made my game on a mac so I used a different method to make an app out of it, but I believe you can use Pygame2exe if you want to make an .exe file for windows
    2) I started with python in a program called "blender". It is an opensource 3d package in wich you can make games with the help of python scripts. After that I wanted to make a game without the help of blender so I used pygame.
    ...

  • @budhvinisreal5216
    @budhvinisreal5216 5 ปีที่แล้ว

    good job mate!!

  • @bramsnijders
    @bramsnijders  11 ปีที่แล้ว

    I've put a link to a pastebin in the description. Be warned though I am a total noob programmer, and I make tons of mistakes. I've only been programming for half a year or so. Credit to Clinton Myers for parts of the Ragnarok engine code that I used as basis.
    Sorry, I don't know any books on python. Just look online, there are dosens of tutorials.

  • @bramsnijders
    @bramsnijders  11 ปีที่แล้ว

    Thanks,
    but I'm using the art I made for this game also for another game. So I'm not going to put the full game online for now. You can still check out the source in de pastbin i've posted in the description. That is the whole game.

  • @16mmDJ
    @16mmDJ 10 ปีที่แล้ว

    wow man, this is impressive!

  • @bramsnijders
    @bramsnijders  10 ปีที่แล้ว

    Look in the description. The 6th link is the one I used to learn how to program basic platformer physics :)

  • @Plasterdeath1848
    @Plasterdeath1848 4 ปีที่แล้ว

    how do you create a double jump function and also how do you create it so that the sprite sticks onto the wall, pls

  • @FurkanVeOyunn
    @FurkanVeOyunn 4 ปีที่แล้ว

    Wow ! Its looks nice.

  • @kanchanjadli1510
    @kanchanjadli1510 6 ปีที่แล้ว

    This is an awesome game

  • @felixlindau3487
    @felixlindau3487 6 ปีที่แล้ว

    JUST AMAZING!

  • @user-dr1yu3wp4d
    @user-dr1yu3wp4d 7 ปีที่แล้ว +1

    good job man

  • @dries1454
    @dries1454 8 ปีที่แล้ว

    great job man