Clear Code
Clear Code
  • 48
  • 13 858 073
Master Python by making 5 games [the new ultimate introduction to pygame]
Thanks to Brilliant for the support, you can find them here: brilliant.org/ClearCode/
This video covers game development in Python. We will create a spaceship shooter, a Vampire survivor style game, Pong, a platformer and a Pokémon inspired battle game. Via those you can master your knowledge of Python since we will touch on every part of the language and use inheritance, decorators, dunder statements and a lot more.
Related videos:
Masks - ua-cam.com/video/uW3Fhe-Vkx4/v-deo.htmlfeature=shared
Tiled - ua-cam.com/video/N6xqCwblyiw/v-deo.htmlfeature=shared
Ultimate intro to Godot 4 - ua-cam.com/video/nAh_Kx5Zh5Q/v-deo.html
Complete guide to Python - ua-cam.com/video/mDKM-JtUhhc/v-deo.html
Find/support me on other channels
Patreon - www.patreon.com/clearcode
Twitter - clear_coder
Discord - discord.com/invite/a5C6pYw2w5
Shoutout to Scarloxy for creating the Pokemon and Vampire survivor graphics: scarloxy
Project files:
start files - github.com/clear-code-projects/5games
stages - drive.google.com/drive/folders/1bUGO9sv5SM3gYO_t9zgifedkQKHUYudO?usp=sharing
Timestamps:
00:00:00 - Intro and pygame overview
00:06:49 - Spaceship game
00:19:20 - Drawing surfaces
00:42:11 - Rectangles
01:03:52 - Movement & delta time
01:29:35 - getting input
01:54:25 - sprites
02:13:53 - working with time
02:36:01 - collisions
02:53:02 - drawing other things
03:12:35 - finishing the space game (transform, masks & sound)
03:45:23 - Vampire survivor
04:00:24 - proper collisions
04:20:23 - creating levels in Tiled
04:42:08 - Creating a camera
05:04:43 - Player animations
05:19:23 - Shooting!
05:45:37 - Enemies
06:03:18 - finishing the game
06:15:29 - Pong
06:41:48 - Collisions between moving objects
06:55:35 - using inheritance
07:04:01 - loading and saving data
07:25:35 - Platformer game
07:40:28 - Platformer logic
07:54:25 - Platformer animations
08:19:37 - Creating timers
08:46:09 - Bees and worms
09:09:20 - Monster Battle
09:28:31 - Creating menus
09:53:05 - Creating more menus
10:12:37 - the battle system
10:28:58 - Adding battle visuals
10:55:37 - finishing the game
Переглядів: 41 772

Відео

Creating a Pokémon inspired RPG in Python & Pygame
Переглядів 46 тис.2 місяці тому
Thanks to Brilliant for the support, you can find them here: brilliant.org/ClearCode/ A RPG that is inspired by Pokemon and Final Fantasy in Python. We will use pygame-ce to create it and in the process you will learn database management, ui design and how to handle a really complex project. Find/support me on other channels Patreon - www.patreon.com/clearcode Twitter - clear_coder ...
Creating an amazing 2D platformer in Python [ SNES inspired ]
Переглядів 73 тис.4 місяці тому
Did you play too much SNES as a kid? Have you been raised by Nintendo and Mario? Time to remake the most famous game of that generation! For this beginners tutorial we will use pygame to create a Mario style platformer game that includes an overworld as well. Thanks to Brilliant for the support, you can find them here: brilliant.org/ClearCode/ Find/support me on other channels Patreon - www.pat...
The ultimate introduction to Godot 4
Переглядів 1,3 млн11 місяців тому
This video is sponsored by NordPass Business: An amazing password manager that allows you to securely store and access unlimited passwords, including wifi credentials and credit card information. You can use it for yourself or for entire teams or share your own passwords easily. You can get a 3 month trial at: nordpass.com/clearcode/ A complete guide to Godot 4! This video will cover every aspe...
The ultimate introduction to modern GUIs in Python [ with tkinter ]
Переглядів 854 тис.Рік тому
This tutorial covers everything you need to know about user interfaces in Python. I will go over all of tkinter, Python's default GUI framework, cover all the basics and then create a BMI app, a calculator and a photoshop style image editor. If you enjoy this course, consider buying the tutorial that covers 7 additional apps: A responsive weather app, the ios stopwatch, a stock market tracker, ...
Creating a Mario Maker style game in Python
Переглядів 483 тис.Рік тому
Creating a Mario Maker style game in Python with a level editor, transitions, enemy behaviour, animations, menus and a player camera. It's a really chunky project. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Timestamps: 000:00:00 - intro 00:01:48 - Introduction and edito...
Creating a Stardew Valley inspired game in Python
Переглядів 641 тис.Рік тому
A Stardew Valley style game in Python and Pygame. This includes farming and foraging, a day and night cycle, weather effects and a merchant. The game was also made in Tiled so you can expand it yourself. You can get my Pygame course here: www.udemy.com/course/learn-python-by-making-games/ If you want to support me check out my Patreon: www.patreon.com/clearcode (You also get lots of perks and a...
Creating 10 Apps in Python [ with PySimpleGui ]
Переглядів 211 тис.Рік тому
In this video you will learn how to create simple python GUIs using the PySimpleGUI library. There are 10 projects in this video: A converter, a calculator, a stopwatch, a text app, the snake game, an image editor, a music player, a weather app and a opencv face detector. There is also an extra video about creating a gui in a single line of code. By the end of the video you should be comfortabl...
The complete guide to Python
Переглядів 467 тис.Рік тому
The complete introduction to Python. This video will cover every part of it and also include lots of exercises so you can practice. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Link to the full course: www.udemy.com/course/learn-python-by-making-games/ Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Project files: gith...
Image Manipulation in Python [ A complete guide to Pillow ]
Переглядів 66 тис.2 роки тому
Basically everything you need to know about image manipulation in Python with Pillow [PIL]. By the end of the video you should be comfortable manipulating images in just about every way. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Timestamps 00:00:00 - Intro 00:01:22 - B...
Understanding decorators [Python tutorial]
Переглядів 25 тис.2 роки тому
A video on understanding python decorators, including the property decorator in classes. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Timestamps: 00:00 - Intro & Decorator theory 03:34 - Function basics 08:28 - Basic decorator 21:03 - Decorators with function arguments 26...
Understanding classes and object-oriented programming [Python Tutorial]
Переглядів 123 тис.2 роки тому
A tutorial about classes and object-oriented programming. I will cover everything you need to create classes, use dunder methods, simple and complex inheritance and how to work with classes and connect objects. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Timestamps: 0:00...
A guide to level creation with Tiled [ + how to use it with pygame ]
Переглядів 124 тис.2 роки тому
A video about Tiled, including terrains, isometric tiles, exporting and objects. I also cover how to import the resulting data into Pygame. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Related videos: Introduction to Pygame: ua-cam.com/video/AY9MnQ4x3zk/v-deo.html Using T...
Breakout in python
Переглядів 60 тис.2 роки тому
A video creating breakout in python. The game includes flexible graphics, sounds, powerups and a cool retro look. If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Related videos: Introduction to Pygame: ua-cam.com/video/AY9MnQ4x3zk/v-deo.html Deltatime: ua-cam.com/video/rWtfC...
Collisions between moving objects
Переглядів 27 тис.2 роки тому
A video about how to do collisions between objects, both static and moving ones. I will use pygame to implement it but the logic should work everywhere . If you want to support me: www.patreon.com/clearcode (You also get lots of perks) Social stuff: Twitter - clear_coder Discord - discord.com/invite/a5C6pYw2w5 Related videos: Introduction to Pygame: ua-cam.com/video/AY9MnQ4x3zk/v-de...
Creating a Flappy Bird Clone in Python / Pygame
Переглядів 56 тис.2 роки тому
Creating a Flappy Bird Clone in Python / Pygame
Understanding framerate independence and deltatime
Переглядів 39 тис.2 роки тому
Understanding framerate independence and deltatime
Cameras in Pygame
Переглядів 115 тис.2 роки тому
Cameras in Pygame
Creating a Zelda style game in Python [with some Dark Souls elements]
Переглядів 3 млн2 роки тому
Creating a Zelda style game in Python [with some Dark Souls elements]
Understanding Pygame masks
Переглядів 39 тис.2 роки тому
Understanding Pygame masks
Easy pathfinding in python [almost without math]
Переглядів 83 тис.2 роки тому
Easy pathfinding in python [almost without math]
Debugging in Pygame
Переглядів 14 тис.2 роки тому
Debugging in Pygame
Creating Space Invaders in Pygame/Python
Переглядів 121 тис.2 роки тому
Creating Space Invaders in Pygame/Python
How to create coding tutorials [or at least how I make them]
Переглядів 109 тис.2 роки тому
How to create coding tutorials [or at least how I make them]
An introduction to programming in After Effects
Переглядів 62 тис.2 роки тому
An introduction to programming in After Effects
The ultimate introduction to Pygame
Переглядів 2,5 млн2 роки тому
The ultimate introduction to Pygame
Creating an animated button in Pygame
Переглядів 35 тис.2 роки тому
Creating an animated button in Pygame
Creating a Minecraft style menu in Python [Ursina]
Переглядів 33 тис.3 роки тому
Creating a Minecraft style menu in Python [Ursina]
Saving and loading in pygame with json
Переглядів 29 тис.3 роки тому
Saving and loading in pygame with json
Creating Minecraft in Python [with the Ursina Engine]
Переглядів 1,7 млн3 роки тому
Creating Minecraft in Python [with the Ursina Engine]

КОМЕНТАРІ

  • @neilpatrickhairless
    @neilpatrickhairless 8 годин тому

    pygame is buggy as a mf and inefficient.... I don't even know if its worth using in 2024 honestly

  • @SummV81
    @SummV81 10 годин тому

    Awesome stuff, loving this tutorial. if anyone has issues with the getting input section, as you can only enter 1 function at a time , this might sound odd but I had to put the next "if Input" directly under the print line. If there was a line gap, it wouldn`t recognise it. Has this happened to anyone else? Is this new for Godot?

  • @BenSuzuki
    @BenSuzuki 15 годин тому

    I think context determines whether people care about accurate physics. pixelated platformer? nobody really cares. Simulation or engineering games? They care a lot! Even in some games that are more simulator adjacent like Arma 3 people care that there is accurate physics. How many times have people complained about getting Arma'd?

  • @kuukrow8603
    @kuukrow8603 17 годин тому

    EDIT: Never mind! I had set my collision capsule for the player model too large and the grenade spawned partially inside the player collision which is what caused the issue. It looked like it was just affected by gravity because it fell in a very similar way, but instead I'm just an idiot lol I'm running into an issue in my project where even after I set the gravity scale to 0 on the grenades, they keep dropping like they're affected by gravity anyway and I can't figure out how to fix it. I've tried recreating the scene in case it was something wrong with that, I've google searched to no avail and I just don't know if its a thing where I'm gonna have to restart the entire project or something. Does anyone have any ideas?

  • @yantra508
    @yantra508 День тому

    Yes

  • @therealmelonious
    @therealmelonious День тому

    I can't imagine learning tkinter without this video, thank youuuuuuu

  • @masque1659
    @masque1659 День тому

    I know this video is years old but I'm having a problem.I'm on the better enemy spawn logic chapter, and I'm having an issue with fly spawns. They don't spawn at all unless I press space, and then when I do about ten spawn in at once. snails are fine though. I feel like maybe I have a few if/else statements out of order or something because it is directly under the code for pressing keys. however when I moved the spawn code to above the key codes, it completely reversed. The snails and the flies were both spawning about ten every second and would only STOP once I hit spacebar, been messing with it for about thirty minutes but honestly I'm stumped

  • @eternalevolution4872
    @eternalevolution4872 День тому

    Man, I recommend this video to ALL my friends. And purchased the course on Udemy just to support. You're awesome! once finished moving to your Godot course! THANKS A LOT! YOU'RE A LEGEND!!

  • @ystijl
    @ystijl День тому

    unicorn of a course with an excellent curve for novices and experienced devs alike. really good. thanks for making this.

  • @eagle1341
    @eagle1341 День тому

    Your tutorials are absolutely phenomenal. God bless you dude!

  • @godcanonen2634
    @godcanonen2634 2 дні тому

    you are the best bro!

  • @siyandamdaka7696
    @siyandamdaka7696 2 дні тому

    This channel is a treasure trove for anyone who understands that knowledge is power🙌🏽

  • @xenonify8446
    @xenonify8446 2 дні тому

    1:42:03 I am getting an error that says self.player = Player((obj.x, obj.y), self.overworld_frames['characters']['player'], self.all_sprites) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ KeyError: 'player' Do you know how I can fix this

    • @ClearCode
      @ClearCode 2 дні тому

      pygame cannot find the player key in the overworld_frames dict; probably something went wrong during the import. You can test that by printing it to see what you get.

  • @trenza2566
    @trenza2566 3 дні тому

    9:02

  • @yarin8350
    @yarin8350 3 дні тому

    Great stuff! I used the box camera and it was easy to implement in my game. Much appreciated :)

  • @FluffyBRudy
    @FluffyBRudy 3 дні тому

    Nice tutorial, is it possible to make video series on procedural map generation and making game using it @ClearCode?

  • @HugoleGogo
    @HugoleGogo 3 дні тому

    Hello ! What a nice tutorial, thanks for teaching pygames ! Just a question: if I care about the slight input lag with pygame.key.get_pressed(), what should I do ? Should I just create a jump function and call it in the event loop on spacebar press ?

  • @MuhammadHanif-pq7eo
    @MuhammadHanif-pq7eo 3 дні тому

    massive respect to anyone who uploads 18 hours of tutorials for free

  • @MuhammadHanif-pq7eo
    @MuhammadHanif-pq7eo 3 дні тому

    massive respect to anyone who uploads 18 hours of tutorials for free

  • @MuhammadHanif-pq7eo
    @MuhammadHanif-pq7eo 3 дні тому

    massive respect to anyone who uploads 18 hours of tutorials for free

  • @MuhammadHanif-pq7eo
    @MuhammadHanif-pq7eo 3 дні тому

    massive respect to anyone who uploads 18 hours of tutorials for free

  • @MuhammadHanif-pq7eo
    @MuhammadHanif-pq7eo 3 дні тому

    massive respect to anyone who uploads 18 hours of tutorials for free

  • @MuhammadHanif-pq7eo
    @MuhammadHanif-pq7eo 3 дні тому

    massive respect to anyone who uploads 18 hours of tutorials for free

  • @hamidrana085
    @hamidrana085 3 дні тому

    Incredibly well explained man. Keep it up!

  • @baalmoloch5213
    @baalmoloch5213 4 дні тому

    in addition here are some infos regarding my config I am using pygame-ce 2.5.0 (SDL 2.30.3, Python 3.12.0)

  • @baalmoloch5213
    @baalmoloch5213 4 дні тому

    i get " pygame.error: Failed loading libpng16-16.dll: La procédure spécifiée est introuvable." but the procedure is in the right place... this error occurs with pygame-ce 2.5.0 and does not occur with standard pygame

  • @CodicologiaUCM
    @CodicologiaUCM 4 дні тому

    This must be the BEST tutorial about OOP in the whole Internet!!! It took me quite an effort to understand OOP conceps. But you make it so understandable and easy! 🎉 What about a series of videos about OOP patterns 8n the same style?

  • @user-hz6ti8nh3g
    @user-hz6ti8nh3g 4 дні тому

    Hello. Thank you so much for such an interesting tutorial. Please tell me, when I switch to level, all the palm trees randomly move to the top and to the left. I tried to find out what was wrong with my code, but I couldn't. Could you tell me where I might have made a mistake? I followed your video, but it looks like I missed something. Thanks !

  • @knight1256
    @knight1256 4 дні тому

    I'm at the step after adding the list for obstacles and having them spawn using the list and the obstacle movement function and every time it summons way to many snails at once where they overlap and trying to figure out if that's suposed to happen and it will fix later or is that a mistake on my end

  • @killerking-
    @killerking- 4 дні тому

    du ns

  • @alphacaprinus
    @alphacaprinus 4 дні тому

    Made it to the final. So much to learn!

  • @baalmoloch5213
    @baalmoloch5213 4 дні тому

    sorry Sir but I tried with pygame 2.5.2 same program same conditions same computer and I dont get any problem managing *.png image file Thanks for your help...

    • @ClearCode
      @ClearCode 4 дні тому

      ehm, what error message do you get? Also, I am using pygame-ce, not pygame

  • @abulhasan923
    @abulhasan923 4 дні тому

    Hide widgets 06:00:00 Class based approach 06:42:00 Function based approach 07:00:00 Responsive Layout 07:27:00 Scrolling 07:57:00 Theme: Azure 09:22:00 Animated widgets 10:40:40

  • @ArcaneCode-lq5pt
    @ArcaneCode-lq5pt 4 дні тому

    Thanks your for the tutorials / your time. ✌👍

  • @YeskoGD
    @YeskoGD 4 дні тому

    This is honestly one of the best tutorials I've ever watched. You get little exercises every now and then (keeping you from falling asleep) that aren't too easy, but still easy enough to make you feel like you're smart. The video is entertaining but you also learn a lot, and it's very easy to follow. This was the first tutorial that was fun for me to follow along

  • @XianBalibol
    @XianBalibol 5 днів тому

    Bro how did you make an 11 hour vid

  • @TheWeedMan11
    @TheWeedMan11 5 днів тому

    I've tried twice before to get into game design but your tutorial broke me through all previous discouragement!

    • @ClearCode
      @ClearCode 5 днів тому

      Thank you so much! Glad it helped :)

  • @muneeb-ci7yw
    @muneeb-ci7yw 5 днів тому

    all was ok until my brain got overloaded with information during complex inheritance

  • @user-xd4pl2bp9m
    @user-xd4pl2bp9m 5 днів тому

    why cant i open the py files in the downloaded file u uploaded? also when i put my own py file in there it doesnt open so i cant use the graphics font and audio