Tank Game Code Review
Code Reviewing a Tank Game sent in by a fan who wished not to be named. Overall, good job.
Want your code reviewed on my channel? Send an email to [email protected] with your code and a brief explanation on what it is. Make sure to include your YouTube channel, Google+, Facebook, Twitter, or anything you want.
Hope you enjoyed the video!
Check out this code here:
Join my Discord server to chat with me:
Check out some code on my GitHub:
Tweet me something funny on Twitter:
Say hi over at Facebook:
Hate to rain on y'alls parade, but this is example code copied pretty much verbatim from a book on Python Game programming. Not an original work. The book is called Beginning Game Development with Python and Pygame written by Will McGugan. The code is on pg 30-31 with full explanations of its functionality. Sorry to ruin this video for you guys. Good code review tho.
I got the book from some random course I took on Game Programming a while back.
P.S. I am not sure if this was an intentional thing or not, but if it was some clarification would be appreciated.
Would you have a problem with some Unity C# code for review? It's a 'bit' lengthy (about 1500 lines so far with brackets) 😀 Also, it's kind of a prototype of a strategy game so far I made as a project a while back (like there's no real end to the game yet, but some core functionality like gathering ressources, building units in buildings and dealing damage is there already).
Great videos btw 🙂
Your explenation of things is really well done and I wouldn't mind some more complex stuff.
Have a sub.
You are awesome please keep making videos like this……
Code review 👏👏
I liked it. I don't know any programming but I want to learn.
Do you do Java as well?
Great video. Getting to see the mistakes and corrections is truly helpful.
Great code and code review.
I strongly suggest beginners to start learning python3 instead of python2 : you got no pre-existing bias, being beginners, and python2 is bound to be replaced by python3.
I really like the 'open source' & 'community' vibe of this channel. Positive code review . I'm no Python expert, but I am Python literate and I enjoyed how the approach to troubleshooting was explained. A debug journey that is actually entertaining. Go fig.
Just an idea to upgrade this, to add another dimension onto the game look at making the tanks movable. You could do this by havign a coordinate system with each tank places on a grid, each round a tank is givien the option of either firing or moving, and the closer 2 tanks are to each other the more likely they are to hit.
You would have to add a coordnate atribute to the tank object (i.e. Tank.x and Tank.y).
A movement method, maybe something like Tank.move(distance=1, direction='up').
Maybe even add basic collision detection.
Then you would have to make a distance calc function using Pythagoras theorem (a^2=b^2+c^2).
Then a random hit or miss function which would take as input the result of the distance function to increase / deacrese the likelyhood of a hit or miss. There are many fun ways to implement this.
If you want you could implement a playing field class to handle all of that.
And maybe as iceing on the cake try and print it out as a text graphic.
It would be cool if as part of your show in the future you not just review code but make sugestions on how to upgrade it and maybe even do a few upgrades yourself.
Would you be willing to review a unity project? Would love your comments on how I half-assedly hacked together tetris….
What code lanuages can the codes for the code reviews be in?
Whoever made that.. That's pretty cool! I'm glad you sent it in!
Code Review is simply awesome.
Please keep making Code Review Videos.
How did you mass edit the print (….) ? especially the trailing )
Subscribed, keep up the good work Engineerman
We need more of these
To whoever sent that program. Good job and hopefully you're still doing it, keep it up and it'll bring you good things. Cheers!
This video was awesome. I am also a beginner and it was extremely helpful to watch someone who is very good to quickly identify errors and be able to think through what the author intended. I will look for more of these. Thank you for posting 🙂
typos….can be a person worst nightmare.
I’m trying to learn how to program and picked python. I’m learning programming as an older student, I’m in my late 40’s. I enjoyed this format. Hopefully others do too and you’ll continue. Thanks for teaching this old dog some new tricks.
Great that you do such reviews.
They are great fun to watch and really helpful too.
What tweaks did you do to Atom
I know that's outta the subject, but do you work?
I don’t even know Python as I’m currently refiner my JS, but the thought process and logic is very helpful and broaches the language barrier pretty seamlessly. Pretty sweet how the concepts translate so well.
Keep it up! Thanks
Eng. Man, how in the world did you select all commands listed and edited them all at once? It must be a shortcut on Atom and I believe debugging becomes much easier when you are able to edit multiple (equal) commands or syntax lines at the same time. Thank you always for sharing your extensive knowledge and logic in programming code analysis.
Do you know emacs lisp? What about PHP,? Have stuff for review…
Great review, hope to watch more of these. Very informative of both improvements and how to write python script.
Thanks E. man
I've been watching various videos on your channel for a few months now but this one finally pushed me over the edge to hit the sub button. Question: do you review C# code? I've got a small project I wrote about a year ago that I wouldn't mind having your eyes on.
How did you correct all 4 print statements at the same time (without find and replace) — its magic 🙂
Loved the analysis
Make another one!! also are computer scientists allowed on the engineer channel? xD
Awesome videos😍👌👌👌upload more game codes videos…. 🙏💯💯
Very nice code review! I like the respectful way, with which you approach someone else's work! It is supportive and very motivating! Thank you!
Why would anyone send an (probably) not tested code for a review?
I just found your channel and i loved your style. Totally gonna come back for more.
Tanks for the video 😉
Question for a beginner like me, how about the KeyError part? I can't get the message "No such tank".
This seems like something someone would write in java as the _str_ was used like a java toString but not implemented the way you fixed it to have been in python! Nice stuff still your videos teach me something every time!
More Python code reviews please!
We need more Code Reviews.
Did we check the use case if someone dies and we decide to fire on the same tank again?
Like what does it do then??
BTW huge fan of your channel. Great code review!
If I had code reviews like that, when I was starting… Maybe I wouldn't have grey hair strands by 25 🙂
Nice review. I like how you emphasised the positives and downplayed the minor issues. The author will take it well and learn from this positive experience. You've shown humility and experience. 👍🏻
I enjoyed the Code Review Video. I thought you were very considerate in your review, and helped teach rather than just criticize. I enjoy your channel and would like to see more code reviews like this and even if they are more technical. When you are making quick edits like in the few that you made in the Tank Game, could you take a moment and share your keystrokes. I always seem, to have a difficulty in getting edits made properly in VSC when they involve multiple lines and locations. Thanks for the Great Channel. Respectfully Robert Tonkavich
I don't know if you did already, but why don't you go on reddit and check out r/badcode and review and give your opinion on those.
Maybe sort by top of all time to get the absolut worst code posted for the first video and then sort by top of last week for a little weekly series
Awesome. Please do more of that!
This was great to watch!
At what stage of the learning to program journey should someone be able to produce something like this?