I Spent a Week Making an AI's Video Game Idea

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

It was a great video and all of his videos are cool

πŸ‘οΈŽ︎ 13 πŸ‘€οΈŽ︎ u/birchclaw1 πŸ“…οΈŽ︎ Aug 30 2021 πŸ—«︎ replies

I like this guy haha!

πŸ‘οΈŽ︎ 9 πŸ‘€οΈŽ︎ u/LiamoBe πŸ“…οΈŽ︎ Aug 30 2021 πŸ—«︎ replies

I always find this guys videos enjoyable and I always learn something new.

πŸ‘οΈŽ︎ 23 πŸ‘€οΈŽ︎ u/PhillPW πŸ“…οΈŽ︎ Aug 30 2021 πŸ—«︎ replies

The day I become as good as Sabastian when it comes to programming is a day of rejoicing indeed

πŸ‘οΈŽ︎ 5 πŸ‘€οΈŽ︎ u/MattMatrix784 πŸ“…οΈŽ︎ Aug 30 2021 πŸ—«︎ replies

This post appears to be a direct link to a video.

As a reminder, please note that posting footage of a game in a standalone thread to request feedback or show off your work is against the rules of /r/gamedev. That content would be more appropriate as a comment in the next Screenshot Saturday (or a more fitting weekly thread), where you'll have the opportunity to share 2-way feedback with others.

/r/gamedev puts an emphasis on knowledge sharing. If you want to make a standalone post about your game, make sure it's informative and geared specifically towards other developers.

Please check out the following resources for more information:

Weekly Threads 101: Making Good Use of /r/gamedev

Posting about your projects on /r/gamedev (Guide)

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

πŸ‘οΈŽ︎ 1 πŸ‘€οΈŽ︎ u/AutoModerator πŸ“…οΈŽ︎ Aug 30 2021 πŸ—«︎ replies

Why does this guy (Sabastian) sound Indian? Like 100% identical to an Indian native who moved to England. It's really hurting my brain.

πŸ‘οΈŽ︎ 1 πŸ‘€οΈŽ︎ u/chuby1tubby πŸ“…οΈŽ︎ Sep 01 2021 πŸ—«︎ replies

I always find this guys videos a nice relaxing way to learn different ways I can help my game dev team with different problems in our games.

πŸ‘οΈŽ︎ 1 πŸ‘€οΈŽ︎ u/Terrafang117 πŸ“…οΈŽ︎ Sep 18 2021 πŸ—«︎ replies
Captions
hi everyone since my last video a couple of months ago i've been working on a few different things i started out wanting to make the water for this little project more dynamic so i began experimenting with fluid simulations [Music] i kept running into problem after problem though so i decided to take a break from it and began working on a simulation of sand dune formation which i thought could be nice for creating procedural desert biomes sometime in the future before i got very far with that though i got sidetracked somehow into learning the basics of audiosynthesis [Music] and then sidetracked even further by a sudden desire to experiment with neural networks i ended up making this simple doodle classifier basically you can draw one of 10 different things and the network tries to figure out which one it's supposed to be i've actually spent the past month and a bit working on a video about this but it just keeps growing and growing in length with no engine sight so i need to step back and rethink it a little that long-winded introduction brings us to today where i'm really in the mood for doing something fun and simple to hopefully break the streak of unfinished projects the plan is to spend one week making a tiny game and then no matter how it turns out to just make a little video about it and post it so the first thing i need is a game idea and a while back i made this random idea generator which could give a good starting point for something silly but i thought it'd actually be more interesting to ask gvt3 a sort of fancy chatbot for some ideas instead many of its suggestions were a bit odd and some sounded suspiciously familiar but there were a few here and there which i thought had some potential i've decided to go with this last one a game where you're a superhero but also have to do household chores i then asked you to come up with a name for the game and it had some interesting ideas there as well [Music] i've settled on super choreman so with that it's at last time to open up a blank project and get to work vacuuming is probably my favorite chore i wouldn't go so far as to call it fun but there is something satisfying about sucking up all the dust so i made a vacuum cleaner out of three cubes and used my old path crater tool to create the hose [Music] i also added a cube for the hero and wrote some quick code so that he can move around the vacuum hose needs to be flexible though of course and so i thought back to the procedurally animated spider legs from the weird old ghost beekeeping project some of you might remember they're done with an algorithm called fabric and how it works is like this we have a chain of line segments or bones if you prefer and we also have a target point that we wanted to reach out and touch the algorithm starts by stretching the end point over to the target and then it works its way back through the chain constraining the lengths of each of the segments to their original length it then does the reverse moving the first point over to the origin and going through the chain and constraining the lengths again [Music] it can keep doing these forward and backward passes until we're happy with the result it's a wonderfully simple algorithm and here's my simple code for it it is crying out for optimization but i'm just going to plug my ears and move on let's have a quick look at it in action though so i'll just move the target point around a bit and it does seem to be doing a good job so i used this to control the vacuum hose and after a bit of tweaking it actually worked out better than i'd expected it to of course it's not perfect for example you might notice it sometimes goes right through the player because it's not constrained by collisions or anything fancy like that i also made the body of the vacuum follow along reluctantly when the hose gets stretched too far although i had to fight a little with the physics system to get that to behave [Music] now the vacuum needs a cable for power and i tried using the same technique for that but it looked like this i'm aiming to make the world's most realistic superhero vacuuming simulator which is a very competitive space so that's definitely not good enough a few years ago though i remember watching this series of videos which shows a really nice and simple way of handling things like ropes and wires so let's give it a try we can start by defining a point which in this game is going to have a position and a previous position and we'll also want to be able to lock certain points so they can't move then let's define a stick as a connection between two points and the purpose of a stick will be to keep those two points the same distance apart as they were at the beginning so for example we could have a bunch of points over here all joined together with sticks to form a rope and let's lock the one end in place and leave the other end free to swing and to make it a bit more interesting looking we could maybe attach a little shape to the end of the rope like so [Music] okay so in the code let's begin each frame by looping over all the points we have and applying some movement to the ones which aren't locked i'll first move the point by the same amount it moved last frame so that it remains in motion no need to upset newton and then i want it to be affected by gravity so we can add a term like this onto the position as well oh and very important we mustn't forget to record the previous position so that we can use it next frame now we just need to handle the stakes so for each stick let's find its center and direction we can then constrain the stick to keep its original length by setting the positions of its two endpoints like so except we don't want to move a point if it's locked so i'll handle that quickly one slight complication here is that when we correct the length of a stick if it shares a point with another stick well that other stick is probably the wrong length now what we can do about this though is just run these constraints a bunch of times to let it hopefully settle into a stable state and that is all the code we need so let's start the simulation and see how it looks [Music] i'm pretty happy with that but just for interest sake i want to quickly make a slightly more complex setup to test it out [Music] it seems to be handling that really nicely as well i think so here's the power cable in action i've only made it collide with a floor just by not allowing the points to move below zero on the y-axis but it can go through walls and anything else because figuring that out seems like a major headache waiting to happen i did make it though that if you stretch the cable too far then it becomes unplugged at the wall alright this is all good but you're probably thinking that our superhero doesn't look particularly super heroic and that's been bothering me as well i believe the problem is he doesn't have a cape so let's see if our little program can handle a cloth simulation i'll lay out a grid of points and connect these all up with sticks like so and let's imagine this cloth is hanging from a few points at the top here so i'll lock those quickly and start the simulation [Music] one thing i couldn't resist adding is the ability to delete sticks by dragging the mouse over them essentially letting me cut through the cloth [Music] something i noticed when testing this was that the cloth would occasionally start jittering somewhere and then a sort of wave of jitters would pass through it what ended up helping with this was just updating the sticks in a randomized order instead of in the grid pattern they were created in i found it quite surprising just how little code was needed to actually create this and also how straightforward that code was i have a confession though in the end i didn't feel like having to handle 3d cloth collisions so i've actually just gone with the engine's built-in cloth simulation which does all that hard work for us still it was a fun thing to experiment with our hero is looking quite majestic now with his cape fluttering behind him so i think the next step is to add some dust for him to actually vacuum up it's very important if we want to be faithful to the vacuuming experience that every particle of dust be individually simulated so after a bit of research i have written up this little test i want to draw 500 000 cubes so i'm generating that many random positions and sending them to the gpu in this position buffer then every frame i ask the gpu to draw 500 000 instances of my mesh which it does using this little shader so the vertex function here gets called for every vertex in the mesh for each of those 500 000 instances and this instance id tells us which one it's currently working on allowing us to grab its position from the buffer and use that to tell it where to put the vertex of course we are not limited to positions we could put rotations or colors or whatever we want in the buffer and the point of all of this is just to eliminate the overhead that comes with doing many draw calls letting us draw loads of copies of our mesh so using that technique we can easily have a million particles of dust covering the floor i have also been working on this little compute shader and all this does is it looks if a dust particle is close enough to the vacuum to get sucked in and if so it accelerates the particle towards it if the dust ends up right under the nozzle then it gets disabled and a counter is incremented so we can keep track of exactly how much dust we've sucked up i've always wanted that statistic in real life but at least i get to live out the fantasy in a video game now [Music] to make the dust a bit more visually interesting i'd like to be able to control how it's distributed across the map so my idea is to paint a sort of weight map with white indicating the highest density of dust then i've added another kernel to the compute shader which runs just once at the start and for each dust particle it generates some number of random positions and chooses the one with the highest value in the density map and here's how that turned out i think it's definitely nicer than the totally uniform distribution we had before all right so that's the main vacuuming mechanic done i think the next step should be to liven up the apartment a little i decided to start by writing this chunk of code which basically spawns a bunch of cubes and gives them random lengths which i hope is going to end up looking like floorboards of course as seems to happen every time i use a while loop i crashed my computer a few times trying to make infinite planks anyway here is the initial result which looks a bit odd but after some tweaking i was able to get something that i was reasonably happy with i then spent ages making some little models in blender to fill up the apartment with such as a bed and a stove and so on it felt like i must have made about a million different things but all put together it doesn't actually look like very much anyway i quickly plopped these into the project and i made all of them physics objects because i thought it'd be amusing if the hero can't really control his own strength so as he's trying to tidy up he keeps knocking stuff over and making more and more of a mess of the place the apartment is still missing a few things that are generally nice to have like a laundry machine or i don't know windows but my self-imposed deadline is already drawing near so i need to get a move on and make an enemy beyond the dust that is i've been thinking ghosts because they could be sucked up using the vacuum so i've repurposed the dust code to make some particles that orbit around a point and that point moves towards the player parameters like the move speed and target position are controlled on the c sharp side to make the ghost lunge through the player when it gets close and as you can see it also applies a force to the player to knock him around a bit and after three hits it's game over our hero needs to be able to fight back of course so i then made it that if you press spacebar he'll lift up the vacuum like so and start sucking the ghosts in i am drawing some suction lines over here to try make it look a bit more powerful and as you can imagine that was creating and destroying a lot of line renderers every second to get around that i used the classic technique of spawning a bunch of them at the beginning and just reusing those the code for this simple cooling system is not terribly interesting but just in case anyone cares here it is all the way back near the beginning of the week i made my first foray into the world of songwriting because every respectable superhero needs a theme song i'm not much of a lyricist as you can probably tell but at least it's something and i found a musician on fiverr willing to perform it and i sent it off without any instruction because i had no idea how i wanted it to sound so that was a few days ago and today i was spending the last few hours of my allotted time adding some sound effects to the game and making this crude ui for the vacuuming progress and remaining health when the song arrived i've just been listening to it now and it has a very relaxed vibe which i think is going to make for an interesting contrast with the chaotic gameplay so let's press that play button one last time and see how it goes [Music] his chores [Music] he'll have it sorted [Music] confused how could so much dust accumulate while his news he hopes [Music] is [Music] so that's the game it's really only fun to play for a minute or two at most but i honestly had a lot of fun making it so i'll count that as a success i did massively overestimate how much i'd be able to get done in a week that little song i wrote originally had a whole second section where super cho man goes grocery shopping i was a bit sad not to fit it in so i actually quickly spent like half an hour making the world's buggiest prototype [Music] potatoes carrots too and also tomatoes zombies are fading so he'll play his part he'll charge them with his mighty powerful fearsome shopping cart [Music] i really love this bug in particular i was just trying to do some sort of basic quaternion operation but cortanians are so confusing i always have to try at least 10 different things before i get it right and when it's wrong it's usually very wrong there's actually even a third section to the song about cooking dinner while fending off a robot uprising so yes i seriously overscoped on this one still it was a fun little journey and i hope you enjoyed following along with it thanks for watching and until next time cheers [Music] he will be the winner he just wants to make his pie but if the roblox lasers hit it he's going to fry serpents man
Info
Channel: Sebastian Lague
Views: 1,748,457
Rating: 4.9748878 out of 5
Keywords:
Id: PGk0rnyTa1U
Channel Id: undefined
Length: 17min 51sec (1071 seconds)
Published: Mon Aug 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.