Friday, 5 December 2014

Melee Attack

The melee attack is the main attack in the game. It is a simple attack that deals damage to the ai enemy.

The way it works, is the enemy has a trigger collider on it and when the player enters the colliders bounds it will be marked as able to be attacked. If the enemy is attackable and the user presses the 'keypad 0' button, the enemy will take damage

This is currently a simple version of the attack which will be advanced upon at a later date when advances in other areas have been made to allow for extension to this.

Saturday, 22 November 2014

AI Attributes, Attack & Damage

The AI Attributes are set up in the same way as the players, meaning it has all the basic stats needed for the game (health through to attack points). Aswell as tracking the stats for the enemy, it checks whether or not the enemy has died.

The method for the attack is fairly basic, it checks to see if there is any collision with the player, and if so deal damage.

Currently for taking damage, there is an AI Damage script attached to the weapon that is attacking the AI. This script checks for collision with the AI and deals the amount of damage based upon the attack stat of the player. Before doing any damage, there is a check to see if there is any armour on the AI, and that decided which stat to be attacked first.

AI Spawn Pickups

When I added pickups, I decided that score and xp would be dropped when an enemy is killed. This was done by checking to see if the ai had been killed, and instanciating the pickups in the position of the enemy.



Saturday, 15 November 2014

Pickups

Pickups... These are the gifts found throughout the levels of the game. Some will be given when you defeat an enemy (Score/XP), and others will be scattered around (Health/Armour).

For the pickups I have created 1 universal script that handles all types of pickups the player will find. The way the pickups are decided is with a public bool variable, that is decided when the pickup is created.

The pickup works by detecting collisions with the player, and then giving the player the bonus that pickup is for.

Again the art for the pickups is temporary, as artist are yet to supply art work for them.
Black = XP, Blue = Score, Red = Health, Green = Armour

Future additions to the pickups, will be instanciating the score & xp pickups when an enemy is defeated

Weapons: Projectiles & Future Additions

Projectiles are the first type of weapon we created for this game. Since implementing this though, the designers have informed us that Melee is the priority for now, so the projectiles are still relatively basic.

I have created the projectiles to be used by both the player, and AI. The AI will shoot continuouslly  whereas the player must press return (this is a poor key to use, and will be changed, I just thought it would be amusing to use a stupid key whilst in development) to shoot. There are 2 different projectile types, 1 that will damage the player, and the other will damage the AI.


One major flaw with the current design, is that projectiles will only be destroyed on collision with the Player/AI(depending on the type) or the boundaries.

The other types of attacks I am planning on developing are;

  • Melee 
    • Priority
    • Currently in development
    • Will be next update
  • Magic
    • Low priority
    • will probably be done for final product rather than the demo
  • Possibly others (need disscusion with designers)

Basic AI & Spawn Generation

The AI behaviour is being done by Dale (our other programmer), but because I decided to implement random spawning locations, as well as multiple types of AI enemies, I created a simple AI script (did the same with player movement, but thats not important now).

By simple, I mean simple. The script basically made the AI move left. That was it, I added a velocity to the rigidbody that moved it in a negative y direction. So yeah, simple.

This was done, as this wasn't my area, but we agreed for me to create the spawn generation. To be honset, the spawn generation is also rather simple. With there being 3 different AI types, I needed a way to decide which one to spawn, so a random number is generated, and the AI that corresponds to that number is spawned. This script is attatched to an empty game object, and the AI that is being spawned is given the position of the game object.

The main features of the 3 different AI are;

  • AI 1
    • Shoots projectiles at the player
  • AI 2
    • Moves slow, will be melee attacking enemy
  • AI 3
    • Does nothing. Damages player when they touch it.
These different types will probably be updated after discussions with the designers.


To randomly generate the spawn locations, I have a script which creates the ai spawn game object, and gives it a random vector within a predetermined range. This is done within a loop, which allows me to generate as many different locations as I want.



Obviously this isn't the best the scripts can be, but for the time being it does the job.

Basic Game Set Up & Player Attributes

In this post I will give a brief overview of the progress made on the game set up, as well as the attributes for the player.

Game Set Up

Not going to go too much detail about the game set up, its a few menu scenes, with some buttons that link to the next scene. The first is a simple splash screen that will load at the start of the game, that then links to the main screen, where you can navigate the game, and go to either, the level, a shop (where you can upgrade the character), a stats screen, a highscore screen, and then options to load & save the game. Currently only the Level scene & the highscore screen have been implemented as this section of the game isn't high priority for the moment. The current screens are still rather bland too, as the artwork is still in development. 


Player Attributes

The player attributes are pretty self explanitory, they are the attributes given to the player. This includes stuff like health, armour etc.

The stats I have given the player are as follows;

  • currentscore
    • This is the score the player has
  • health
    • The current amount of health the player has available
  • maxHealth
    • The maximum amount of health the player has available
  • mana
    • The current amount of mana the player has available
    • In future updates this will be used to determine whether the player can cast a spell or not
  • maxMana
    • The maximum amount of mana the player can store
  • armour
    • The current amount of armour the player has
    • The player will be able to purchase armour by purchasing it via the shop
    • also will be able to get armour through pickups
  • maxArmour
    • The maximum amount of armour the player can have
  • XP
    • The amount of XP the player has earnt
    • XP is used to level the player up
  • maxXP
    • The maximum amount of XP the player can earn per level
    • When XP matches maxXP the player will level up
  • playerlevel
    • The current level of the player
    • By leveling up, the character will become stronger
    • More upgrades will be available in the shop
  • maxLevel
    • Maximum level the player can reach
  • lives
    • The amount of lives the player has left
    • When the player dies, they lose a life
    • When the player runs out of lives, the game restarts
    • No limit to the amount of lives the player can have
  • manarestore
    • The speed at which the characters Mana restores
This data is show to the player in game, via a HUD. Much like the menu screens the HUD is temporary whilst the artist design the final product.

Wednesday, 12 November 2014

Introduction to my AGD Project

Hello,

I'm Matthew, I am one of 2 programmers in the group Misfits for the Advanced Games Development module. 

For our game, our group has decided to create a Holiday themed side scrolling RPG. The game will consist of travelling through levels that are associated with a holiday and fight off waves of enemies which will become more difficult the player advances. When enemies are killed both XP and score points will be earned. XP will be used later to upgrade the playable character, and score points will be saved and uploaded to a high scoreboard. Inevitably the player will die, and they will be given the opportunity to spend their XP on improving their character. Such improvements include an increase in damage, increase in health and an increase in defence.

I will be using this blog to detail the work I do on the game over the course of the year.