Genesis: Coding Dreams

One year ago I knew nothing about coding.  All I knew were the tales of epic frustration and confusing paradoxes from socially awkward individuals who spoke in a weird tongue, a language and behaviour that could only be associated with a secret society.  I gleefully mashed my controller buttons, experiencing the joys of gaming happily unawares.  Looking back at those days all I can say is………”Ignorance is bliss.”

I’m now awakened to the enormity or complexity I should say, of making the magic happen.  Such simple tasks that we gamers take for granted like character movement for example, requires a colossal amount of logic and planning.  It’s not just about getting it to work, it’s also about the ‘feel’ and how that ‘feel’ interacts with the rest of the game world that cultivates the experience for player.

This week I set myself two simple(so I thought) tasks.  The first task was to implement very simple character movement into my game.  Unfortunately my initial definition for ‘simple’ was greatly over-exaggerated.  Whilst I’ve managed to get my character moving in the directions I intended for, I am still yet to figure out how to rotate the player to face the direction of travel.  I have literally wasted hours upon hours looking at Quaternion guides and scripting references to no effect.  Here let me give you an example:

public class ExampleClass : MonoBehaviour {
public float smooth = 2.0F;
public float tiltAngle = 30.0F;
void Update() {
float tiltAroundZ = Input.GetAxis(“Horizontal”) * tiltAngle;
float tiltAroundX = Input.GetAxis(“Vertical”) * tiltAngle;
Quaternion target = Quaternion.Euler(tiltAroundX, 0, tiltAroundZ);
transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * smooth);


I’m sure I’m just over complicating this.  But on the bright side, I have managed to achieve my second task which was to implement shooting.  My game will hopefully house not one but three different types of ammunition.  The first which I’ve managed to implement successfully, is a single barrel, medium rate-of-fire(ROF) machine gun.  The second ammunition type I plan to implement is a faster ROF double-barrelled machine gun.  The last ammunition type I really, really hope to get into my game is a slow ROF, cannon that does area of effect damage upon hitting enemies.  I’m still deciding whether to base these ammunition types off scoreboard, pick-ups or switching guns.  It’s very easy to allow feature creep to set-in which is something I’m trying very hard to avoid.

Next week I plan on getting my enemies implemented and finishing the ammunition types.  With any luck I will also have some basic graphics and audio sorted as well.