Thursday, February 6, 2025

Space Booty Sprint 1

Sprint 1 of Space Booty was a little shorter than usual, being only nine days, but with all my experience at this point I wanted to hit the ground running to be able to get to the fun parts. At this point, I’m pretty comfortable setting up things like player movement, camera controls, projectiles, pickups and the like, so it was mostly a matter of getting all the basics up to speed.

As the team’s lead programmer, I started by setting up the github page for our project and getting everyone on. Then I got right into the standard project stuff, using the new input system to setup basic Input Actions for player controls, and getting a basic gameobject for the player. I also made a script for the camera to follow the player around. At this point these all are tasks I’ve done for several projects before.


While it does use some resources, what’s nice about this camera system (as opposed to just making it a child of the player) is that it’s great at showing velocity and motion. Since the camera is interpolating to the player’s position, it lags behind a bit, so when the player character is moving really fast, it shows in its slight deviation from the screen center.

Next I got the camera to be able to rotate as well, and the designer handed me some changes to the movement to make W/S move forward and back and A/D turn the ship. I gave it a quick little model to help show off the ship’s orientation in testing.


Then I got to the weaponry, starting with projectiles. The laser beams have a simple script that propels them forwards, and I used Unity’s layer collisions to make sure they don’t collide with the player—a very comprehensive and solid solution.


I also put together a quick ammo system, with straightforward logic. Right now it just fires on player click, but in the future I also know how to get hold-to-fire if we want that instead (since I personally prefer it). 

Our player is going to have at least five different weapons to use, which means I do have to start thinking about how to get that to work. Though I only setup the basic weapon this sprint, I began some framework to iterate on in the future. The player has a list of its weapons, referencing a Scriptable Object for each weapon. Right now, this is shown in how each weapon has its own ammo count. In the future, I’m going to need to figure out how to get each weapon to have different firing patterns for their projectiles.



One brand-new discovery I made this sprint came with the weapon switching system. I did a bit of research and figured out how to use one Input Action to map to all the different numbered keys, returning the number of the key that was pressed. This is super exciting since it saves a ton of lines of code by compressing them all into a single contextual function. There aren’t any weapon models in the game yet, but I was still able to show off this feature by adding some quick temporary UI. As you can see, it works flawlessly, and I’m really happy with it.


With that, the basics of player movement and attacking are totally good to go. Most of the work was pretty by-the-book for me, but I still got to make some new discoveries and I’m happy with how much I could get done in only a little over a week. Going forwards, I’m confident that I can get the programming totally under control for this game.


No comments:

Post a Comment

Featured Post

Aftershock Simulator Sprint 3

This is th e tutorial video I made for my team demonstrating how to use the objective system I designed this sprint. I’m really happy with h...