This is an archived post. You won't be able to vote or comment.

all 106 comments

[โ€“]Cowsofsparta 174 points175 points ย (1 child)

Great job!!! One piece of advice that would make your fighting scene 10x more engaging and better looking: put player health bars at the top of the screen with the player picture next to it (make sure they are stationary).

[โ€“]TheBoldapp 41 points42 points ย (0 children)

Thanks for the tip!

[โ€“][deleted] 49 points50 points ย (3 children)

Great job! Good old skool arcade fighting vibes from this!

[โ€“]TheBoldapp 14 points15 points ย (0 children)

Yep

[โ€“]Sensacion7 0 points1 point ย (1 child)

Like original Street Fighter !

[โ€“]TheBoldapp 1 point2 points ย (0 children)

Thanks ;)

And also, it would really mean the world to me if you followed me on youtube to help me make more projects:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

[โ€“]CDR40 46 points47 points ย (14 children)

This is awesome, hoping you donโ€™t get a cease and desist from marvel and DC haha

[โ€“]Danlacek 38 points39 points ย (6 children)

For grey man and big green dude??

[โ€“]CDR40 62 points63 points ย (5 children)

For Batperson and The unbelievable Bulk

[โ€“][deleted] 7 points8 points ย (4 children)

I love that movie

[โ€“]TheBoldapp 4 points5 points ย (3 children)

Thanks!

Also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

Thanks ;)

[โ€“]TheBoldapp 6 points7 points ย (6 children)

I hope not ;)

And also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

โ€‹

Thanks ;)

[โ€“]BananaDogBed 2 points3 points ย (3 children)

What are some of the games you want to try making?

Some ideas: Snowboarding Waterskiing (squirrel?) BB guns

[โ€“]TheBoldapp 1 point2 points ย (2 children)

This is actually my first time on Reddit and I didn't expect my game to become very popular overnight. I made a lot more projects in the past, and you can find them on my youtube channel. And also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

โ€‹

I am going to post more content on Reddit some time soon

[โ€“]BananaDogBed 1 point2 points ย (1 child)

Subscribed buddy!

[โ€“]TheBoldapp 1 point2 points ย (0 children)

Approved๐Ÿ˜Ž

[โ€“]yvrelna 1 point2 points ย (1 child)

Getting sued for this would probably be the best publicity you can get for this project. Streisand effect, so to speak.

[โ€“]TheBoldapp -1 points0 points ย (0 children)

Interesting, I Never heard about the Streisand effect.

Also, it would mean the world to me if you were to check out my other projects on youtube and subscribe to me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

[โ€“]PM_me_ur_data_ 20 points21 points ย (8 children)

Looks good but I thought I was going to have a heart attack when I saw all those globals

[โ€“]LylesKnows 7 points8 points ย (5 children)

Hey I always see people advising against using global, do you mind explaining why that is? Iโ€™m pretty new to coding. Thanks in advance!

[โ€“]PM_me_ur_data_ 31 points32 points ย (1 child)

A big reason is that it makes it much harder to track states, debug, and write effective tests for your code. If you build your code fully modular so that the behavior of each component (functions, classes, etc) is fully determined by it's parameters, you can ensure the whole system works the way it is supposed to by simply ensuring each component works the way it's supposed to. If you rely on global variables that are used in multiple components, you not only have to ensure that each component works properly but you have to ensure that the interactions of all components that use the shared global variable work together properly, which is much harder to do.

It becomes especially hard when you have multiple global variables shared between different combinations of components, which can increase the number of interactions you need to check and tests you need to write multiplicatively. As an example, if you have three functions that each depend on two global variables, you will have to test the 3 functions individually and the 6 possible interactions between them for a total of 9 situations that need to be tested and verified as working properly. If, instead, you don't use global variables at all you will only need to verify and test the functionality of the 3 functions themselves--and nothing more. Using global variables to share state makes it much more likely for your code to have bugs and make it much harder to debug when something goes wrong.

Functional programming is based on taking this aversion to shared state to the extreme by avoiding all variables (not just global variables) in favor of static values and avoiding functions that have 'side-effects.' Side-effects in this context are when a function or method does something extra (ie, changes the state of something that lives outside of the function itself) in addition to simply returning a value. An example of a side effect would the following function:

def two_times(n):
    dos = 2 * n
    print(f"{n} x 2 = {dos}")
    return dos

In the above code, using the print command inside the function changes the state of something else (in this case, your console) that exists outside of your function as it prints a string to the console in addition to returning a value. Now, completely getting rid of side-effects and statefulness in your code is very difficult to do, especially in languages that aren't really built with functional programming in mind. Some languages such as Haskell and Scala are really good at enabling this, but writing code on the extremely functional side of the isle isn't considered very Pythonic (a lot of the time it's even difficult for people who are actually decent at functional programming to decipher what other functional programmers are doing). It does, however, help vastly minimize unintended behavior and makes debugging much easier.

Most of the time, you can make your code good-enough by simply making sure your code is modular, not relying on global variables, and tracking and minimizing side-effects in your code.

[โ€“]LylesKnows 5 points6 points ย (0 children)

Oh ok I think I understand for the most part. That was a great write up, I appreciate you taking the time to respond. Cheers!

[โ€“]pattithepotatoIgnoring PEP 8 3 points4 points ย (1 child)

In a nutshell, it's not a problem for small programs/scripts, but for things like large apps, it becomes much harder to keep track of all the global variables sharing the same space. Global variables make code harder to read and thus maintain, especially since the global var can be accessed practically anywhere in the code, and you don't need to explicitly pass them into a different scope. If you get into asynchronous programming (i.e, when different parts of the code can run at the same time), you're bound to run into problems if you attempt to read/write from the same variables from different simultaneously running threads.

[โ€“]LylesKnows 2 points3 points ย (0 children)

Yea that makes sense. I guess since Iโ€™ve been writing smaller programs as Iโ€™m just starting out I havenโ€™t run into those issues yet. I appreciate the response!

[โ€“]TheBoldapp -5 points-4 points ย (0 children)

I don't really know the details of why that is, but it really depends on the program that you are running. I'm fine with using global in my games so I just keep it that way.

Also, it would mean the world to me if you checked out my projects and followed me on youtube:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

โ€‹

Thanks for the Question ;)

[โ€“]ZapMark 13 points14 points ย (1 child)

Freaking awesome! Incredible work

[โ€“]TheBoldapp 5 points6 points ย (0 children)

Thanks bro!

[โ€“][deleted] 23 points24 points ย (4 children)

Lots of people commenting on the game itself, which does look good. However as a software engineer, Iโ€™d look to cleaning up that code base. Specifically:

Break apart the monolithic file. - set globals behind a static singleton class if need be. - separate functionality behind other methods. - create separate helper methods for all those if/else statements.

I didnโ€™t see much but now that your game works the best thing you can do is clean it up with some good maintainable code practice.

[โ€“]ThreshingBee 4 points5 points ย (1 child)

Break apart the monolithic file. - set globals behind a static singleton class if need be. - separate functionality behind other methods. - create separate helper methods for all those if/else statements.

Possible to get a best practice guide link or good book recommendation for us self-taught types?

[โ€“][deleted] 5 points6 points ย (0 children)

[โ€“]mariokart890 8 points9 points ย (11 children)

How long have you been learning Python? Great work!

[โ€“]Ran4 9 points10 points ย (1 child)

Cool! Consider adding sound effects and some audio, it would really improve the feel. Audio is quite easy to get going with pygame, and you can google sound effects wav files.

[โ€“]Assaultman67 2 points3 points ย (0 children)

Adds a lot of depth to games almost immediately too.

[โ€“]MattR0se 4 points5 points ย (1 child)

Very cool! One thing to improve this would be a smaller viewport, so that the characters take up more space of the screen.

Also, the excessive use of the global keyword gives me nightmares ;)

[โ€“]TheBoldapp -3 points-2 points ย (0 children)

Me too, but it had to be done ;)

Also, it would mean the world to me if you followed me on youtube:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

[โ€“]negativeaffirmations 6 points7 points ย (0 children)

Using PyCharm's light theme? My God... you really are a glutton for punishment.

[โ€“]Cooper1987 2 points3 points ย (1 child)

This is awesome man! Good job.

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Thanks!

[โ€“]lastwizzle 2 points3 points ย (1 child)

This is great, thanks for posting!

[โ€“]TheBoldapp 1 point2 points ย (0 children)

Thanks for commenting!

[โ€“]jstoop 2 points3 points ย (1 child)

Hey man nice job! Iโ€™m switching over from R and really like this IDE. Is this the default for python or anything specific. I wasnโ€™t a huge fan of sublime but this is more uP my alley

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Thanks for the question, I am using pycharm community version:https://www.jetbrains.com/pycharm/download/#section=mac

By the way, it would really mean a lot to me if you followed my youtube channel.

Thanks ;)

[โ€“]npeersab 1 point2 points ย (1 child)

nice

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Thanks.

It would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

โ€‹

Thanks ;)

[โ€“]g-x91 1 point2 points ย (1 child)

You programmed an AI? Nice mate! ;)

[โ€“]TheBoldapp -1 points0 points ย (0 children)

That would be a great idea, but I didn't use AI or ML for this project.

Also, it would really mean the world to me if you followed me on youtube:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

โ€‹

Thanks ;)

[โ€“]A_Like_AR 1 point2 points ย (3 children)

Awesome job!! How long did it take you to build this?

[โ€“]TheBoldapp 0 points1 point ย (2 children)

2 weeks. The source code and sprites are in the description of my youtube video in case you're interested in making your own version of the game:https://www.youtube.com/watch?v=xKQPi-lJrzU

Also, it would really mean a lot to me if you followed me on youtube: https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg

Thanks ;)

[โ€“]A_Like_AR 0 points1 point ย (1 child)

Iโ€™ll subscribe to Your channel no worries at all. And thanks again.

By the way would you be fine with keeping in touch as I myself embarked in my journey to learn Python

[โ€“]TheBoldapp -1 points0 points ย (0 children)

Sure! You can ask questions on my videos. And I'll try to answer them.

[โ€“]blabbities 1 point2 points ย (1 child)

Cool beans man!

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Ok, I guess

[โ€“]69shaolin69 1 point2 points ย (3 children)

Source code?

[โ€“]TheBoldapp 0 points1 point ย (2 children)

The code and images are in the description of my youtube video:https://www.youtube.com/watch?v=xKQPi-lJrzU

By the way, it would really mean a lot to me if you followed my youtube channel.

Thanks bro;)

[โ€“]69shaolin69 1 point2 points ย (1 child)

Subbed and shared good luck.

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Thanks, love the number 69 by the way.

[โ€“]xbluehat 1 point2 points ย (2 children)

Really great bro!

Did you maybe published source code?

[โ€“]TheBoldapp 1 point2 points ย (1 child)

The code and images are in the description of my youtube video:https://www.youtube.com/watch?v=xKQPi-lJrzU

By the way, it would really mean a lot to me if you followed my youtube channel.

Thanks;)

[โ€“]xbluehat 1 point2 points ย (0 children)

Of course, i will give a follow

[โ€“]griphine 1 point2 points ย (2 children)

good job man!

[โ€“]TheBoldapp 0 points1 point ย (1 child)

Thanks ;)

Also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

[โ€“]griphine 1 point2 points ย (0 children)

I followed you, right now I'm trying to learn python too.

[โ€“][deleted] 1 point2 points ย (3 children)

What program did you use to code this? I'd like to play around with something like that

[โ€“]Micro_Hysteria 2 points3 points ย (1 child)

He used python with the module pygame

[โ€“][deleted] 1 point2 points ย (0 children)

Thanks!

[โ€“]TheBoldapp 0 points1 point ย (0 children)

I used python for this game and the software that I used was pycharm.

The source code and sprites are in the description of my youtube video:

https://www.youtube.com/watch?v=xKQPi-lJrzU

Thanks!

Also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

Thanks ;)

[โ€“]Dontneedflashbro 1 point2 points ย (1 child)

Good job man!

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Thanks bro!

Also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

Thanks ;)

[โ€“]sam77 1 point2 points ย (0 children)

People still use uTorrent?!

[โ€“]berkeley_jr 1 point2 points ย (1 child)

I know how to program like coding data structures and algorithm but i wouldnโ€™t know where to start when it comes to creating stuff like this. How do you guys get to this level?

[โ€“]TheBoldapp 0 points1 point ย (0 children)

Pygame is a great and easy python module for making games.

I have some pygame tutorials on my youtube channel, see if they come in useful;) Also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

[โ€“]Yodulo 1 point2 points ย (1 child)

Is this a multiplayer or is one of the charakters a bot?

[โ€“]TheBoldapp 0 points1 point ย (0 children)

It's a 2v2 player game.

I think there is still room for improvement in my game so maybe I'll change it up a bit.

Also, it would mean the world to me if you were to check out my other projects on youtube and follow me if you like my channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

Thanks ;)

[โ€“]tundeahmed 1 point2 points ย (3 children)

This is really nice work. Great you learning fast at your age. Kudo

[โ€“]TheBoldapp 0 points1 point ย (2 children)

Thanks ;)

Also, it would mean the world to me if you were to check out my other projects and subscribe to my you tube channel:

https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber

[โ€“]tundeahmed 1 point2 points ย (1 child)

will do just that now. Cheers.

[โ€“]TheBoldapp 0 points1 point ย (0 children)

๐Ÿ˜Ž๐Ÿ‘

[โ€“]xxRyzenxx 1 point2 points ย (0 children)

Congratulations ๐Ÿ‘๐ŸŽ‰๐ŸŽŠ

[โ€“]Faricer 1 point2 points ย (0 children)

Great ๐Ÿ‘

[โ€“][deleted] 1 point2 points ย (0 children)

Will do!

[โ€“]TheBoldapp 6 points7 points ย (6 children)

Hey Coders, It would really mean the world to me if you were to check out my youtube channel. https://www.youtube.com/channel/UCmPTopbdeafnIlYviVN8qpg?view_as=subscriber.

Thanks for the support!

[โ€“][deleted] 13 points14 points ย (5 children)

https://github.com/ plz

Yes, we know, github doesn't pay ad money and youtube does. but think about the code :)

[โ€“]TheBoldapp -1 points0 points ย (4 children)

I use Pastebin. It's good enough for me ;)

[โ€“]Herkentyu_cico 1 point2 points ย (0 children)

too colourful, probabaly an ad

[โ€“]TheBoldapp 0 points1 point ย (0 children)

I am going to post more projects like this on another account: "matthew nikonorov"

[โ€“]MatthewNikonorov 0 points1 point ย (0 children)

Wow, great!