Hey everyone!
This week has been a productive romp through all kinds of bits and pieces.
Firstly, the spell system now supports channelled spells. These are spells that perform an effect over the duration of their cast time – for example, in the above screenshot you can see our first test spell Volley is firing arrows for the duration of the cast. Taking a closer look, this is also a nice opportunity to look at the new spell tooltips.
Spell tooltips now display all the information you could ever need about a spell, with cute icons and colour coding. Volley doesn’t belong to a school of magic as it is a weapon skill, however spells that do belong to a school of magic will also display that school in the tooltip. For an example of this, let’s take a look at the new Mage spell Flash (a Chaos spell) and talk about the next feature that was added to the spell system this week.
While going down the rabbit hole of adding support for AOEs and AOE warning markers to the engine, I ran into a fairly fundamental issue with how the game relies on asynchronous movement to keep everything smooth for the player regardless of latency. You see, if you are lagging and you charge off in a direction the server might not receive your moves for several hundred milliseconds, which means those moves haven’t been processed – so once they do arrive at the server they are then processed in real time and broadcast to everyone else. In this way, your “real” position is what the server says it is, and your client is essentially guessing until a situation arises where you have performed an invalid move (say, you walked through someone who happened to move into your path before the server caught up to your client’s current position) at which time the server will forcefully resync your client.
This issue works both ways if you are lagging, as it also means you might not be receiving other peoples moves for some time then receive many all at once. The client will queue them up and applies an increasingly less subtle modifier to the speed of others around you that are out of sync so they catch up to where they actually are as quickly as possible without ruining the immersion and what you are seeing can once again be consistent with the real game state. So what does this have to do with AOEs or the new Flash spell?
Well, a big part of the new spell system is I want AOEs that are being cast (they have a cast time) to display a warning graphic on the squares they are going to hit once the cast completes, giving you the duration of the cast to decide if you want to move out of the way, interrupt the caster, or take it to the face. This becomes extremely problematic if say, I am lagging and decide to cast uber explosion. My position is 3 tiles away from where the server says my position is as it has not yet processed my lagged moves, and it could be that one of those moves turns out to be illegal so it is rejected and I get force resynced… in this situation it is impossible to give an accurate representation of where this cast is going to occur as it could occur where my client says I am, it could occur somewhere else if the server rejects one of my queued moves, we can’t see into the future! And this is an extremely common occurrance – players are lagging their way across the realm all day long every day!
To draw further attention to the issue, let us imagine we want a mobility spell with zero cast time that allows someone to leap across the screen or teleport – if you are lagging even slightly and your position isn’t 100% up to date with the server, when you cast that spell we have all the same issues as above, as if we use the server’s current true position for your character then to you the spell will not work as you will be teleporting from where you were a second ago. If we use your client’s version of where you are then to everyone else you would have magically skipped a bunch of steps! And what is to stop you from getting your client to say any old nonsense? Clients can not be trusted under any circumstances! In this environment these kind of spells are not possible and simply can not work… but that isn’t good enough, we want these kind of spells.
So – I set out this morning to implement what I am calling buffered casting, that is, if a spell is flagged as requiring you to not be out of sync then it will wait until the server catches up with your current position before triggering the cast. This ensures your position is absolutely correct to all observers, and means now we don’t have to try and predict the future to project AOEs and mobility effects. It will mean if you are lagging then if you sprint across the world and trigger a spell cast with this stipulation it might take a second before it goes off while the server processes your latency delayed movement requests, but that is a small price to pay for what we get in return!
To test this new mechanism, I have introduced the new spell “Flash” onto the PTR for mages. It teleports you 4 square metres in the direction you are facing 🙂
With the new spell tooltips I felt it was time for consistent icons throughout the client to represent things like Vocation, Magics and Masteries, so all of these things now have cute little icons wherever they are referenced. I don’t think there is much else in the way of cool visual things to show off in screenshots, so let us instead get to the full list of changes!
What has changed?
- Shader
- Should automatically fall back to no shader if the device doesn’t support it
- Added preference to toggle it on or off
- UI
- New spell tooltips displaying all spell info
- Magic schools now have unique icons
- Masteries now all have unique icons
- Vocations now have icons
- Spells
- New “channeled” spell system
- Performs the spell over the duration of the cast
- Uses your resource (mana, rage, focus) with each tick of the cast
- Checks if the cast is still valid on each tick of the cast
- Is not interrupted if you are pushed
- Is interrupted if you move
- New “buffered” spell cast system
- Spells that require your position to be synced will buffer and fire once you and the server are perfectly in sync. Including, but not limited to…
- Spells with cast times
- Channelled spells
- Movement spells
- Spells that require your position to be synced will buffer and fire once you and the server are perfectly in sync. Including, but not limited to…
- New spells
- Volley
- Ranger spell
- 2 second cast time
- 5 second cooldown
- Fires 1 – 4 arrows over the duration of the cast for 50% spell damage each
- Will be a great way of applying stacks of a debuff (poison, that sort of thing) to an enemy quickly
- Flash
- Mage spell
- Instant
- 5 second cooldown
- 25 mana cost
- Teleports you 4 squares in any direction, or as far as you can go in that direction given your state
- Volley
- AOE system
- Significant back-end work on spell warnings
- Not ready yet, targeted for next Friday’s PTR release
- Typing incantations into the chat will trigger the spell if it is on your spellbar
- Server netcode efficiency improvements with regards to broadcasting spell incantations
- New “channeled” spell system
- Fixes
- Spell bar correctly resets on vocation change
- Spell casting status sent along with creatures
- Cooldowns invisibly blocking other spell casts
- Casting a second spell during a cast messing with the cast-bar
- Various client support for multiple spells on the cast-bar
This has certainly been a big week for Mirage, a lot of progress on the spell engine and momentum feels like it is picking up. I am excited to crack on and get AOEs working next week and adding a bunch of fun test spells using all of these systems for next Friday’s PTR. If all goes to plan, the next version of the PTR will have significantly better spell gameplay and more spells than live for every vocation 🙂
After that, the following week will be spent implementing the status effect system and getting our first buffs, debuffs, and stacking status effects working! I am looking forwards to buffing myself with applying poison and stacking some sweet damage over time posion debuffs on everyone in the arena!
Please report any and all bugs to the #ptr-bugs channel on Discord!
See you soon,
Fhox