Monday 29 December 2014

Unity Fighting Game Combo System !

Over the Christmas period I've retreated to my home in Manchester for a chance to chill with my family and relax. It's actually been great for my work flow, I've managed to get a fairly big chunk of work done on Tempremental and sorted out some plans for my coursework when I return to Leeds.

But as I was saying, the fairly big chunk of work :
After a few days of slaving gradually removing distractions & getting on with my programming I've managed to create the combo system for the game which was one of the biggest parts of the coding that handles input. I've set up a class on the player which handles the input of the user and sends the button presses to an external class on the player called CommandReceptor.

CommandReceptor
The command receptor has a function which takes arguments representing the buttons current states and then submits them to a list called inputList, this function then checks how many moves are stored in the list and if it's above moveCache then the oldest entry is deleted (this means there is a speed limit that the sequences need to be input by). 
// stores commands 
 public void ParseCommands(float horiz, float vert, bool xButt, 
                           bool sqrButt, bool triButt, bool oButt)
 {   
  List cmds = new List(){horiz, vert, xButt, sqrButt, triButt, oButt};
  inputList.Add (cmds);  
  if (inputList.Count > moveCache) // if input list has backlog of over movecache then removes earliert input
  {
   inputList.RemoveAt(0);   
  }
  MoveCheck();
 }

From there it runs a sequence which cross references every entry in the inputList by every possible sequence which is stored in list possMoves. This checks to see if there are matches and if it does; increments a sequence counter & removed all moves from the possMoves list that don't match the current sequence. If the sequence counter reaches the length of the move, the move is performed, the inputList is wiped and the possMoves list is reset. The information on the move is sent back to PlayerControls and is dealt with from there. 

// runs though arrays of moves to check if there is appropriate sequence 
 void MoveCheck() 
 { 
  for (int i = 0; i < inputList.Count; i ++)
  {
   bool shouldExit = false; // exits function if finished move           
   
   for (int j = 0; j < possMoves.Count; j ++)
   {    
    if (ArrayCheck(inputList[i], possMoves[j][possMoveCount]))
    {    
     possMoveCount ++;    
     if (possMoveCount >= possMoves[j].Count) 
     {       
      possMoveCount = 0;  // clears how far you are in sequence    
      PerformMove(j);  // does move using number of list as array 
      inputList.Clear(); // clears moves archive
      shouldExit = true;  // stop function 
      break; 
     }       
     CleanPossMoves(j,possMoveCount); // also tells the sequence    
    }    
   }
   
   if (shouldExit) // exits function if condition met
   {
    break;   // exits from main loop       
   }   
  }
  MakePossMoves();
  possMoveCount = 0;  
 }
So at the moment I have the ability for directional moves & directional combinations. I think all I really need now in terms of the combo system is to develop a state mechanism that allows combos by performing moves based on what the last move was and how long ago it was performed. I still regrettably don't have a tablet and so can't really create any more assets to work with (at least neater than a shaky stick figure or silhouette) but when I make any headway I'll be sure to update the blog.

So yeah, that's my post Christmas update and expect to see more in 2015, Happy New Year guys. 

P.S: I decided to make a github repository for this project so people could  see the code if they were interested https://github.com/IzaacBarratt/tempremental.



Wednesday 17 December 2014

Temperamental update 2

I've been having difficulty creating assets at the moment because the tablet I was using to draw and animate has selfishly decided to stop working. Fortunately I had already been able to create a simple jump, walk and idle sprite for one of my contestants and so have been able to play around with the mechanics of character movement.

I've created the movement physics, wall collisions, dashing, gravity, and wall sliding/holding. Messing around with the drag and friction on the floor so I can get a feel for how responsive the player can interact with the game but other than that I don't think I'll be able to do much until I get back to animating assets. 

I'm slowly coming up with a more complete idea in my head of how the game is ultimately going to play out but until I have a working demo I think I'll leave them in my head. 
























Friday 24 October 2014

Mid October Update

Sooo, interesting stuff from both my personal and career life.


Uni Related -
Because I'm doing a sandwich year I'm going on a work placement next year. The placement lasts 12 months and is basically going to be a look into what my life is going to be like in 2+ years.
I've just finished up my C.V + cover letter & getting ready to send it to companies offering placements, some of the companies I'm more excited about applying for are IBM and SAP. They came to my University to do promotional work and talk about their placements, they offer good money + add-ons (phone, gym membership, tablet etc) & they're going to look pretty sleek on a C.V for after I've graduated. 

Researched IBM a bit afterwards. It's actually crazy, they basically made hard drives, dynamic RAM, bar codes, SQL, the list goes on. So mostly hopeful to get a placement there, though because they're so acclaimed I'm sure it'll be hard so I'm not holding my breath, just being hopeful
On a side note Microsoft already declined me. I make myself feel better by remembering PS4 sold more than XboxOne.


Personal Projects - 
Been working with Blender 3D which is a free, open source 3D modelling app. Not going to lie, 3D animation depresses me. The process is so tedious with such a steep learning curve. I'm sure it gets easier the more you use it (which I eventually plan to), but for now I'm being lazy and going back to 2D artwork.

TEMPERAMENTAL -
I'm using Unity3D at the moment and making a 2D brawling game. It's called Temperamental and I think I'll leave most of the development ideas until I actually have something solid that I can show people. But the main premise of the game is basically an arena/tournament where contestants with out-of-body companions (temperaments) fight. All contestants are required to wear masks (may have been an excuse for not drawing faces but I'm sticking with it).


I'm creating the 2D assets in Flash CC and just finished a simple sprite for one of the characters idle stance and running animation.
Kind of miss my goofy/sketchy 2D style, be fun going back and working with it in a game project again.


More updates will follow, stay posted. 

Hello World

First post on a new blog....

I guess the first thing to do would be to outline what this blog is about, who it's from & where I'm hoping to take it.

This blog is predominately to document my work, both professional and independent. I figure it'd be nice to have a journal of work that I've done and somewhere I can share news on what I'm planning or developing. My work is mostly programming, I seem to particularly enjoy game development. I work with a few IDE's and a couple of OOP languages, but I'll go more into depth when the topics arise.

My name is Izaac Barratt, born and raised in Manchester, currently in Leeds for University. I go to Leeds Beckett & studying BSc(hons) Computing in my second year. Originally started off about 7 years ago with animation, I had a trial version of Toon Boom and started working with stick figures. Few years later I made drawn figure cartoons and a few years after that I realised you could make games on flash. Ever since I've been interested in programming to an extent but recently (past year or 2) it's become a career prospect as well as a hobby. 

Where I'm hoping to take this blog : 
I'm hoping that I could have a wide range of work on here, snippets of code and other "Expeditions". I'd be nice to share stuff I'm excited over with people that shared the same interest, I don't have many people in my social circle that care a great deal about programming. If others also get entertainment out of reading the blog casually, even better. 

Just wanted to let you lot know what's going on here, stay posted.