We're doing Happy Wheels, baby. Let's go. Now.
I am of course amazing at this game. But is A. I?
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 sh*t to train an AI to play the game, and hopefully it does good.
That sounds pretty easy. What could go wrong? let's make Happy Wheels!
Alright, ready for this? Circle, Circle, Square, Boom! That's a bike, baby.
Game dev e. . .
Oh. Okay Yeah. That's better.
Game dev EASY! Let's make this pretty. Let's make it actually look like a bike.
time to make some art. But art is hard, and I can't do it. ahhh.
. . But you know what I can do?
Now we just have to do some Photoshop magic to separate all the parts that we're going to need the frame and the wheels as different things. Now we just need to position them in the scene and whammy! Ah.
. . I mean, 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 coding to add some motors to the wheels so we could actually move the bike.
(⌐■_■) 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 like the bike. The whole bike.
Perfect. . .
(It in fact was not perfect) Alright let’s try that again. Alright, a little more force I think. Okay, okay.
I've actually got something else pretty happy with. It's not perfect, but I'll fine tune it later. But, Yeah, this isn't quite it, is it?
Which means it's Photoshop time again. Yes, that's what we need. That's a good set of dude parts (What did he sayyyyyy?
:| ) So now we just have to chuck all those bits in unity and build the dude. oh Ah. Don't vape kids!
Alright, let's actually join all the limbs together. I've heard that's important. Oh, well.
Oh well, I guess I guess that works. I think he's a little too stiff. I like my man a little floppy than this.
( ͡• _•) Oh, God. All right, that might be a little too floppy even for me. ( ͡O _O) 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 ha! Yes. Very good, very good.
Okay, so, that's enough f*cking round. Let's actually put him on the bike. Ooo.
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.
Ooh, Classic! Classic cycling technique. That's great.
That's f*cking textbook. All right. We probably don't need him flailing like crazy.
That's not helping. Oh. 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. He's so lazy.
Come on, come on, buddy. Oh, he's just chillin. He's like, I'm good here.
Come on. Come on. Oh, yeah.
Okay. Yeah, yeah. Still a touch limp.
He's got to get his chest up. But apart from that, that's like he's riding a bike that's sick. To fix the floppy sh*t.
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. He's had could fall off now.
That's a new touch. So to keep him safe, I added a little helmet, which, helped a lot. Well, at least he's not concussed.
Okay with that? The dude's pretty much done. So it's time to get nasty.
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 when a limb breaks. Ahh f*ck?
Okay. We need to replace the arm and forearm images to look like it's all f*cked 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 f*cking need. Saves me a lot of time. I also found the normal ones.
Which means I wasted like two 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 stable. .
. Oh, look, a civilian airline. 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. It's working.
Oh, I forgot, I put that. 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, 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. Erh. He's gone.
He evaporated. Come on, come on, come on, come on. Yes!
Yes! Yes that's it. That's it!
That's HAPPY WHEELS Next up I added the spikes which went well. Slowly. .
. SLOWLY. .
. Nawh. .
. F*ck off. I'm sick of this sh*t.
Come on. . .
Come ooooooooon! DOAH! Why!
? AHH! why were they invisible?
What? Where did they go? I hated physics to the spikes.
And of course that went well. Ha ha! Miss me!
Excuse me? ! Did that just jump into my office?
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. Watch this! Wheel block ha ha ha.
Oh f*ck you! [CB Giggles] 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.
F*ck it, power through! They can't kill all of us. Oh Hello?
What the f*ck 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 gore, we 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. .
. Can we change it? We can use this for the boy parts, but I couldn't find one that shows all the bloody body parts like there was with the dad.
So I did do some more Photoshop wizard sh*t to make some. Yes, 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. He's fine. Don't worry about him.
Okay, now that Timmy's working well. Let's actually get him on the bike. Well, well, well.
That kind of work. He lives. He lives!
Yes. What a. .
OH. . .
oh Sorry. Sorry. Sorry, sorry.
He's fine. Oh, the head's come back to haunt us. I said I was sorry.
Okay. This should make him a bit tougher. I increased the force.
. . Oh.
For whatever reason, I had a huge issue getting the boy to not like explode, when ever We went over this tiny bump. Took me legitimately a whole day. So enjoyed this montage.
Yeah, baby, that's what I'm f*cking talking about. Next up, it's time to add the boost panels. As such, it's such a good game.
The boost panels 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? Fourth is looking clean baby! So a big thing missing.
. . So a big thing missing.
. . So a big th.
. . So.
AH. Just shut the f*ck up! Thank you.
Thank you. We good? So, a big thing missing.
. . Oh you piece of sh*t!
Sounds. We're doing sounds. I added dude sounds.
I added boy sounds. I added Gore Sounds 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 gold, we've got the spikes, we've got the speed boost and we've got the sound. Now we just need some sh*t 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 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 ta-dah! We got the whole level.
Okay, let's run it. Oh, yeah. Right there just images.
. . Okay, so to actually make the level, I started by adding all like the floors and walls and sh*t basically all the stuff that's static and never moves.
On. Off. On.
Off. Ehhh 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 sh*t. Basically all the sh*t, that moves. We've got the bridge, we've got this floppy guy, we've got this reverse “F” floppy guy.
We've got these spinny c*nts. We got these floppy guys as well. So let's do that.
Okay, now we should be done. We should be able to run it. All right.
Crushed the bridge. Done. Dunk the boy.
That's okay. We'll get him a bandaid. He'll be all right.
Oh. It's game f*cking sucks. Okay, one more thing we're gonna have to do before running the AI is we're going to have to run multiple players at once.
let's just give that a go, shall we? Oh, God. Oh, sorry.
Sorry. My poor computer. Sorry.
my shitty ass computer cannot handle it. If only there was another way. 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 what up is easy with hostinger today's sponsor, All you got to do is go to hostinger.
com/codebullet then you are just going to want to choose which VPS you want. I recommend the KVM2 the specs on that are pretty solid. And you can always upgrade later if you want higher specs.
And you are gonna 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. This one has everything we want already installed. and you can choose where you want your server to be located.
Once you grab that will take you to create a password so no one steals your shit. next a out of free malware scanner so no one can steal your shit again. then you sit back and watch hostinger do its magic.
Then we just connect to the server, upload the game files, and wham! We got a game. But before we can play it, we're gonna have to link it to a domain.
Luckily, hosting it has a built in way to buy your own domains. let's go to one. That makes sense.
Happy Wheels def the real game. Please don't sue me . com.
Happywheelsdeftherealgamepleasedontsueme. com is available. Oh, I'm going to snatch that up for sure.
here she is with all her beauty. Yes, yes. 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. So if you wanna set up a website on hostinger and support this channel at the same time, can use my link hostinger.
com/codebullet and use Code Code Bullet to get a further 10% off the 24 month plan. Okay. Thank you.
Hostinger now it's A. I time. So what are AI we going to be using for this?
We got ChatGPT, Gemini Grok? Nah! None of those.
That's pussy sh*t! I'm talking about the. .
. 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. have as many players as you want. Ten.
Fifty. A Hundred. 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 lads but they aren't really doing great.
Actually, they're just performing completely random movements Which technically, if we just keep writing 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. 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 FU*! . 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 gotta!
Mutate! Those! Babies!
Once we've done that, we take those mutated babies and throw them back into the game. And then we. To 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.
Alright so that was a lot. But let’s replay the best player to see how the A. I 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 Eh who needs that arm, you’ve got a spare. Also he drops both baby arms.
So we just got like a boy nugget left. And are you ready for this. This is my favorite bit.
Launches the boy at Mach two towards the finish line. That’s classic. Ah Honestly, and it is the fastest way to get to the finish line, so I respect that.
Let's get a slo mo replay of that! F*cking beautiful! I actually run the program like 20 times to see if anything funny happened.
And here are the best bits. Okay, so that was like 100 players, but who in their right mind would stop there? So I give you 500 players.
500 players we are rendering this at a cool one frames per second. At this speed. For some reason, the sound effects break.
I don't know why. I think he's trying to play too many screams at once. A Unity is just like, nah!
I ain't doing that. Okay, I'll add some Pokemon XD. Gale of Darkness music to fill the void.
Okay, here we go. At this number of plays, it stops looking like Happy Wheels and more like a fluid simulation. Especially this bit.
Look at that. That's textbook fluid simulation anyway. Anyway, sorry.
I'll shut up. Alright Hello! Welcome to the Patreon battle!
That means the video is over and I just want to like yap. But. Yeah.
Holy shit! Ah I did it. That took me literally over a year to finish this video.
I had this bug that I almost couldn't, like, f*cking deal with. And so I just, like, I gave up like 2 to 3 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, I can remake all the levels now that all the main systems are done, adding new shit's really easy.
So let me know if you want to see more. Because yeah, that'll be super easy to do. And I like super easy to do.
Okay well congrats to. . .
Happysammon for the win. You win some free merch. I'll get in touch.
All right, Later!