okay so this is my latest game it's a recreation of the first level of Super Mario Brothers now I didn't know how to make a platformer before this game uh I kind of just fumbled through it and sort of figured it out and what's funny was that the only reason I chose the first level Super Mario Brothers to recreate is because I was trying to make a platformer before and uh I was trying to make a moving platform but I couldn't figure it out so I was like the first level Super Mario Brothers doesn't use
moving platforms why don't I just do that which turned out to be infinitely more complex but you know you live you learn so why don't I just boot that up and uh uses pame and python of course uh we just go into [Music] it so all the sound effects all the music is there I would say this version is about 90% of the original version and I say thats the S effect didn't work uh I say that with the it may seem closer than 90% but when I look at this game I can't help but
notice the the tiny little Inc consistencies because for example uh the hit boxes aren't right the way P game works is that there's an invisible rectangle and that for each Sprite so there'll be one about right here and it's invisible and that's how you detect Collision based on that rectangle and your image is put on the screen flush left to that rectangle but the problem is is that uh rectangles in the original Mario is actually not flush left it's actually kind of centered on the image itself now that wouldn't have been too much of a
problem to make my own uh CM Collision functions because they're honestly not that complex but uh I had already ridden all the Collision stuff before I realized this and I wasn't about to rewrite it for that tiny little so for that one person who might think that oh the hit boxes aren't quite right check this [Music] out uh just playing it I noticed there's a couple bugs first of all the coin for some reason didn't update here that that shouldn't be that shouldn't be very hard to fix uh and the for some reason there wasn't
a animation sound when you went from Big to small again not a big deal to fix but I guess I just forgot about it uh yeah so I don't know what else to say about I'll chop the music because it's pretty annoying it's not annoying it's great music but when you've heard it so much you just kind of get sick of it uh yeah uh I think the last thing I'll say about the actual why most most Platformers and games in general use something called tile Maps which just means that uh the levels created of
about of tile so if you look at the blocks on the bottom that is one tile there it's a 16 pixels by 16 pixels and all basically everything on the game is made by that unit but I didn't actually do that I didn't have any kind of system of tiles that puts the level together I actually had a the background is just one huge image that stretches out and then for the ground and for the ground for the pipes and the steps of the level that's there's actual no there's just invisible recks invisible rectangles that
are placed on top of them so here here here here so that Mario can jump on them but it's actually still part of the background now that's crazy way of doing it what I should have done is just taken the actual tile map or tile set which I had and just construct the level manual not manually but with a with an automatic with a with a tile map so you know with uh hard to explain I guess but have a file that represents the location of every every 16 X6 block on the entire screen and
then paste it onto the and then put onto the screen that way instead of manually hardcoding every single uh block by location I'll show you actually what I mean by that in a second and uh but yeah overall it works pretty well like I said a few bugs few tiny inconsistencies but overall I'm pretty happy with it so uh I can just load up quickly show you what I mean by the hardcoding but again I didn't know what a tile map was before I started this project I didn't even know how to make a platform
I just kind of muddled through it but now I know if I was to remake this or to recode it I probably should check out the the idea of a to map I don't think I'm explaining it very well what a to map is but I'm sure you could Google it and get a get a sense of it so honestly this this partic the there's one class for the level itself so for the backgrounds the collisions that kind of thing now if you look at these these functions basically hardcode everything all the all the pieces
of the level onto the background so this is the setting up background itself which is which is you know just getting the image and stretching it to a specific aspect ratio but the this stuff this is hardcoding the invisible rectangles on the ground on the pipes and on the steps and it it it looks like a nightmare to get all these numbers in there because these are just coordinates on where on the screen they are but it actually didn't take all that long maybe a couple days but here are all the bricks all the breakable
bricks this again this is an insane way of doing it it's a bad way of doing it but I didn't really know any better here's the flag pole that I put together um this is me setting up where all the enemies are going to be um these are invisible checkpoints that add the enemies to the level they're very they're just hardcoded in there instead of using a to map which again a bad way of doing it but honestly we're pretty well it didn't take me that long but uh yeah so I don't know what else
to say I learned a lot during this project uh I think it was I learned a lot because it's kind of a huge project a lot more code than I expected and it really showed me how important it is to organize code into cohesive chunks or cohesive uh sections because I mean even even though I split it up so much the level State or the level class itself is it's over it's over like 1400 1400 lines long which is crazy like the Mario class itself is is 1100 and I mean I split it up quite
a lot between like the animes like all the components of the of the game so I think as much as I learned about separating code into into objects and individual classes and stuff I think I still have a lot to learn but I think this project kind of showed me how important that is yeah so uh that's it thanks for watching uh the codes on GitHub I'll have a link if you want to look at that and uh yeah check it out bye