Python/Pygame Checkers Tutorial (Part 1) - Drawing the Board

  Рет қаралды 144,418

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 269
@TechWithTim
@TechWithTim 4 жыл бұрын
What other tutorial series do you guys want to see?!
@Roknok
@Roknok 4 жыл бұрын
I have a request you once showed a drawing screen where we could save the drawings too I wish you could make a tutorial on that
@kirollssabri4651
@kirollssabri4651 4 жыл бұрын
Can you make how to build a website from zero and thanks for your help ❤️
@ArryNation
@ArryNation 4 жыл бұрын
Can you please make the game ludo with pygame
@ArryNation
@ArryNation 4 жыл бұрын
@UCnrv_eurX5cOYfX1_tQ14xg He does not do html
@patjr35234
@patjr35234 4 жыл бұрын
maybe a os tutorial?
@prashantsaxena133
@prashantsaxena133 4 жыл бұрын
Happy teacher's day sir...... Teachers' Day is a special day for the appreciation of teachers. And, you made me understand a lot of things whether it's tenserflow or python or flutter ..... Or any tech here's the spot I come for ..... Thank you sir for being a guide to me in my journey....
@Rurdock
@Rurdock 4 жыл бұрын
This is an incredibly solid tutorial. Not only about making Checkers, or using Pygame, but to improve the use of Classes, Modules and how to structured the code. I started very recently and learned a LOT from this tutorial and the rest of the channel. Thank you very much Tim.
@AnoojShete
@AnoojShete 4 жыл бұрын
Teaching is the one of profession that creates all other professions. Thank you for helping me to become the person I am today. Happy teachers day! 🙂
@ImFoxyGrandpa
@ImFoxyGrandpa 4 жыл бұрын
Brand new teacher who stumbled backwards into a computer science teaching gig this year. Your videos have helped bring me up to speed before the new year. Thanks mate.
@kiran10110
@kiran10110 3 жыл бұрын
Such a concise and crisp tutorial. Better than anything my professor has been trying to show us lol
@roryderrick8461
@roryderrick8461 4 жыл бұрын
Thanks again Tim for a great tutorial. I wasn't so much interested in checkers but found your folder structuring and file naming conventions VERY useful. Its one thing to see a tutorial on how to do this and another to see it in practice. Great job and thanks!
@kavinbharathi
@kavinbharathi 4 жыл бұрын
Perfect timing... I learnt about minimax from coding train. Now implementing using python and pygame. Awesome
@amirfirdaus3573
@amirfirdaus3573 4 жыл бұрын
Just a suggestion that it would have been more helpful if you make an introductory video on how you approach and the thought process to create the checkers game beforehand so we can grasp the whole logic in the coding much easier.
@jamesingleton2293
@jamesingleton2293 9 ай бұрын
Hi Tim, great tutorial, thank you. I just wanted to make you aware of an issue with the subtitled comments on your video at 7:52 -7:53. It seems to think you say the F word 😂
@ChupoCro
@ChupoCro 4 жыл бұрын
@21:16 (line 15) you should swap *row* and *col* in *draw.rect()* although the end result is the same.
@craiglobo2165
@craiglobo2165 4 жыл бұрын
Damn your editing skills have increased
@wertuxhd6201
@wertuxhd6201 4 жыл бұрын
The bg on your wall as always and the gamee.. Lets start a new seriesss finally! Tim you are denitely netflix for me :D Learned everythin from you..
@lukemcleod8392
@lukemcleod8392 4 жыл бұрын
started off programming with pygame - this is very cool
@programmingwithpranav2366
@programmingwithpranav2366 4 жыл бұрын
Hey Tim, Will you make a series teaching how to make agar.io or paper.io or diep.io or any fps game in Python Day - 12. Like so he can see(btw I am the first viewer)
@royal6355
@royal6355 4 жыл бұрын
Great idea.
@programmingwithpranav2366
@programmingwithpranav2366 4 жыл бұрын
@@royal6355 Thanks
@dimosthenistheocharis9987
@dimosthenistheocharis9987 4 жыл бұрын
yeapp
@davefinn6031
@davefinn6031 3 жыл бұрын
Top video Tim. really enjoying your tutorials!
@killianward9127
@killianward9127 2 жыл бұрын
You're videos are great, you should consider using a circular facecam, it would make your videos look really slick
@rammohankudva5497
@rammohankudva5497 4 жыл бұрын
Congrats on 400k subscribers ur doing a really good job 😃
@akshaysharma8562
@akshaysharma8562 4 жыл бұрын
Yes we want more intermediate stuff and want to learn the applications of data structures ,mL and ai ,neural networks from u bro love your work
@unknownpy5003
@unknownpy5003 4 жыл бұрын
WOW thanks tim I also bought your merch and its sick. Nice job with the merch and the videos you make!!!
@Omer-jb2io
@Omer-jb2io 4 жыл бұрын
what text highlighting extension do you use?
@tommeer88
@tommeer88 3 жыл бұрын
Nice tutorial! How do you set up your syntax highlighting? I really like yours
@Oliverkor
@Oliverkor 3 жыл бұрын
you figure it out by any chance? I like it too!
@kiduskin8024
@kiduskin8024 4 жыл бұрын
thanks man this was so helpful
@iulian96c
@iulian96c 4 жыл бұрын
Thank you for this amazing tutorial! I actually begin working on a TBS game in pygame and I found inspiration for the board and how to make the logic of the pieces (units) on top of the actual board (map)
@CalBart42
@CalBart42 4 жыл бұрын
woww dude ... cant wait for part 2 ...
@hugofoltin5647
@hugofoltin5647 4 жыл бұрын
Please do the minimax algorithm, I have been trying to implement it on tictactoe, and I just couldnt do it. It would really help me
@TechWithTim
@TechWithTim 4 жыл бұрын
The next series will cover that!
@hugofoltin5647
@hugofoltin5647 4 жыл бұрын
Tech With Tim thanks :)
@jhudk2d
@jhudk2d 4 жыл бұрын
related to that, I found a package with the implementation of the monte carlo tree serch algorithm for two player games. It comes with an example, which happens to be the tictactoe game. I used that package to build a two player cards game and I learned a lot understanding the implementation of the algorithm and how are structured its classes and methods. It is called mctspy, you can find it in pypi . org
@15tefera
@15tefera 4 жыл бұрын
you are literally me right now but with chekers
@shohvaliev2178
@shohvaliev2178 4 жыл бұрын
I was wondering which theme you are using in the video??
@pythontutorials6506
@pythontutorials6506 4 жыл бұрын
pls tell when 2nd part is coming ??
@SkyFly19853
@SkyFly19853 4 жыл бұрын
Thank you so much for these tutorials!
@alixaprodev
@alixaprodev 4 жыл бұрын
I have never played this game but It was very informative tutorial.
@pranay5992
@pranay5992 4 жыл бұрын
@Tech With Tim i think you should consider refactoring and improving code on some of your previous pygame projects(like side scroller) as i believe that would help you as well as the viewers. Keep up the good work as always
@nzf-kx2qol1g12
@nzf-kx2qol1g12 4 жыл бұрын
Salutaions, no ads👏👏👏
@moreorlesspro4869
@moreorlesspro4869 4 жыл бұрын
A true gamer and a coder plays counter strike just like tim
@ViratKohli-jj3wj
@ViratKohli-jj3wj 4 жыл бұрын
I love ur videos buddy
@pepemesquita4785
@pepemesquita4785 4 жыл бұрын
Tim, why are u using VScode instead of pycharm? You´ve previously sad you preffered pycharm, did u chage your opinion, or this is especificly to this project?
@faneeshmunjal2880
@faneeshmunjal2880 4 жыл бұрын
And till the next video you will have 400k subs 🎉🎉🎊🎊
@RohanKumar-zd3pc
@RohanKumar-zd3pc 4 жыл бұрын
I learned how to play checkers by watching this video
@AnimeThings_
@AnimeThings_ 4 жыл бұрын
first time i am loose to comment first in this channel
@matthewcunningham2278
@matthewcunningham2278 2 жыл бұрын
From checkers.board import Board not working for me
@reemmikulsky1382
@reemmikulsky1382 4 жыл бұрын
l would like to see more height level tutorials in pygame your content is very good you teach like a master thank you for all the tutorials love you
@josetem14
@josetem14 4 жыл бұрын
18:02 Tim I just wanted to thank you, I'm currently working on a project using pygame and my team and i were having difficulty trying to figure out how packages work. One last thing: May you call modules from outside of the package? i.e. Let's say I wanted to import main.py or some other script from that level to constants.py, is there a way to do that?
@adrielbradley6677
@adrielbradley6677 4 жыл бұрын
Isn't something outside the package just a normal module?
@kimeg7294
@kimeg7294 4 жыл бұрын
Within constants.py, add one of the following lines depending on your usage: import main #works only if main.py is located in the same directory as constants.py import folder.main #works only if main.py is located in a folder called "folder" which is in the same directory as constants.py
@HDbIce-oj3wv
@HDbIce-oj3wv 4 жыл бұрын
Yes bring more tutorial
@elveyo9106
@elveyo9106 4 жыл бұрын
Awesome tutorial Tim!I'm just interested how much time did you spent on planning how will this work.
@Roknok
@Roknok 4 жыл бұрын
Happy Teacher's day to you ! !
@z3r0legend42
@z3r0legend42 4 жыл бұрын
Have you tried the atom editor he's pretty good !
@souravbhardwaj8551
@souravbhardwaj8551 4 жыл бұрын
Hello sir happy teacher day
@portlyoldman
@portlyoldman 4 жыл бұрын
Ahah! more Tech with Tim for me :)
@vijayragav4717
@vijayragav4717 4 жыл бұрын
Hey! Tim can you tell me which Framework to start first with for Web development in Python?? Django or Flask
@vijayragav4717
@vijayragav4717 4 жыл бұрын
I thought Tim would reply 😭😭
@vascopacheco5616
@vascopacheco5616 3 жыл бұрын
How do I run the game properlly? please help
@thegimel
@thegimel 4 жыл бұрын
Great content, thank you Tim! BTW, what vscode color theme are you using? it looks like Monokai, but not exactly? Thanks!
@someoneontheinternet3090
@someoneontheinternet3090 4 жыл бұрын
Someone has probably said it already but just in case, Checkers rules say that if you can jump someone you must
@Roknok
@Roknok 4 жыл бұрын
6th person to comment. Though I haven't yet seen the video I am sure it will be great
@ChrisBarrow1990
@ChrisBarrow1990 3 жыл бұрын
I like your settings in VSCode. What are they? I don''t seem to have the imported variables highlighted (BLACK, RED, etc)
@revanthgsr
@revanthgsr 3 жыл бұрын
Which extension in VS code do you use to get the suggestions for Pygame?
@darkdelusion
@darkdelusion 4 жыл бұрын
Tim, when setting up new projects why do most python tutorials not go over setting up a virtual environment. This is really something I wish I would have know about when I first started with python.
@ogif2
@ogif2 4 жыл бұрын
What settings, extensions do you use in the sublimetext?
@subhayanbairagi510
@subhayanbairagi510 4 жыл бұрын
For ubuntu 20.04 terminal the first command would be ------- sudo apt-get install python3-pygame ---------
@CeeTee469
@CeeTee469 4 жыл бұрын
23:31 square was spelt wrong. Gotta be cautious with the errors. Built this game quick 👍🏼
@vivotv4689
@vivotv4689 2 жыл бұрын
Do you have a simpler version to make checkers using only lists and not using GUI?
@trig1310
@trig1310 4 жыл бұрын
could you do a tutorial for chess as well?
@sudhar6516
@sudhar6516 4 жыл бұрын
Great tutorial !!
@programmingwithpranav2366
@programmingwithpranav2366 4 жыл бұрын
ikr
@phamduy2251
@phamduy2251 4 жыл бұрын
Hi Tim, I'm from Vietnam and I'm a big fan of you, so could you make a video about data like data engineer or something like that? Thank you so much 😍
@jordanping6192
@jordanping6192 4 жыл бұрын
may i ask what ide you are using?
@ketansonar8299
@ketansonar8299 4 жыл бұрын
Bro pls tell me Which theme are you using
@Fersko
@Fersko 4 жыл бұрын
Hi. How to stop the window from closing immediately when executed?
@spark1539
@spark1539 3 жыл бұрын
what form of python are you using that allows all the sub windows? I can only find the basic python which results in 50 odd windows when im creating code.
@degstenk
@degstenk 4 жыл бұрын
Great channel! Thanks!
@Oliverkor
@Oliverkor 3 жыл бұрын
Where did he get the nice syntax for his python?
@FarfarKaisen
@FarfarKaisen Ай бұрын
at time stamp 13.35 you open the window after pressing play for the first time, for some reason my pygame window is not opening do you know what it could be?
@lukpuk9723
@lukpuk9723 4 жыл бұрын
I'm having problems with making an exe file from a pygame based game on python could you maybe make a video about it?
@h3ll0m35
@h3ll0m35 4 жыл бұрын
Nice tutorial. Can you make a video on how to make a map on pygame
@raymondmichael4987
@raymondmichael4987 4 жыл бұрын
This is good brother, Can you extend this to have option whether to play again AI or another human player! Keep up the good work. Greetings from Tanzania 🇹🇿
@TechWithTim
@TechWithTim 4 жыл бұрын
Yep! I will show how to do both ways
@Dr.Cosmar
@Dr.Cosmar 2 жыл бұрын
VS Code makes learning easy IMO
@holycow4889
@holycow4889 4 жыл бұрын
New Microphone?, the audio is somehow better 🧐
@AmitBenShimon
@AmitBenShimon 4 жыл бұрын
just an fyi.. you don't need a __init__.py file since python 3.3 for empty __init__ files
@basicallyluci8048
@basicallyluci8048 Жыл бұрын
7:53 Subtitles: 'zero and two 50. Fuck.'
@vlatkotuchev8007
@vlatkotuchev8007 4 жыл бұрын
Hey bro, i have a small problem over here. I am using mac and pycharm to code and i can see only the grey surface showing up and i can't see the red and black board. I don't know if i need to change something in the code in order for this to work, i've searched on google and yt but i couldn't find anything. I don't have any mistakes in the code. Happy if you can help me solve this
@RomanReigns-ds8hs
@RomanReigns-ds8hs 4 жыл бұрын
Can you make a video on some project ideas on python automation (mainly selenium projects)?? It would be more helpful if you do so!!
@RandomNPC2532
@RandomNPC2532 4 жыл бұрын
At 13:35 when I run the game it states that the 'ModuleNotFoundError: No module named 'checkers.constansts' '. Is there a specific reason for it? I double checked and I have the __init__.py file and the constants.py file inside the checkers folder.
@RandomNPC2532
@RandomNPC2532 4 жыл бұрын
So to fix it I just deleted the line. Saved it and it worked for some odd reason XD lol
@RandomNPC2532
@RandomNPC2532 4 жыл бұрын
Also I had a big issue with linting messing with my vsCode. I just uninstalled everything python and vsCode related. Than when I installed it back just made sure the PATH was also installed with both of them
@aaravgp1332
@aaravgp1332 4 жыл бұрын
I got an error , in which it said builtin_function has no attribute tick or whatever .
@amalirfan
@amalirfan 4 жыл бұрын
Hello sir, I had thought that in python module is the python files and packages are folders with __init__.py in it, is that wrong?
@techtutorials8812
@techtutorials8812 4 жыл бұрын
Cubes are three dimensional. The colored shapes that make up the checkered pattern on a checkerboard are two dimensional and are simply called squares ;-).
@techtutorials8812
@techtutorials8812 4 жыл бұрын
Never mind, you fixed it partway through.
@amrashour7285
@amrashour7285 Жыл бұрын
if i want to make it player vs player. what i should do?
@AgentRex42
@AgentRex42 4 жыл бұрын
Hi, awesome ! And what is the AI ? Minimax ? Q learning ? I'm puzzled... ^^
@brucea9871
@brucea9871 6 ай бұрын
I just watched the beginning of the video so far and I noticed you made a programming error regarding the rules. I always thought in checkers captures were mandatory if one was possible (unlike chess, in which a capture is mandatory only if it is the only way to get out of check). So I checked online and Wikipedia said in most official versions of the rules capturing is indeed mandatory in checkers if a capture is possible. The AI did not capture your piece when it had the opportunity so you made an error in your program. You should have programmed it to make a capture if one was possible.
@ro-go3md
@ro-go3md 3 жыл бұрын
If I’m not using visual studios code what would I put for def __init__(self)
@bibekbirsingh9433
@bibekbirsingh9433 4 жыл бұрын
I am using pycharm and when I ran enter pycharm it said module does not exist even though I already installed it. I did this and it worked. If you're facing the same problem in pycharm this may work. 1. typed pip3 install pygame in cmd, which told me: requirement already satisfied pygame in C:\Users\mike\AppData\Roaming\Python\Python38\site-packages 2. I opened the site-packages folder and copied pygame 3. Go to File> settings> project: project name> project structure . You will see the location of the project file and a venv folder inside of it. Go to site-packages inside of it. C:\Users\mike\PycharmProjects\Namaste\venv\Lib\site-packages 4. Pasted the pygame folder there and ran import pygame and it worked.
@lardosian
@lardosian 4 жыл бұрын
Would it be possible to make R Type in pygame?!
@magicfay
@magicfay 4 жыл бұрын
Hey, Tim thank you for the tutorial. By the way, I was trying to do it but when I put " from .constants import WIDTH" they told error. Can you help me?
@NickZack
@NickZack 2 жыл бұрын
Hi I found the solution. Your Upper level and lower level folder have the same name. Rename your upper level folder to CheckersMain and it should work.
@magicfay
@magicfay 2 жыл бұрын
@@NickZack thank you very much
@agilecybercraft1519
@agilecybercraft1519 4 жыл бұрын
when ever i load my windows the widows says not responding
@Fersko
@Fersko 4 жыл бұрын
Hi. Even though I'm doing the same thing, I get the "'python' is not recognized as an internal or external command, operable program or batch file.". Can someone help me?
@jameserickson760
@jameserickson760 7 ай бұрын
is there any way to do this in google cola
@emilgame925
@emilgame925 3 жыл бұрын
This is seriously challenging. Would love to create my own checkers and also input a login menu to it. can you do that for me for payment ?
@kose2ik
@kose2ik 4 жыл бұрын
not bot. good video.
@SBiswas1967
@SBiswas1967 Жыл бұрын
18:40 problem
@thepelican3810
@thepelican3810 4 жыл бұрын
ImportError: cannot import name 'WIDTH' from 'checkers.constants'
@NickZack
@NickZack 2 жыл бұрын
Hi I found the solution. Your Upper level and lower level folder have the same name. Rename you upper level folder to CheckersMain and it should work.
@13Orcun
@13Orcun 2 жыл бұрын
hi! How can i fix this error? from .constants import BLACK, ROWS, RED, SQUARE_SIZE, COLS, WHITE ImportError: attempted relative import with no known parent package
@msheheryar9453
@msheheryar9453 2 жыл бұрын
did you fix this error?
@13Orcun
@13Orcun 2 жыл бұрын
@@msheheryar9453 no, actually i didn't try to find out
@mohammediftekhar1424
@mohammediftekhar1424 4 жыл бұрын
Need a pygame platformer tutorial...
@T3BFitnessTripleThreatBoss
@T3BFitnessTripleThreatBoss 4 жыл бұрын
Is double // floor division?
@TechWithTim
@TechWithTim 4 жыл бұрын
Ya! Called integer division :)
@0darkwings0
@0darkwings0 4 жыл бұрын
Hi, why you ignoring the PROBLEMS that you have in main.py, piece.py, and board.py? I also have them but it still running without any error, but I don't get why he does not recognize QUIT and so on in pygame in main.py and he continues to complain about the 'from' statement that he can't import checkers.constants (but still running without errors) I will appreciate an explanation for that :)
@mohikshitghorai1777
@mohikshitghorai1777 4 жыл бұрын
Make a sys and os tutorial
Python/Pygame Checkers Tutorial (Part 2) - Pieces and Movement
27:05
Python Checkers AI Tutorial Part 1 - The Minimax Algorithm Explained
14:24
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Pygame in 90 Minutes - For Beginners
1:35:22
Tech With Tim
Рет қаралды 1,1 МЛН
Making a Game in Python with No Experience
5:57
Goodgis
Рет қаралды 1,8 МЛН
Game Automation with YOLOv8: Python Bot Tutorial
21:40
ClarityCoders
Рет қаралды 54 М.
Easy Way to Make Jumping in PyGame! (7 Mins)
7:24
baraltech
Рет қаралды 35 М.
I Made Chess 2.0
14:32
From Scratch
Рет қаралды 1,3 МЛН
Python Projects Ideas - 11 Awesome Games You Can Make With Python
10:46
Python/Pygame Checkers Tutorial (Part 3) - Jumping and King Movement
58:46
Get Started in pygame in 20 minutes!
21:56
Programming With Nick
Рет қаралды 2,1 М.