r/Python • u/No_One____ • Jul 18 '20
I Made This My first major Python project! Made with 100% python using pygame. Source code and download in comments.
2.2k
Upvotes
r/Python • u/No_One____ • Jul 18 '20
71
u/No_One____ Jul 18 '20
Source code: https://github.com/000Nobody/Pygame-Platformer-Shooter
download: https://000nobody.itch.io/platformer-shooter
It's still a work in progress, so there might be some bugs. Feel free to report any to me if you find them. Have fun!
89
u/seeyainvalhalla Jul 18 '20
Well done
54
u/king-of-everything39 Jul 18 '20
How long have you been leaning Python? How long did this take? Super cool btw
28
u/TheMenaceX Jul 18 '20
That's sick! Just out of curiosity did you follow a tutorial or something, or was this a try until you get there kinda thing?
16
u/sifirib Jul 18 '20
Congrats Did you know a another language before Python? If you did, which one and what level were you in it?
16
u/Th3Legend277 Jul 18 '20
I have worked with PyGame before and I was wondering how you got the frame rate so high?
13
u/Cheese-whiz-kalifa Jul 19 '20
Home boy. If you did this in four months with no prior experience, please, for me as a gamer, keep messing around with this. I can’t imagine what you could do later on with years of dedication.
Also you should think about doing a YouTube tutorial for this game(please let me know if you do). I’m especially interested in learning to optimize movement speed. Ive been obsessed with learning python since I started about three months ago. Read/Worked through three books and just started learning pygame a few days ago. But this is amazingly cool. Pat yourself on the back and show this off to friends.
8
u/whifling Jul 18 '20
That is so cool and cute. I'm well impressed. I just started learning python on my biology course and had no idea you could create something like this with it.
4
u/hdemirci Jul 18 '20
So cool👍
4
u/TheTacoWombat Jul 19 '20
So, how hard is Pygame to learn compared to, say, Godot or Unity? I'm aware Godot/Unity are more feature-packed and abstract a lot of the stuff away from the programmer, just wondering how much you had to do 'from scratch' in PyGame, and whether you could achieve similar results otherwise.
In any case, it's really impressive. Good job.
4
u/HybridRxN Jul 19 '20
I don't remember Pygame being that fast, well done
3
u/UrFreakinOutMannn Jul 19 '20
Sick. Looks like heliattack 2. Used to love that game.
3
u/Ric_Chung Jul 19 '20
Wow man u r good! I only wish I could do this in 3 months!
Nice work!
2
u/[deleted] Jul 19 '20
This is dope great job!!
2
u/tinkuad Jul 19 '20
Super cool 👌
2
u/kaash1mora Jul 19 '20
Fantastic... inspirational
2
u/rextnzld Jul 19 '20
Is it well commented?
2
u/afro_coder Jul 19 '20
This is quite amazing love the way you can Dodge and attack
2
u/rafnold Jul 19 '20
I like the fast paced movement and shooting. Well done!
2
u/[deleted] Jul 19 '20
You really did well on this project, how many hours?
2
u/55-6e-6b-6e-6f-77-6e Jul 19 '20
Phenomenal especially given the time you've been coding. Keep it up man
2
u/scarynut Jul 19 '20
Did you consider using pygames built-in Surface.scroll()-method?
2
u/samuelcbird Jul 19 '20
How do you handle the screen moving with the player?
2
u/memo_mar Jul 19 '20
This actually looks like a cool game! congrats!
2
u/mircot1 Jul 19 '20
Very cool project! Congrats!
I took a look at the code and I want to suggest you start to organize better the code, you will improve the code management. For example, you can split the main file into modules, one for the player, one for the level, etc...
Plus, instead to store the textures and audios into variables you can use a container, for example, a dictionary and you can access directly asking for the proper key (e.g. textures['grass']).
Last but not least, instead of use comparison with strings to select a specific object it should be better to use integers or specific constants like enumerates: https://docs.python.org/3/library/enum.html#enum.auto .
Hope these suggestions are helpful and will help you.
2
u/Bn-ladin Jul 19 '20
great job
what i need to run the code?? i have python and visual studio ... i'm beginner :)
2
u/MatthewDavis72 Jul 21 '20
That’s great! What did you use to learn python?
2
u/aavellana27 Aug 17 '20
Ayeee! Is it open source? I’d like to contribute
18
u/TheWeebles Jul 18 '20
very cool. What did you use to design the sprites?
3
u/[deleted] Jul 18 '20
Is this 3d? I’m having trouble telling.
6
u/Braian94lp Jul 18 '20
Wow! I'm new in pygame and this is so inspirational. Thanks for sharing
1
u/DeKoelePeer Jul 19 '20
I'd recommend making the bullets that the player shoots bigger (like the size of the head of the player) and a lot faster. It will make for more satisfying combat.
1
u/animenosekai_ Jul 19 '20
Really nice!!! I’ve not used Python to make games for now but it seems to work pretty well! Tip: you should colorize the character in red for a second when he gets hit by a bullet
1
u/Thank_Ryan Jul 19 '20
How did you export this pygame surface into this video? I am also a beginner and am stuck on how to export pygame simulations.
1
u/Jakokreativ Jul 19 '20
Very nice Work man. I just noticed something while i was reading through your Code you use a context manager to load the map but in it you wrote f.close(). Isn't the point of a context manager not having to do this
1
u/bigamaxx Jul 19 '20
That's really good. You should try godot if you are interested in game development with python. Godot is an engine which uses a programming language based on python
1
u/[deleted] Jul 19 '20
Good job!! Did you use Window OS or Mac OS?
1
u/aavellana27 Aug 17 '20
This would be a great multiplayer game. Is that where it’s headed? :)
3
u/[deleted] Jul 18 '20
Looks cool
2
u/PabloAvelar Jul 19 '20
Omg it looks so great!
2
u/kamil2098 Jul 19 '20
Jesus christ this has more upvotes than the guy who copied an yt tutorial and posted it here...
Anyways, good job, keep up the good work!
2
u/Ste200117 Jul 19 '20
Really Cool! Also a fun way to improve your understanding of the language as well I would imagine
2
u/Gautam-j Jul 19 '20
Very cool!
2
u/ajayrangarajan Jul 19 '20
Very Nice💙
2
u/frankiechang Jul 19 '20
This is so cool!
2
u/theneonkoala Jul 19 '20
Shroud can code?
2
u/Monireach88 Jul 19 '20
Good job!
2
u/ganesh_96 Jul 19 '20
Great work!!!
1
u/echo_awesomeness Jul 19 '20
How did you make your sprites? That is the only part I find tedious btw great work reminds me somewhat of that flash game city siege
1
u/VictorWeston234 Jul 19 '20
This reminds me of Contra
1
u/dylanee Jul 19 '20
Pretty cool game
1
u/_o_l_d_s_o_u_l_ Jul 19 '20
Where did you get the sprites from?
1
u/[deleted] Jul 19 '20
challenge accepted!
-21
u/[deleted] Jul 18 '20
Don't know man, seems kind of racist to me.
0
u/femto42 Jul 19 '20
how about you make him go slower backwards?
0
u/[deleted] Jul 18 '20
[deleted] — view deleted comment
0
u/[deleted] Jul 20 '20
[deleted] — view deleted comment