Devlog 1 - Getting a Move On


Wow, the first week is already drawing to a close... I feel like it was just yesterday when I started this! Well, it was actually like 3 days ago, but the expression still works. Seeing as this was the beginnings of a platformer, it's probably best to add in some good ol' left and right movement, eh?

Super Meat Boy Forever could never match this quality of- *checks notes*  ...moving in a straight line.

3rd degree burns aside, once I got sideways movement done, I needed to implement the main mechanic that separates this platformer from most others. Jumping.

Yeah, ok, I can explain. In Cosmodrift, the game focuses on gravity, more specifically the lack thereof.  So when you jump, you're propelled feet first away from the platform, drifting towards who knows what. All I needed to implement was a jump that would launch the player.

 

And as unimpressive as it looks, it is technically working!

With this one way ticket to a floating point precision error in the y position, I got to making it actually work and not be a glorified softlock. I ironed out all the bugs, and decided to go full steam ahead with minor updates. The day went in a blur! I did some intense pixel-art-ing, engaged in hand-to-hand combat with Unity's pixel perfect camera, installed the Universal Render Pipeline to make the game look nice, cried as everything mysteriously broke, googled the cause of the memory leak, uninstalled the Universal Render Pipeline, and added some animations! What a rollercoaster, huh? Lunatic rambling aside, here's the graphically enhanced jumping below.

AAA quality at it's finest. I could watch this all day... but unfortunately, I have a devlog to finish.

The last key piece of movement I wanted to add was Wall Reorientation™ (patent pending). The long and short of it is "walk into wall, stick to wall". Crude caveman chatter aside, the aim is to eventually have this only work for specific surfaces, which would allow me to design levels and puzzles with this ability in mind.

Ah, just as I imagined it!

...

...ok, even if it really only works well in this one particular environment, that's a win in my book.

Anyhow, after implementing this, the play testers unanimously shared a request. With the first version of this, the character would always move right when the player pressed right, and vice versa for left. However, the movement is done relative to the characters rotation. In the GIF above, I'm constantly holding right, not a single other key. But if the player was upside down or on the walls, pressing right and seeing the character move up, down or even left may be rather unintuitive. So I added a toggle between Local and Global controls. Local controls are always relative to the character (right = the character's right), and Global is relative to the camera (right = the player's right).

I would share a GIF of this, but... well, there's really not anything to show. It's only the controls that change after all.  While this system functions fine for now, it does beg for some tweaks to make the mechanic smoother, but the amount of spaghetti code would instantly kill any Italian who sees it, so that's a crisis for future me to shoulder.


Aaaaand that wraps up the first week of developing Cosmodrift. So far, I've managed to make something that works, and while it isn't anywhere near completion yet (these 6 weeks might be one heck of a deadline to meet), I'm confident it will be playable. Probably.

Leave a comment

Log in with itch.io to leave a comment.