WE'RE DOING HAPPY WHEELS, BABY. Let's go. Now, I'm of course amazing at this game. But is AI? So, to test this, here's the plan. First, I'm going to need to recreate Happy Wheels from scratch. Then, I'm going to do some AI wizard [ __ ] to train an AI to play the game, and hopefully it does good. Yeah, sounds pretty easy. What could go wrong? Let's make Happy Wheels. All right, ready for this? Circle, square. Boom. That's a bike, baby. Game dev e Oh, okay. Yeah, that's better. Game dev easy. Okay, let's make this pretty. Let's make it actually look like a bike. So, time to make some art. That art is hard and I can't do it. Uh, but you know what I can do? Now, we just have to do some Photoshop magic to separate all the parts. Like, we're going to need the frame and the wheels as different things. Now, we just need to position them in the scene. and webby. I mean pretty close as things go. That's pretty good. Next I added some suspension to the wheels which went well. And then I did some cheeky coating to add some motors to the wheels so we could actually move the bike. So in happy wheels you can go forwards, you can go backwards but you can also rotate backwards and forwards. So to do that, I just apply a torque to light the bike. The whole bike. Perfect. All right, let's try that again. All right. A little more force, I think. Okay. Okay. Eventually, I got something I was pretty happy with. It's not perfect, but I'll fine-tune it later. I found this image of the dad, which is great, but um yeah, this isn't quite it, is it? Which means it's Photoshop time again. Woo! Yes, that's what we need. That's a good set of dude parts. So, now we just have to chuck all those bits in Unity and build the dude. All right. Oh, don't vape, kids. All right, let's actually join all the limbs together. I've heard that's important. Oh, well. Oh, well, I guess that works. I think he's a little too stiff. I like my men a little floppier than this. Oh god. All right, that might be a little too floppy even for me. Okay, so here's the problem. The limbs are connected, but their range of motion is, let's say, slightly higher than usual. So, I just got to like adjust them until it feels right. Ah, yes. Very good. — Tell me what's making you jump like that. — Simp. — Okay, so um that's enough [ __ ] around. Let's actually put him on the bike. Oh, he's like, "Give me give me bike. I want bike. " Okay, so it turns out you actually have to attach him to the bike, not to like a point in space. Oh, classic cycling technique. That's great. That's [ __ ] textbook. All right, we probably don't need him flailing like crazy. That's not helping. Come on, buddy. Come on. Oh my god. Mondays, am I right? To keep him a bit more upright, let's attach the hands to the handlebars. Oh, [ __ ] it up. He's so lazy. Come on. Come on, buddy. Oh, he's just chilling. He's like, I'm good here. Come on. Oh, yeah. Okay. Yeah. Still a touch limp. He's got to get his chest up. But apart from that, that's looking good. He's riding a bike. That's sick. To fix the floppy [ __ ] I added like a spring on the torso so it always is like being pulled back up to an upright spot. Oh, and yeah, that can happen. His head could fall off now. That's a new touch. So to keep him safe, I added a little helmet which helped a lot. Oh well, at least he's not concussed. Okay, with that, the dude's pretty much done. So it's time to get down. Okay, so we already have all the body parts able to come off. That's easy. But this doesn't quite look right. We need two things to happen where the limb breaks. Oh, [ __ ] Okay, we need to replace the arm and forearm images to look like it's all [ __ ] up. And then we need to add some juicy special effects to sell it. Luckily, I found this sprite sheet, which just has everything I [ __ ] need. Saves me a lot of time. I also found the normal ones, which means I wasted like 2 hours of my life in Photoshop for no reason. But that's okay. I'm not mad. I go to therapy. I'm a completely mentally st Oh, look, a civilian airliner. So, all I have to do is line up the bloody images with the original. Then, when a joint is broken, we just swap out the images. It's working. Oh, I forgot I put that there. Now we just need to make a couple of particle effects that create like a blood explosion when the joint breaks. Oh, that might be a touch excessive. All right. I also made this like blood splirt effect that can happen sometimes and that just sprays out of body parts like this. This should be everything. He's gone. He
Segment 2 (05:00 - 10:00)
evaporated. All right. Come on. Yes. Yes. That's it. THAT'S HOW HE WHEELS. NEXT UP, I added the spikes, which went well. Slowly. No. [ __ ] off. [snorts] I'm sick of this [ __ ] Come on. Why? Ah, why were they invisible? What? Where did they go? I added physics to the spikes and of course that went well. Haha, miss me. Uh, excuse me. DID THAT JUST JUMP INTO MY ASS? What are we doing? And with that done, I can actually make a little level, which is kind of fun. Oh, that's a great start. Good job. What's this? Wheel block. Oh, [ __ ] you. Oh my. I am not good at this. Naturally, the next step is to see what it looks like for 47 players to do it at once. Now, my computer's already struggling. Okay, I got to time this. [ __ ] it. Power through. They can't kill all of us. Oh, hello. What the [ __ ] IS GOING ON? OH, that's great. That's lovely. What is going on up here? Oh, cool. It's a snake made from decapitated heads. Mondays, am I right, lads? Okay, we've got the bike, we've got the dad, we've got the goal, we've got the spikes. Now, it's the time you've all been waiting for. It's boy time. I really don't like the sound of that. Can we check? — So, we can use this for the boy parts, but I couldn't find one that shows all the bloody boy parts like there was with the dad. So, I had to do some more Photoshop wizard [ __ ] to make some. Yes. What a fantastic set of boy parts. I'm getting on some sort of list after this. So, we just have to replace all the dad parts with boy parts and Timmy here will come to life. Classic Timmy. So dramatic. Relax. You're fine. Oh, he's fine. Don't worry about him. Okay, now that Timmy's working well, let's actually get him on the bike. Oh, well. Well, that kind of worked. He lives. Yes. What a Oh. Oh, sorry. Sorry. He's fine. Oh, the head's come back towards us. I said I was sorry. Okay, this should make him a bit tougher. I increased the for Oh, for whatever reason, I had a huge issue getting the boy to not like explode. Whatever. We went over this tiny bump. Took me legitimately a whole day. So, enjoy this montage. I've been trying to call. I've been on my own for long enough. Maybe you can show me how to love. Maybe I'm going through a drought. You don't even have to do too much. You can turn me on with just a touch. Baby, I look around since it is cold and empty. No one's around to judge me. I can't see clearly when you're on. — Yeah, baby. That's what I'm [ __ ] talking about. by the lights. I said drowning in the night. Next up, it's time to add the boost paddles. Such a good game. The boost paddles are super simple. We've got like a square and then when something is in the square, we apply a force to the direction of the arrow. But of course, nothing ever works perfectly the first time or the second or the third. But fourth is looking clean, baby. So a big thing missing. — So a big — So just shut the [ __ ] up. Thank you. We good. — So a BIG THING MISSING. YOU PIECE OF [ __ ] — SOUNDS. We're doing sounds. I added dude sounds. [screaming] — I added boy sounds. — I added gore sounds. [groaning] I added spike sounds. And finally, I added some bike sounds. And putting that all together, we get quite the orchestra. So, we've got the bike, we've got the guy, we've got the boy, we've got the gore, we've got the spikes, we've got the speed boost, and we got the sound. Now, we just need some [ __ ] to play. That means it's level time. So, I found a good level, but how are we going to copy this into our program? Well, here's the plan. First, we need to play the level like normal all the way through. Then, we look at a video of us
Segment 3 (10:00 - 15:00)
playing the level and extract a bunch of screenshots. Then, we just need to bring them into Unity and line them up like some sort of plagiarism jigsaw puzzle. And tada, we got the whole level. Okay, let's run it. Oh, yeah. Um, right, they're just images. Okay, so to actually make the level, I started by adding all like the floors and walls and [ __ ] Basically, all the stuff that's static and never moves. On, off, on, off. Yeah, very nice. And if we play it, we can see we're getting closer, but it's still not very fun. Now, we need to add all the other [ __ ] Basically, all the [ __ ] that moves. We've got the bridge. We've got this floppy guy. We got this reverse F floppy guy. We've got these spinny. And we got these floppy guys as well. So, let's do that. — Come on. — Okay, now we should be done. We should be able to run it. All right, crush the bridge. Done. Not dunk the boy. That's okay. We'll get him a band-aid. He'll be all right. This game [ __ ] suck. Okay, one more thing we're going to have to do before running the AI is we're going to have to run multiple players at once. And let's just give that a go, shall we? Oh god. Sorry. My poor computer. Sorry. Yeah, my shitty ass computer cannot handle it. If only there was another way. Oh my god. Scared the [ __ ] out of me. Okay, so the plan is to host this bad boy on a VPS. That's a virtual private server. Basically, you let someone else's computer handle it and then we access that through the internet. And setting one up is easy with Hostinger, today's sponsor. All you got to do is go to hostinger. com/codebullet. And you're just going to want to choose which VPS you want. I recommend the KVM 2. The specs on that are pretty solid. And you can always upgrade later if you want higher specs. And you're going to want to click over here and chuck in my code. That'll get you 10% off. You're welcome. Pick which operating system you want. For us, this one has everything we want already installed. And you can choose where you want your server to be located. Once you grab that, it'll take you to create a password so no one steals your [ __ ] Next to add a free malware scanner so no one can steal your [ __ ] again. Then you just sit back and watch Hostinger do its magic. Then we just connect to the server, upload the game files, and whammy, we got a game. But before we can play it, we're going to have to link it to a domain. Luckily, Hostinger has a built-in way to buy your own domain. So, let's grab one that makes sense. Uh, Happy Wheels def the real game. Please don't subie. com. Happy Wheels subscribe. I'm going to snatch that up for sure. And here she is with all her beauty. Yeah. Beautiful. Smooth as butter. You can even run it on your phone. I'm not sure why you would want to do that, but you can. If you want to set up a website on Hostinger and support this channel at the same time, you can use my link hostinger. com/codebullet and use codebullet to get a further 10% off the 24-month plan. Okay. Thank you, Hostinger. Now it's AI time. So, what AI are we going to be using for this? We got Chacha, Gemini, Grock. No, none of those. Those [ __ ] I'm talking about the genetic algorithm. Basically, we're going to do an evolution simulation to get the AI to learn the best moves for finishing the level. Here's a super speedy rundown of how this works. We have a population of players which play the level. You can have as many players as you want. 10, 50, 100. Just keep in mind that your computer isn't limitless and frame rates might start looking like this. So, to solve this frame rate problem, the game is actually rendered like this. Then, because I'm such a nice guy, I speed it up for you guys in the video. Okay, so we got a bunch of lives, but they aren't really doing great. Actually, they're just performing completely random movements, which technically if we just keep running this, they would get lucky and beat the level, but that would take a long time, like approaching the heat death of the universe sort of time. Uh, and I don't want that power bill. So, it's now time for the evolution bit. All we need to do is test the players, then pick the best players and make them [ __ ] and have them pass down their genes to the next generation. These children should be similar to their parents, but not identical. Otherwise, we'll never get improvements. So, we got to mutate those babies. [cheering] Once we've done that
Segment 4 (15:00 - 19:00)
we take those mutated babies and throw them back into the game. And then we rinse and repeat the process of picking the best, creating babies, mutating those babies until they hopefully beat the game. Anyway, that's enough yapping from me. I give you AI learns to play Happy Wheels. Heat. All right, so that was a lot, but let's replay the best player to see how the AI actually won. Seems like it thought it was necessary to immediately fuse the child to the seat. Then it drops both of the baby legs here. That makes sense. That was just extra weight it would have had to carry. The AI seems to love unnecessary flips, so get used to that. — Yeah, who needs that arm? You've got a spare. Also, he dropped both baby arms. So, we just got like a boy nugget left. And you ready for this? This is my favorite bit. Launches the boy at Mach 2 towards the finish line. That's classic. Uh, honestly, and it is the fastest way to get to the finish line, so I respect that. Let's get a slow-mo replay of that. [ __ ] beautiful. I actually ran the program like 20 times to see if anything funny happened. And here are the best bits. Heat. — Okay, so that was like 100 players, but who in their right mind would stop there? So, I give you 500 players. We are rendering this at a cool one frame per second. Uh, at this speed, for some reason, the sound effects break. I don't know why. I think it's trying to play too many screams at once and Unity is just like, "Nah, I ain't doing that. " But that's okay. I'll add some Pokémon XD Gale of Darkness music to fill the void. Okay, here we go. At this number of players, it stops looking like Happy Wheels and more like a fluid simulation. Especially this bit. Look at that. That's textbook fluid simulation. Anyway, sorry. I'll shut up. All — right. Hello. Welcome to the Patreon battle. It means the video is over and I just want to like yap. But yeah, holy [ __ ] Uh, I did it. That took me literally over a year to finish this video. I had this bug that I almost couldn't like [ __ ] deal with and so I just like I gave up like two to three times. Almost completely scrapped it. But you know the cool thing about this is if you like it I can definitely do like way more levels. I can do more characters and stuff. So if you have any ideas for like cool levels that you want me to do u I can remake all the levels all now that all the main systems are done. Adding new shit's really easy. So yeah, let me know if you want to see more. Uh cuz yeah, that'll be super easy to do and I like super easy to do. Okay. Well, congrats to Happy Salmon for the win. You win some free merch. I'll get in touch. All right.