Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Gotta Do Something!

Here I sit, again, trying to make myself work on the game. Today, I know what I'm working on. Today I work on The Hull. I'm really not sure exactly how this is going to work, but let's GO!

Start out with a simple, empty game object. Name it, make it a prefab, add the script machine. Oops, looks like I already did that part, lol. Okay, so what do we need to know, the maximum hit points of the hull as well as the current hit points. Already got variables for that. I need another variable though, BaseHitPoints. Okay, that's perfect!

Now, how do we calculate maximum hit points? We take the base hit points and add modifiers. We don't have modifiers, so let's not worry too much about that. Okay, I've added in the place for the calculation on increasing max hitpoints from the base amount, but for now I just left a sticky note to remind myself about it. I should add a ToDo node as well. . . 

I've adjusted my debug screen a little bit. Moved one button, and replaced it with one that gives the player the hull object. Obviously, the hull doesn't actually do anything yet . . . But before I can test it at all, I need to be able to give it to the player! 

Ugh, this game development thing takes so much longer than it should because I keep closing Unity, backing up my project, the re-launching Unity. You know, so I don't lose all my work when it crashes. 

This is weird. Well, a few weird things really. But let's start with the one I already resolved. First, when I had the hull equipped (childed to the player ship) and I was trying to rotate the ship, it was moving in a really strange way. Turns out, because the hull object wasn't centered on the ship it was causing that for some reason (I'm using forces to rotate things, so that's probably why). 

But, now that I've fixed that, when the player tries to turn without the hull, the ship is REALLY slow. If it has the hull, it moves just fine. I think it has to do with the collider, but I don't have a clue why that would matter. It'll be pretty simple to test though, just turn the collider on the ship on and off. 

Yep, that's why. Seems that the rigidbody uses the colliders to calculate the mass, so not having a collider kinda breaks the rigidbody? So, technically, with the way this game will be played, the ship shouldn't be in space without a hull. . . so there's no worry about that I guess. Okay, so far so good. I'm not gonna bother with the collisions or hit point stuff yet. I feel good about what I've done so far today!

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.