Create an Idle Clicker Adventure Capitalist Style Game in Python Using Pygame! Full Game In An HOUR! -

Create an Idle Clicker Adventure Capitalist Style Game in Python Using Pygame! Full Game In An HOUR!

LeMaster Tech
Views: 1263
Like: 46
Learn to create an idle click style game in the model of the classic and popular adventure capitalist style of app by using python and pygame!
This is the compilation of our full series that covers start to finish how to create this entire game from scratch! We cover the basics of python and pygame code creation while also diving into more advanced programming concepts in this series!

Episode 1 covers the basics of defining the board game space, as well as importing the module, defining screen dimensions and creating a library of colors. Additionally we create a function to draw the tasks onto the screen rather than defining each individually. We then cover conditions for exiting out of the game as well as displaying text for the value of each event onto the buttons.

Episode 2 in the series handles the actions from the player of actually clicking on each button and updating the money or score the player has accumulated so far! This includes getting the position of the mouse upon clicking and checking if the coordinates are aligned with any of the defined event buttons.

Episode 3 includes the drawing of the buttons for purchasing more of each event commodity and displaying the manager buttons that would allow the player to automate each task. Additionally we block transfer (blit) text onto the screen showing the cost of each element and round all numerical value to only two decimal places.

Episode 4 concludes the series by handling the actual purchase and automation of each task when the managers are purchased, as well as increasing the value of each event and the cost of purchasing more of each event.

Thanks for checking the video out and be sure to be on the look out for more great content and check out the channel for dozens of useful python tutorials like this!

Be sure to like, subscribe, and leave a comment on what you found useful or what you’d like to see next!


  1. Thanks, man 🙂 First idle clicker game I created because of your help.

  2. Hi! this is such an amazing and useful tutorial so thank you so much for it. However, i was wondering how or if you could add a feature where you only start with one bar, and are required to purchase the others, for example, you start off with only the green one and then unlock the red, orange, white and purple by paying for them. Thanks and great tutorial again!

  3. broyou really are helping me, I'm making a game for me and my friends, it's like a Elon Musk Simulator, but with memes and you make lots of money, I think it's funny and this video is perfect to learn how to make this gamethanks :))

  4. can u paste the code here pls?

  5. COLOR LIBRARY SCRIPT:#color library
    red = (255, 0, 0)
    green = (0, 255, 0)
    blue = (0, 0, 255)
    white = (255, 255, 255)
    black = (0, 0, 0)
    purple = (127, 0, 255)
    orange = (255, 165, 0)

  6. where do you define the task variable in the reuturn bit in part 2? i can't run mine from there on as it says it is undefined

  7. thank you so much! ive been wanting learn python for months and this video rly helped!

  8. Thank you very much for this tutorial, it's really useful.But…Please, please, separate your game logic from your display!It's way better to add/modify functionalities or display without breaking everything.Copy copy copy… Please, use objects or at least dictionaries.You do say so in your tutorial "It would be cleaner", well, do it then =P"task1, green_length, draw_green"REEEeeee! Make up your mind already!Use "task1, length1, draw1" or "green_task, green_length, green_draw" or green = {"task":None, "length":40, "draw":False}The problem by using 40.000 variables is that it doesn't structure the mind of the learning coders and is a hell to maintain or to add features later on.Make generic functions.The first one I did is:# Draw textdef draw_text( coords=(0,0), text="None", color=(255,0,255) ) : textCanvas = font.render( str( text ), True, color ) screen.blit( textCanvas, coords )If you are interested, here is my version. it's not perfect either, but maybe it will give you ideas?Also, here are the timestamp. Just put them in the video description and Youtube will automatically add chapters.0:12 Part1 – Draw the tasks13:54 Part2 – Execute tasks28:19 Part3 – Draw more buttons44:18 Part4 – Finish the gameAs for the structure of your tutorial, maybe rearrange it.First explain what the game is and what the functions will be.Then, do only one "task" using variable.Then, change it using dictionaries or arrays or objects, and presto, you can add all your "tasks"Then, add the upgrade/manager. It should be easy as everything is separated now.Last, closing remarks and such.Also, maybe talk a bit about code versioning. Even without doing it in the tutorial.It's very important when you learn how to code to also learn how to save it.A very simple zip with timestamp is enough when you start. A commit using git would be even better.I think a commit per chapter is enough as you separated the big functions nicely.Sorry for the wall of text, but your tutorial is really good, and can't help myself but want to help making it even better.I code game for a long time now, but I am new to PyGame, and your tutorial is very nice.Cheers!

  9. Good video, I appreciate the tutorial, I learned a bit of how functions work, and it really helped me grasp the concept of functions in python.

  10. OMG this was awesome man. i cant thank you enough. i have just started programming with a dream career of being a software engineer and this was a great tutorial to help me learn. i completely finished the project and am now fiddling around with certain aspects to make it my own. Thank you!!!!

  11. Brilliant! TYSM 👏 now going to play around to add more features I.e. multi buy, achievement messages and then icons too 😬😁

  12. hi, nice job! any chance for sharing the code?

  13. Hello Everyone im up to 25:50 when i click the buttons instead of the bars moving i get the circle and rectangle disappear and nothing happens. pls help this would be much appreciated…

  14. Hey great tutorial!
    Im just getting into programming, and i was wondern wheter its a good idea to do the things like tasks, as a object from a class? And what are the advantages and disadvantages

  15. where do you write this code? i downloaded Python and Pygame but neither pull up this editor

  16. Do you know how I could make a "per second" function that still runs while i do other stuff? I tried making it with threading but it didn't work. I asked on StackOverflow and i got a response that said I cant hijack events in the main loop but I have no idea what it means.

  17. Hello! im at 10:10 and when i run my code the window opens but nothing in it but when i close it just 3 seconds before it closes the circles and rectangles show up any solutions?

Leave a Reply

Your email address will not be published.