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 - บันเทิง
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.
Ayushmaan G Thanks for the option but I would like to learn Python first and then learn some web browser language. :D
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.
ninja9812 Would you please share with me a copie of these books if you want. Thx. Excuse my english
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
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!")
LOL! smoother gameplay than battlefield 4. Great job man!
what do you mean?
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...
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.
you need a PC
@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.
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
Better then 90% of Steam Greenlight games.
and this was made in 2012, Keep up the grate work!
RIP Greenlight
Great*
OboPlays Correcting a 2 year old comment lol
I care about spelling
a bit too much if i do say so myself
Nice looking game.
Loving the pixel art and when you finish I would love to try it out.
Love the sound effects!
Great job man! good luck with the game.
This is sick man. Love how smooth it was and the animation, amazing :)
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
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
You don't know how much inspiration this gave me. Thanks!
Yo dude, I new to this coding stuff... but i'm pretty sure that what you made is awesme
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/
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.
How is the game going so far?
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.
Game looks pretty tight. Love how you included source code. Thanks for that! Might dig later on and find something useful ;P
Fucking beautiful man. Great graphics, fluid animation and gameplay, interesting dialogue, simply awesome.
If only I had the skills to make something like this ~
twobarells do you have the skills now?
the sound effects on this are sooooo crisp, its incredible
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.
HALF A YEAR? bro, this is awesome.
Brilliant. I love the style and the humour.
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!
This is one of the best characters i've ever seen.
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.
Thank you for letting us see the source code! I am sure I will learn a lot from it.
That is insane how good people are in programing:O
Very impressive man! Great job!
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.
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.
+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.
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)
This is really cool-great job!
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!
This main character looks hilarious. :D good work.
You are going places man
Nice! Keep up the good work man!
Great work!
Motivates me to learn more of Pygame
Wow, excellent work. As a rookie it's great tosee what Python can do. This reminds me a lot of Fez
Have a look at the button and the menu class in the pastebin, and the Button_level_1 class.
hopefully ill be able to program something like that in the future, but yea great job, inspires me a lot
Awesome Work. Very impressed
You just inspired me a lot, I am currently learning Python.
reminds me of poptropica. it's good cause i always loved it and always played it… this game too
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.
Its been 7 years, how are your python skills now?
Epicnerd73 Then keep learning, good sir :)
Looks really fun !
This is really amazing, one of the best pygame versions. Are you planning on developing this further? Do you have a dedicated website?
Amazing. I just started learning python, hopefully I can get this good in the future.
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 :)
Cool! This just re-inspired me to keep learning python...
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.
Wow that looks amazing.
im a beginner learning python, are there any tutorials about adding the visual graphics to the game thats being coded?
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
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
Aadi Ringay xD i wanna know too
Aadi Ringay or maybe he gave up and chosed other language to learn, who knows
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
Lovely neat piece :) i like it .
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.
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
Just learning Python in 2 days and now I wanna try how to make games in python and this video made me inspired!
This is what originally got me into game development all these years ago.
This is an inspiration
I have been trying to make games but never had time and internet but soon i will
I just started learning python with the (extremely long term goal) of becoming a game developer for fun. This is extremely inspiring!
For people who are reding this,
If you want to progress through making games, python is not the lang.
Learn c++/java/c#
learning Python atm.. its nice to see some results of things made with it! :)
Great job man! I’m playing with python too using Cocos2d, thanks for sharing 👍
this is very spiritual. i love it
Whoa looks cool man.
thanks for posting the source code! will help me alot with pygame. awesome game btw!
Well done dude! :D
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
This is sick great game mate
not bad, good job with the physics
thanks bram, it looks great!
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!
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?
Such a beautiful thing
Good job man, this inspires me to learn Python so I too can make my own games in Python. :)
Thanks :)
"TheEasternAmerican" also asked the same question in the comments earlier.
This is fantastic! How long did it take you to make it?
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
+N H P nvm the " in the mid of the first line
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.
Yes,
google "python modules" and click the first link; they explain more about modules there.
Really impressive stuff! 🙂
Missing my starting days with java :p
Good work.
Jesus, I'm just getting into pygame and this is beyond impressive
Thanks :), I made the graphics myself and the game logic coding took me the longest by far.
Woah this is cool. i'm learning pygame ,and this inspires me
This is pretty neat.
This is motivating. Thank you :D
Awesome I love this what module did you use?
wonderful, really great work,so much like the hit games which are simple and cute :)
hey could you maybe share some of the modules (can't pip vector for instance). Looks good though!
groetjes medenederlander
+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.
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 :)
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.
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?
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.
...
good job mate!!
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.
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.
wow man, this is impressive!
Look in the description. The 6th link is the one I used to learn how to program basic platformer physics :)
how do you create a double jump function and also how do you create it so that the sprite sticks onto the wall, pls
Wow ! Its looks nice.
This is an awesome game
JUST AMAZING!
good job man
great job man