All posts by utilitron

Leader Board

As mentioned in the end of my Game Patches post, I have been working on a leader board ahead of the 0.0.2 release.

Right now it is just a basic table that ranks players (by IP and name) based on number of kills. I will work on stylizing it more later, but as of right now the basic functionality exists and is implemented into the game.

Check it out here.

Game patches

I have been hard at work over the last week designing and building a few new features.

The patch system works by checking a version number for the game on mageduels.com, if the number is different it starts the update process. Before launching the patcher, the game checks the version number for the patcher and if it is different, downloads and updates the patcher software before continuing on to updating the game.

I am happy with this approach because if at any time I release a new version of the game, it will go get the required files without having to send email blasts or hit up twitter or reddit and hope everyone sees it. But also it updates the patcher it’s self. So if in the event I re-write the patcher, the system will pick that up as well.

The other thing I was able to get into the game is a kill log. I have a database set up that logs kill counts by ip. This will be used to update a leader board I will be putting on this site.

TODO list for 0.0.2

Casting:

  • Fizzle on damage
  • Fizzle on low mana
  • No targeting ghosts
  • Reimplement casting effect

Character

  • Fix animation bug

HUD

  • Display poison on health bar (make hp green)
  • Add Buff/Debuff icon placeholders

Spells

  • Add icon holder for buff/debuff icon to be displayed on HUD

Map

  • Add rez spot near center
  • Make map more interesting

Rebuilding networking

As I make the push for a WebGL, I have had to rework some of the ways I was doing things. One of the major changes is I have been stripping out the client-side code in the headless server build, and stripping out the server code in the client build. I am working hard to make certain that as much of the core functionality of the game is server side to help prevent wide spread hacking.

I am also beginning to implement messaging. I have system messages being sent from the server. This will allow me to bring back chat. I am not certain if I will go for a chat window style or over the head chat yet.

ScriptableObjects

So because a lot of the parts of Unity are new to me, I may not have built things in the greatest way… at least not on the first pass.

Originally I wrote the spell system with a game object that implements a script that just holds information about the spell.

public class Spell: MonoBehaviour {
    public KeyCode key;
    public GameObject effect;
    public string type;
    public string words;
    public float castTime;
    public float manaCost;
    public float effectValue;
    public string effectTarget;
    public string effectType;
    public float delayTime;
    public float expireTime;
}

SpellManager

So after watching a tutorial on ScriptableObjects I have begun moving my spell system over.

public class SpellList : ScriptableObject 
{
    public List<Spell> spellList;
}

[System.Serializable]
public class Spell 
{
    public string spellName = New Spell;
    public Texture2D spellIcon = null;
    public KeyCode hotkey = null;
    public ParticleSystem spellEffect = null;
    public SpellType type = null;
    public string incantation = ;
    public float castTime = 0.0f;
    public float manaCost = 0.0f;
    public float effectValue = 0.0f;
    public EffectType effectType = null;
    public EffectTarget effectTarget = null;
    public float delayTime = 0.0f;
    public float expireTime = 0.0f;
}

SpellList