Creating a Mario Maker style game in Python

preview_player
Показать описание
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.

(You also get lots of perks)

Social stuff:

Timestamps:
000:00:00 - intro
00:01:48 - Introduction and editor
00:11:06 - Editor origin and support lines
00:45:47 - Changing the mouse cursor
00:49:32 - Creating the menu
01:43:36 - Creating the level tiles
02:11:56 - Level drawing logic
02:18:37 - Drawing the terrain
02:54:55 - Drawing the water
03:05:04 - Tile animations
03:24:17 - Deleting tiles
03:32:11 - Adding objects
04:11:13 - More on objects
04:23:19 - Previewing items in the editor
04:48:25 - Creating the editor sky
05:20:46 - Exporting the editor data
05:56:24 - Fixing some drawing issues
06:01:45 - Creating the level transition
06:20:25 - Creating the terrain and the player (in the level)
06:36:02 - Animating the level tiles
07:05:05 - Adding other objects
07:35:04 - Player movement
08:14:28 - Adding player graphics
08:27:47 - Creating the player camera
08:40:05 - Creating the shell enemy
09:05:58 - Creating the tooth enemy
09:22:49 - Adding player damage logic
09:31:28 - Creating the level sky
09:57:27 - Adding sound
10:08:12 - Finishing up

Рекомендации по теме
Комментарии
Автор

The amount of effort you put into these tutorials is astonishing

artcadedev
Автор

My jaw dropped when I realized that you were literally narrating a video COHERENTLY during 10 hours of coding. I kept checking the video length because I thought I was just looking at it wrong. You are a legend dude. Hats off!

hollowneedles
Автор

I can't imagine how much time you spend on this AWESOME tutorial.
You are helping to community a lot.
Best.

brandonjacksoon
Автор

For those wondering why the pearl does not always spawn (around 9:00:00) for some versions of Python or pygame (In Python 3.11.2 and pygame 2.5.2), do NOT use the groups()[0] as a Pearl parameter to get the all_sprites group. For exemple pass it explicitly through the Shell arguments from Level. It seems the groups() does NOT keep the ordering, hence all_sprites is not always [0].

fphenix
Автор

these are the most in-depth but easy to follow videos I've been able to find. Your work is astounding and appreciated!

freestyler
Автор

Just reading the name of this video is insane! Thank you for all the work you put into these videos, they truly are fantastic!

teabow.
Автор

i have just finished the introduction into pygame and that has helped me understand code so i can now follow you're harder and more complex tutorials such as this one thank you so much for the amount of time and effort you put into making these it helps out a lot since i am learning how to code.

mcstudios
Автор

Holy crap... this took me a month to get thru but well worth it. Thank you so much for these projects... I have learned so much (usually by making mistakes and spending an hour to fix it). If you follow along pay attention... steal your focus away for a second and you miss something important. Big thanks again!

On to the next one....

fidelrivera
Автор

Holy crap you uploaded this at the right time because I was actually working on my own (fairly flawed) level editor. Thanks for the time save clearcode, you absolute legend!

MegaFuze
Автор

This is simply amazing. I can't imagine how much effort you put into these tutorials. Thank you so much for your content, I've been learning a lot about advanced programming topics with you!

williamoliveira
Автор

Thank you so much for the tutorial. So enjoyable to follow along and write code. This channel delivers probably the best Pygame related tutorials I have found on Youtube this far.

tomkommando
Автор

I thought the thumbnail looked familiar. You are using the same asset pack I am using in my tutorial for a platformer, but in Java.
Nice work man!

KaarinGaming
Автор

I noticed something interesting around 1:54:40:
In the get_current_cell() method this is what I did before looking at your solution:
col, row = distance_to_origin // TILE_SIZE #(vector integer-divided by a scalar)
col, row = int(col), int(row) #get rid of float
I then noticed that I did NOT have the double (0, 0) cell you got by doing "int(x / TILE_SIZE)".
And indeed, the '//' is also called 'floor division' so the result gets rounded down.
Sure enough: int(-10.71 // 64) = -1 ; whereas int(-10.71 / 64) = 0
So the '//' is a pretty elegant solution to fix the issue there.

fphenix
Автор

Years ago I was asking to make games some old IT guy at my school recommended python I didn’t think it had the capability but you’ve shown true commitment

Smurfis
Автор

I just wanted to say, Thank You! Your tutorials have seriously been helpful. I've been working with books and other dry material. So again, Thanks.

macroalpha
Автор

nice and excellent tutorial. clearly and elaborate.

kawaisonayatsu
Автор

Your tutorials are amazing! I'm quite familiar with pygame so I end up skimming mainly, but the fact that you go into so much detail is fantastic if I forget something. I love your venn diagrams for explaining things conceptually before jumping into code. The way you draw on the screen to explain code is great too! But even better than that, you make sure to mention details that others don't, like how something may affect your performance and how to tweak something if I want to do it a little differently. If I wasn't completely broke I would definitely donate to your Patreon for all your amazing content, you definitely deserve it!!

griffin-leonard
Автор

Hello Christian, just stumbled upon on this course and I immediately bought your two courses on Udemy 🙂
Thank you for this great course. I am a Python veteran (I use it since 1997) and I have develop some mini games with PyGame, but seeing your approach on some solutions is a great resource!
Please, make more content on Godot (as your other Udemy course does) which I think is growing very strong!
Ciao!

FabioRotondo
Автор

Great video as always! I love your content! In the "get_current_cell" method in your editor, an alternative option to solve the coordinate problem, could be to just use floor division. That way, you dont have to use an if-statement, and the code would look a bit cleaner.

MarcusBerge-gxll
Автор

This is the third long tutorial of yours I follow and I really enjoy them. The quality is great.

One thing I noticed so far, if I may, is that using the modulo operator would simplify the code and the explanation. For exemple here, around 37:00, the grid can be done with:
for col in range(cols):
x = (self.origin.x % TILE_SIZE) + (col * TILE_SIZE)
pygame.draw.line(self.display_surface, LINE_COLOR, (x, 0), (x, WINDOW_HEIGHT))
and same for rows (no need for the "offset_vector")

fphenix