The path to (junior) programming! Part 5
- ronchisa
- Mar 20
- 3 min read
So, let's see what this second mission holds: emergence dramatically from the sea before taking down untold wrongdoers? Drive on an icy landscape while doing all sorts of crazy shenanigans?
Close: make a little 3D guy jump obstacles!
And, my initial chagrin at the pace they set their exposition to has evaporated: true, each bit is very bite size, but it certainly feels like a lot is being shoved at us, so it is always good to chew thoroughly before swallowing such content -and, if you're ever full, it's very easy to pause and resume at a later time.
So, firstly we're given our prototype file to open and unfold what our scene is:

Next, we do get to apply all sorts of shenanigans to make our side-scrolling, obstacle jumping dream come true!
-Give our Player Rigidbody and Collision to know when it's hitting an obstacle.
-When pressing spacebar, make our Player jump by using AddForce( ) (new one on me, as I was just changing the y value previously, rather than messing with the physics!).
-Stop the Player from comically double-jumping into the infinite, by setting a boolean and collision method to check when they're on the ground.
-Make an obstacle spawn at regular intervals, for our intrepid little guy to heroically leap over as it whizzes towards them (make sure to Destroy them once they leave the camera view).
-Attach an animation to the Player so that it looks like they're running on the spot.
-Then, make the background move and loop on itself to give the illusion that you're actually running, without even needing to run!

-Add a Game Over trigger upon colliding with an obstacle, and an animation to make our perishable Player keel over to the ground, dead -not dead, just, er, resting. Oh, and perhaps those obstacles can stop spawning now, thank you! And the Player should definitely not be able to jump if lying on the ground mortally wounded, let's also fix that!
-And, if that wasn't good enough, particles! Dirt skidding off the Player's shoes, and a large puff of smoke as they crash to their doom -I mean, rest!

Ok, so that was two full Units of the Mission, and now we're onto the third one -so, a lot was condensed above, and there was a lot of bite-sized learning to get here, but you get the point: had it not been bite sized, perhaps I'd have needed some heimlich maneuvering to stop me from choking.
One thing I will say, is that we're given a lot of pre-packaged food -the animations and particles I mentioned, are all ready made and part of the prototype package. Which, makes sense: need to firstly understand how to apply them, before we learn how to make them.
The making of them concerns me, though...but, at the rate things are going, I'm confident the tools to do such will have been provided by then in delicious, tiny little morsels.
And, there's still a while to go -we're only at 4% of the whole thing -wait, for realsies?!? Wow, that...that's not a lot...but, it also means there's a lot more the whole course will offer, right?
Onwards and fuller, then: let's finish Unit 3 of Mission 2 and attach some sound to this running escapade!
Your degusting foodie,
Stefano Ronchi
Comments