Saturday, October 22, 2011

[SBX2] Tech Demo Release

Wait... is that a... 2?  YES it is.  I have just finished the Tech Demo for SBX2 - Return of the Fuscians, the sequel to SBX.  This time around it is a space exploration game, not a scrolling shooter.

Link:  (also at the bottom)

The Tech Demo contains a few things:
  • The basic AI structure for enemies in the game.
  • The movement engine for the player.
  • Destructible Objects in the game! Yay you can break walls!
  • A temporary GUI  (Will Be Replaced with something cool lookin)
  • Sweet Temporary music  (Muse is just win)
  • Awesome Space Action
There is a lot that I am doing differently this time.  I have learned a bunch about coding since I began SBX, including things from other sources, such as my Unity course.  I have learned to streamline my code and actions to make things as efficient as possible.

Also a big difference with the sequel is I am not using any Drag and Drop programming.  (For those of you unfamiliar, Game Maker lets you drag and drop commands into a visual command line, to make things easy for beginners.)  Everything in the game will be done by pure code, with the exception of a few single line things that I can drop in for quickness, like destroy self, etc.  

The AI was tons of fun to program.  It's not quite finished, but is now working after quite a few hours developing and testing it.  Enemies have 4 states:  "Normal" , "Search" , "Attack" , and "Avoid".  
I'll briefly describe each of them:
Enemies start out in normal, which is a path based on coordinates given at implementation.  Coordinates are stored in a 2d array, with X being the 0 slot in the second array, and Y being the 1 slot.  Each enemy cycles through the coordinates in the array until they reach an entry of (0,0) in which they repeat the process.  When they reach within 10 pixels of their destination, they then choose the next one.

From normal or search mode, if the player comes within a certain distance, the enemy will close the distance and chase down the player, keeping within a safe firing distance.  **To Be Added:  Later on enemies will have a suicide option, in which they will try to ram the player to do massive damage at the cost of death**
In attack mode, the enemies also will fire weapons at the player.

Once the enemy is in battle, when it reaches a certain HP threshold, it will attempt to use evading techniques to encircle the player and avoid fire.  The enemy will continue to fire weapons at the player, but will move side to side instead of chasing the player down.

If the enemy is in Attack or Avoid mode and the player leaves the combat range of the enemy, it will engage Search Mode.  In Search Mode the enemy will do circular sweeps of an area until the player comes back into range, or until a long timer tells it to go back to it's regular path after not finding the player.

Here is a sample image of combat with the enemy:

The only weapon in the tech demo is the Gatling Gun:  A weapon that will most likely be the player's starting weapon in the actual game.

Thank you all folks for reading!


No comments:

Post a Comment