Dev Log #10 A tale of scale, death and UI

The more I played, the more I realised that the physics felt off. Everything looked like toys bobbing around in the bath. I played with gravity and mass settings and got some hilarious results but I wanted the Cloudships to feel like they had heft. One of the things that really struck me were the cannon balls. They moved too fast, which made the scale look odd.

After a little reading one lunch break, it occurred to me that I was ignoring the export settings I was taking from Lightwave and that was a bad idea! I rescaled and the whole scene went to crap. I spent quite a few mornings rescaling everything before it started to feel right.

Health Bar

Not a place where Pete would go to guzzle Perry-air but those little green bars that show you how nearly dead you are. In the future, I want the models to deform or have "damage" models so that you can see how dead they are but for now a green bar would do. It would be handy for testing to know how.

Cloudship in the forefront and the enemy further off with a green health bar below

I followed a few tutorails, adjusted the graphics to fit and I had a health bar on the enemy. Simples!

Sinking into the sand

I want to have the enemy die, sink into the sand and respawn for another fight. It's a bit relentless currently and it seems to spawn where you can see it but that doesn't bother me just now; the enemy doesn't really have an AI. Getting it to sink into the sand was a little tricky: wait until it hits the sand, turn off physics, pull the model down and then reset it. You can see the enemy hilariously popping into existence...

Menus

Unity comes with a "pre load" little menu where you get to set screen res etc. I hated that, so it had to die. Once again, I followed tutorials, adjusted to my needs and moved on.

Play, options, quit - the simplest game menu ever.

There's one for settings and pause but they are super simple too. I learnt how to make and manage scenes, which was useful as I was wondering how to do that.

Next up

Player DEATH! Yup, it's time for the player to cark it. This will be largely a reproduction of the enemy death code but with a new GAME OVER screen.

And then... perhaps... I might say it's a game!

Comments

I started working on player death but stopped after a conversation with Felix. To paraphrase Felix...

You should do a create and a survival mode. So that people can play with all the buildings and see what is good

Why, Felix, that's a bloody good idea. I almost have "creative mode" already: just don't implement player damage/death and get on with the builder. Creative mode will also allow me to test the buildings as I make them. Thanks Felix!

So, I made a new project and started working on a scene in there. As the code has increased, I'm starting to get concerned that it's not a good idea and I should be using some sort of "experiment" scene in the main project.

Here are three stages, description below...

I started with snapping objects to a grid when the mouse clicks on the object. Mouse clicking is really clever: a ray is shot out from the camera to where the mouse is and the first thing it hits is the collision. It's about 4 lines of pretty standard code. Awesome.

I then needed a way to say "where can the buildings be made", so I created a dictionary object in C# with the grid co-ordinates and used that to create a bunch of transparent objects. Instead of clicking on the Cloudship, you now click on the boxes. And the building capsules align with those.

Felix also mentioned that it should be drag and drop and I needed to stop it from filling a space that was already there.

Next up is moving and some sort of building menu.

brainwipe's picture