Ah, good ‘ol moving platforms! Such a wonderful staple of our gaming memories, and now it’s our turn to make some, so let’s get to it!
First, let’s grab a current platform and rename it to Moving_Platform, duplicate it a couple times, and name the duplicates Point_A, and Point_B and move Point_B somewhere farther out to where you want the platform to move.
Our next challenge given to us was to have the player collect the coins and update a UI on the screen.
I began by creating a collectible script and attaching it to the sphere/coin
We’re just starting the script so we’ll just make an initial check to see if what’s hitting the collectible is the player and if it is, then we print that the player has a coin and destroy the coin object.
So yesterday we learned how to jump, now we will double the power!
So first we need to figure out where we can make the second jump attempt:
If you think about it, Jumping is just falling in the other direction. At least in Unity. Ok, maybe not exactly, but in order to jump, we will be adding a positive force to our velocities y-axis.
We’ll begin by creating a variable called _jumpHeight which we’ll seed with an arbitrary number.
So we currently have our player moving, that’s great but you’ll notice there’s no gravity! Let’s add some force to push our player down onto other platforms:
We now have a simple Player in a basic platform environment and we’re ready to get him moving so let’s do that. Create a script called “Player” and attach it to the Player capsule.
We’ll need a way to access our character controller so let’s create a holder.
Wow! The Cinematography course was a huge buffet of awesome info and now I’m about to dive into 2.5D platformer. Now *THIS* is a course I feel like I’m going to really benefit from as this is the kind of game I’d like to be making initially!
I’ve already created a new GitHub for it, and I’m super grateful that the school had me write articles on everything I’m doing because I had to refer back to my git article to create it! Don’t grow old, folks!
Afterwhich, I immediately began the introduction section to the course where we immediately…
WooHoo! The home stretch of the Cinematography course! What a ride it’s been! I feel I learned quite a bit in this course from how to record cutscenes to using Unitys navmesh system to help move the player and NPCs among waypoints as well as writing menu screens and managers!
After the player hits start, it takes a little while to load the game so we should make a loading screen where a bar rises to show how much of the game is being loaded.
The initial setup is pretty straightforward. Make a new scene, save it as “LoadingScreen”, and…
What’s the best thing about singleton patterns? Is it the way they make you sound cool, professional, and authoritative with your non-programming friends and family? I mean, yeah, there’s that, but when you’re programming in Unity, Singletons make things so much easier when you need to communicate amongst classes.
cartoonist, game artist, and wanabe gamedev.