How To Write Your First Game!

  Переглядів 9,874

Gary Explains

Gary Explains

2 роки тому

Learning to program by writing a game is a great way to improve your skills. Not only is it fun, but you get an almost instant reward for every line of code your add! Here is an introduction to Pygame Zero, so that you can write a game for Windows, macOS, Linux, and the Raspberry Pi.
Code: github.com/garyexplains/examp...
Introduction to Android app development: www.dgitacademy.com
Let Me Explain T-shirt: teespring.com/gary-explains-l...
Twitter: / garyexplains
Instagram: / garyexplains
#garyexplains

КОМЕНТАРІ: 31
@salem_ok6732
@salem_ok6732 2 роки тому
I just started learning python and a pygame project a few months back and I can confirm that writing a game is a very rewarding journey!
@firosiam7786
@firosiam7786 2 роки тому
Never though learning python from you hope to see more such tutorials from you sir
@muddyexport5639
@muddyexport5639 2 роки тому
Great intro. Same thing (intro to gaming) in C++ or Rust. Good job!
@1MarkKeller
@1MarkKeller 2 роки тому
*GARY!!!* Good morning Professor! Good morning fellow classmates! Stay safe out there everyone!
@GaryExplains
@GaryExplains 2 роки тому
MARK!!!
@marcoleong432
@marcoleong432 2 роки тому
The two foreach loops can be optimised to one. Both being more efficient, and easier to understand. Code: for box in boxes: box.y = box.y + 2 if box.y > HEIGHT: boxes.remove(box) Your video explained very well as always. Keep up the good work!
@CodeyCammy
@CodeyCammy 2 роки тому
Love the new content you are making! Great stuff and thank you for always explaining
@moradsoumir8963
@moradsoumir8963 2 роки тому
I've been watching some programming languges tutorials and then I recieved your video's notification
@sexysensation
@sexysensation 2 роки тому
Great tutorial Gary, thanks for posting.
@obdalamfa4254
@obdalamfa4254 2 роки тому
nice video, very clear about the technicals for the first game
@NarutoUzumaki-mx1mo
@NarutoUzumaki-mx1mo 2 роки тому
Thanks Gary,
@russtuff
@russtuff 2 роки тому
Nicely done.
@campbrian
@campbrian 2 роки тому
12:45 In XNA/C# back in the day, I used a decrementing counter in my for loops to remove items as necessary to avoid messing up the loop. Does anybody here know if this be done easily in Python?
@emmanuelaminu4581
@emmanuelaminu4581 2 роки тому
I love it please can you explain more on GPU
@sbypasser819
@sbypasser819 2 роки тому
I too writing a game but this python all these functions i dont understand... why is it called actor for example?
@sadiaaamir26
@sadiaaamir26 2 роки тому
As always you have done another good job . Now i know how to make my dream game thanks !
@D3ND
@D3ND 2 роки тому
4:13 Quick question... Since the file 'alien.png' is under images directory, shouldn't the initiation of the actor be Actor("images/alien")? Or does the library search recursively? Maybe it defaults to 'images' directory?
@GaryExplains
@GaryExplains 2 роки тому
It defaults to images.
@ButImFeelingMuchBetterNow
@ButImFeelingMuchBetterNow 2 роки тому
I get an error trying to run this: X Error of failed request: BadValue (integer parameter out of range for operation) Unfortunately I do not know how to debug / fix this error. It is not a typo (at least not mine) as I get the same error with Gary's github code.
@aravindraj5792
@aravindraj5792 2 роки тому
How does the random.randrange function work? Is it based on the system time?
@GaryExplains
@GaryExplains 2 роки тому
Python uses the Mersenne Twister as the core generator. It produces 53-bit precision floats and has a period of 2**19937-1.
@jyvben1520
@jyvben1520 2 роки тому
The original pygame also works without a gui on some rpi
@eyeshezzy
@eyeshezzy 2 роки тому
You look like you really enjoy programming
@bluesillybeard
@bluesillybeard 2 роки тому
If you want to get more serious, using a game engine like Godo or Unity is good, and if you want to get dirty in low-level stuff OpenGL is a good one too. Actually, don't use OpenGL, that's a bad idea for anybody who actually followed this tutorial Well, OpenGL 1.x isn't bad, but anything newer is gauranteed to give you headaches.
@EmmaKAlexandra
@EmmaKAlexandra 2 роки тому
Gary I’m sorry but the music is false advertising!
@GaryExplains
@GaryExplains 2 роки тому
😂
@choosewisely7410
@choosewisely7410 2 роки тому
I didn’t enjoyed it i loved it
EVERYONE Needs to Learn a Little Bit of AWK!
16:29
Gary Explains
Переглядів 393 тис.
Arm vs RISC V- What You Need to Know
22:19
Gary Explains
Переглядів 295 тис.
How I Accidentally Became a Sea of Thieves Developer
8:05
Zyger
Переглядів 13 тис.
Write Your Own Emulator for Your Own CPU - Using a Raspberry Pi Pico
32:17
Build Your Own GPU Accelerated Supercomputer - NVIDIA Jetson Cluster
15:03
What is Pegasus, and How Does it Spy on You?
14:25
Gary Explains
Переглядів 280 тис.
Floating Point Numbers - This is Where Things Get Weird!
15:11
Gary Explains
Переглядів 1,2 тис.
How CPUs and Processors are Made for Smartphones, Laptops, and Desktops
25:05
Unix vs Linux
13:59
Gary Explains
Переглядів 1,6 млн
Raspberry Pi Supercomputer Cluster
12:33
Gary Explains
Переглядів 791 тис.
Fixed Point Decimal Numbers - Including Fixed Point Arithmetic
11:24
Gary Explains
Переглядів 2,5 тис.
12 Things to Help You Learn Rust
36:40
Gary Explains
Переглядів 89 тис.