D100.00
March 23, 2008 on 7:21 am | In Combat | No CommentsOne of the key elements of the game is going to be the mechanics behind the combat aspect of the game.
In the original it was very simple. Basically every creature (both playable and not playable) had an attack and defense value. Dividing one against the other gave a chance to hit percentage. In game, a random number was generated between 1 and 100 (in essence a D100). The hit percentage was inversed (thus making a low roll bad and a high roll good), and if you got high enough then you hit your opponent. If you rolled 1-5 you would always miss and if you got 95-100 you got a crushing (double) hit.
Now after a while I added creature specials once they hit level 10. If memory serves these had a secondary chance to occur that ran independently of the main setup. This didn’t work very well and the special abilities weren’t very well thought out.
In W2, I’m going to follow on with this method to a certain extent, but want to add extra ‘chances’ such as dodge, block (if using some kind of shield), critical hits, secondary effect and so on. The important thing is that this has to be decided in one roll of the dice so to speak. Now one game has a novel way of dealing with this, in that everything is placed into a chart, that has an infinite number of possibilities, but only the first 1~100 are used. There are various benefits to this, but I’ll skip those for the time being. The biggest bonus is that instead of a dedicated chance to hit (which is split into what type of hit has been caused), you have a chance to miss, chance to have your attack mitigated (blocked, parried), cause special damage (crit, crush, secondary) and anything else is a plain hit. Now going for a method like this makes D100 pretty inaccurate, so instead I’ll use a D100.00 instead - i.e. the number generated is to 2 decimal places.
As in the original you will have an attack and defense value – but these will be secondary stats, calculated from your weapon proficiency, abilities, agility etc. Your level and your opponents level will be irrelevant, as in the first game – but obviously a higher level will have higher attributes. One key thing I will do in contrast to the original is to lower the chance to miss. If you faced an equal opponent, then you’d have a 50/50 chance to hit and miss.   Hit chance won’t exist as a direct stat, and the chance to miss will likely be around 15~20% although this will be subject to change.
One things that has just occurred to me is that I can make two-handed weapons more powerful than I originally was going to. I was thinking of making them half the speed and twice the damage, however this isn’t an incentive to use them, as one miss with a slow weapon reduces damage output by more than a miss with a faster weapon. So what I could do is to increase the damage more, but give all opponents an increase to the chance to dodge. This might sound like the same as a miss, but certain abilities will trigger after dodges, plus I’ll likely have skills that will reduce the chance your opponent can dodge.
Secondary effects are worth a quick note here. All damage types have a secondary effect that they can cause. Physical damage can stun for example, fire damage can cause burns (or ignite?). Resistance to each type of damage will help reduce the chance of secondary effects. This also opens up a balanced way of creating vulnerabilities, as I can decrease the resistance to a specific damage type thus increase the chance of incurring a special effect – which is more balanced than directly increasing damage taken from a specific damage type.
Armour
March 16, 2008 on 4:16 pm | In Combat | No CommentsI’ve been mulling over how armour should work in W2 for a while now. Now it goes without saying that physical strength effects what classes wear what type of armour. So strong melee types can wear nice spangly metal armour, but physically weak caster types will only wear robes and such like.
Now in W2, armour will provide damage reduction against incoming attacks. I’ll be using what has become ‘traditional’, and each piece of armour will have a value. This gives you an overall armour value that based on your level gives a percentage reduction in damage (e.g. a hit of 100 damage will become 65 if a creature has 35% damage reduction).
One problem is that you can’t give cloth armour the same armour value as plate armour, so it needs to confir a different bonus.
In W2, I want armour to have multiple armour values, for different damage types. Probably physical and magical, and likely with special abilities for sub types (e.g. +X armour against fire). Now I feel that its a mistake to give casters more protection against magical damage than non-casters (they’ll likely get magical shields and stuff), but armour needs to confir some benefit. So currently I think that armour will have a power rating. This works in the opposite way to armour value, and that culmulativly and based on level it will provide an increase to magical spells. This means that getting good armour will be essential for all classes, melee types will last longer in combat, and caster types will cause more damage. Hybrids will get the best of both worlds in a manner of speaking.
Health & Death
March 11, 2008 on 9:14 am | In Combat, Game System | No CommentsOne thing that I’ve been toying with for a while is how the whole hit point system should work. This links directly into what happens when/if you die. This also links into the travel system. I personally dislike games that remove a specific amount of XP when you die, it makes things horrible if you die repeatedly. Corpse running is a pain, and as I’ve not decided on how the travel system will work, could be a bit peculiar. One system I have recently experienced is that when you respawn, you have a 2 minute debuff where you earn less XP.
Anyway, back onto the point. One system I played had a clever setup in that not all opponents killed the character completely, instead they incapacitated a character which then took a short amount of time to come round at low health. I’m thinking of playing on this idea a little.
I’d like each character (and opponent) to have 2 health bars. One ‘vitality’ and one ‘wounds’. Currently I’m thinking that vitality represents your regular cuts, scrapes and bruise, and wounds are more serious (and also require different healing). In a fight, once a characters vitality goes, they suffer damage straight to their wounds.
Now on top of this, armour will reduce incoming damage by a specific amount. Magical shields will also need to exist, but I can’t decide on their exact function yet. My gut says to make them absorb a specific amount of damage, however this means that magical users will never need to use healing potions, so will be easy to play. Another thought is that they absorb a percentage of a certain number of attacks, but this would be annoying for fast attacks (which would use the shield up quickly). They could act like armour but only for magical attacks, though this would mean that people would end up picking caster vs caster and melee vs melee fights where possible, armour will also provide resistances against magical damage as well, so that would not be balanced.
I suppose that one way magical shields would work, would be to make them identical to armour in practice, but that they can only be used by casters. On a plus, this would make class balancing quite straightforward as all creatures would have damage reduction of a similar style.
Combat
March 10, 2008 on 12:26 pm | In Combat, Game System | No CommentsI’ve tried this, and it works reasonably OK. Basically combat works on a combat queue & ‘tick’ system. A player stacks up the actions they wish to take in their combat queue. The queue has a number of available ’slots’ in it.
Each action takes a pre-defined length of time in ticks and some have a ‘reuse time’ before they can be reused (again in ticks). The player clicks on any action they have available and it gets added to the combat queue. Once there it can’t be removed (tough).
Now there are a couple of different flavours of this system. The first and easiest to code, is that you only have a few slots of queue available, but a slot can take *any* action, and time. So you could have 3 slots and have one action that takes 3 ticks, one that takes 2 and one that takes 4, so a total of 9 ticks worth of combat. The other flavour and slightly more difficult to do, is that the combat queue is larger, but each slot is a single tick. So if you had 8 slots, the sequence of events above wouldn’t fit in until 1 tick had passed. The second method is actually easier to understand, although we could remedy that by adding the information about times to the first method (could be that the bar fills up left to right based on the total time). Thinking about it, I think that the first option is probably the better. Its less demanding on the client’s computer for a start, but also having the slot fill up will actually be more visually informative than lots of slots.
An action has a number of elements: onset time, total time and reuse time. The onset time represents the amount of time before an action happens (think charging up a fireball). The total time is the number of ticks that this skill requires (think charging up a fireball, shooting it and then waiting a bit until your vision clears). Finally the reuse time, is the amount of time you have to wait until you can use that skill again. Overall it sounds really complex, but in reality its pretty straight forward. Additionally by seeing information in hard numbers the human brain can comprehend them more easily.
Now each tick is roughly 2 seconds. More if there is lag, as the system waits until it receives a response from the server before counting down those 2 seconds (there is a timeout option as well to prevent people trying to hack). Now 2 seconds is actually quite a long time, so weapon attacks and actions may make multiple ’strikes’ within each attack. Take a sword for example. I would say that you can swing an averge blade once every second, more if its lighter. So a regular attack from a sword would have a time per action (1), damage per strike (3-4) and a strikes per action (2), so you ought to have 6~8 damage from that one attack (obviously each has a chance to miss/crit etc). Now a ‘gigantic’ attack might go time per action(2), damage per strike (+400%), strikes per action (1). So this ought to cause the same damage as 2 regular attacks, but as its a special attack will likely have an increased chance to cause a special effect (like a stun). Its going to be one of those things that will need lots of testing, but probably the best way of tackling it.
As with all of W2, all actions are passed to the server to complete, the fancy javascript UI is purely client side and every action is validated by the server. Amusingly what this means is that somebody could technically unlock a skill before its reuse time, and thus add it to the queue before they should be able to. In reality this actually just delay’s the next action in the queue
Well thats the basics of the combat system in a very small nutshell. Hopefully keeping everything simple and the interface straightforward will ensure that the game runs smoothly. Although 2 seconds is a long time, especially when waiting for an ability that takes a while to use, it is quite fast when you’re using 1 tick actions. I may also put in a control that compensates to a lesser extent on if you get big lag spikes. Its not uncommon to see lag of 250ms when on the internet (time it takes to send and receive a reponse from the server), which makes a tick 2.25 seconds. If I were to time this, then I could make the tick delay 1.75 seconds to compensate for the 250ms lag. If I were able to get the server to decide on the amount of time to pause, this would make life easier, as its going to be fairly difficult to intercept for hackers.
Entries and comments feeds. Valid XHTML and CSS. ^Top^ Powered by WordPress with jd-nebula-3c theme design by John Doe.