Saturday, 9 September 2017

The Long Night: Mecahnics

In this port I am hoping to show you the items in my project that I call mechanics. To me mechanics (remember I have no education, let alone in game development) are distinct frameworks used to fulfill a given job, so, for example, a terrain renderer, it's scripts and shaders would, for me, fall under the umbrella, Terrain mechanics, the various game play UI elements and associated scripts would fall under the umbrella of HUD (Heads Up Display) mechanics and so on. In some cases multiple set's of mechanics can be used to describe a given mechanic, so for example, my Ship Mechanics embodies the Ship Flight Mechanics as well as the HUD that goes with it and so on.

I am going to try and describe the mechanics I currently have in the project and maybe some that are on my wish list...

Ship Mechanics

Our protagonist, with the use of the ancient books they have acquired, has created a basic flyer, the flying ship. It's a sort of hover craft some ant-gravity car (grav car),  


As you can see, it's all pretty basic looking, the ship model I "crafted" out of Unity primitives, it's effectively a set of scaled cubes, pretty much everything at the moment is a place holder, so don't be too harsh on me, don't forget I warned you in my first post that I have no artistic talents :P The HUD for the ship holds quite a bit of information, so, other than the obvious, altitude, velocity and fuel, we have a vertical meter on the left that gives you lots more info, Ill cover that in the HUD mechanics.

Flight Mechanics

The ship itself is controlled with vertical thrust, both positive and negative (you can go up and down) and horizontal thrust, positive only (you can go forward), you can also rotate the ship left and right (you can turn too). This enables you to navigate round the world and visit the various villages to gather more story elements, or to make money running errands. 



Control of the altitude is done by setting your desired altitude and the ship then attempts to get to that set level, this gives the impression that the ship is floating along on a cushion of air, almost like a hover craft. As you can see in the first image, you have to doc on designated areas, once you have docked fuel consumption stops and you are able to enter the village the dock is for. Once you have took off from a pad, fuel will be used until you land again.

Naturally, landing too hard, or hitting the terrain will result in you damaging the flyer, in some cases, even destroying it...

HUD Mechanics

As you can see in the previous two images, we have a HUD, this gives the player quite a bit of information, as mentioned before, their altitude, speed and fuel levels, but also information about their surroundings.


The bar far to the left gives lots of extra information, from the sea level, to the current level of the deck (Terrain) to your altitude and target altitude.


So, on this screens shot we have the image above:-

SL  = Sea LEvel
DK = Deck Level
AL  = Altitude
TA = Target Altitude, where you want the ship to be.

So, in this screen shot the player must be accelerating up as the TA is higher than the AL, they are well above the deck and the sea level, as can be seen.

Terrain Mechanics

At the moment I am using the stock Unity terrain engine combined with my own script to populate the terrain splat map and to auto populate the trees and grass. I am also using my own terrain shader, a version of a terrain shader I have in the asset store called Distingo, this version has a few enhancements added to it, mainly tessellation and texture height blending.



Ill cover these in more detail in later posts. The clouds you can see in the scene above are animated, they are simple perlin noise textures that change over time.

Story Mechanics

This is still a work in progress, not that the other bits aren't WIP, it all is, just that this is not as far along and it's hard to show this in screen shots :P Ill try and describe it, or what I intend it to be here.

So, the story is going to be quite linear, you will need x,y and z before you can progress to the next bit and so on, but the mechanism used to find these things are driven by the Rumor Mechanic.

Rumor Mechanics

I have a script that generates rumors based on a given seed, and so, should you change the seed (I want to use the procedural here, but fear it's not quite right) and so alter the location and rumor order giving you a different game experience each time you play it

Rumor Manager

Each time the player docks at a village they will pick up rumors, these rumors will have some errands in them, some general things about the game world, and some rumors that will move the story on. As I say above, this can be altered with each new game by generating a new seed on game start, may even let the players enter a seed if they really want to.

Name Generator

Again, based off the same seed, this generator will generate "random" names to be used in rumors or in any other part of the game engine really.

Location Generator

Yep, you guessed it, this will pick a location, again based on the given seed.

VLOG?

I love blogs, writing and reading them, but I feel they are hard to get visual effects across, so in my next post, I am hoping to add a vlog post, my next blog post will be short and sweet, ill use it to just hold the vlog post in.

OH, WOE IS ME!

So, as ever, this weeks gripes are around me finding time to work on my project, again. As a hobby games developer, I think that's the most frustrating thing, time and the lack of it. This week I have had no time at all, this weekend, I am writing this post and I am hoping that next week, when I come to do the Vlog post, I will have progressed the project a little more.

[I think I am going to have this section at the end of every post...]

No comments:

Post a Comment