Sunday, August 30, 2009

Finalizing Fixes

After last week's semi-successful debug launch, I'm working today on finishing up the revised version with updated...everything! So far, the changes include:
- new hp/mp calculations
- new spell system
- consumables now work
- sacrificing to a geosid now triggers an "event" every of geonite. generating consumables on this event is currently implemented
- redesigned chaos effects
- new design equations for how agility/intelligence/strength affect magic speed/damage and physical speed/damage


Before the release tomorrow, I still need to finish up a few things:
- allow town geosids to create a portal when they are triggered
- make gold look like gold on the ground
- make town geosids act like safe zones (good players can't be killed) and wild geosids act like pvp arenas (players don't lose exp for dying, don't drop items when killed, etc)
- add an npc type for town guard that attacks evil
- revise special effects for all of the spells
- create the hunter/warrior spell spread
- generate the new map


1430
Looking good so far:
- town guard has been added
- hunter spell spread is nearly complete (it seems really cool!)

Thursday, August 20, 2009

Pulling in to the Station

This release is looking good! We will almost certainly have it out on time.

New Experimental Design Feature: PVP Damage Adjustment
Erich and I discussed this mechanic I came up with this morning, and we're really excited about it! Let's just jump in:

PVP damage is multiplied by a factor based on the ratio of the attacked to attacker's level

So here's an example: a level 20 attacks a level 40 and does 2x base damage. A level 40 attacks a level 20 and does 1/2 base damage.

The actual formula is: damage defender takes = (5 + defender's level) / (5 + attacker's level)

The 5+... ensures that a level 1 attacking a level 100 doesn't do 100x damage, only 20x damage. In fact, it's for this reason that the "introductory levels" were all collected into 1 set: from levels 1-5, you will not drop any items on death and your PVP damage doesn't work this way--it works normally. So level 4 attacking level 80 does a level 4's damage (nothin'). A level 10, however, can be killed by the level 80--but will do 85/15 = 560% normal damage.

Now here's where the magic works: that ratio seems huge, right? Well, if you use the actual DPS numbers we came up with, that amount is only 30% of the dps a level 80 does to another level 80--so it's significantly weaker, but not so much so that a level 80 could just sit around not caring that a whole guild of level 10's are attacking him! (In the reverse case--80 attacking 10--the level 80 does about 350% of a normal level 10's DPS, so he's still much stronger. However, he's not impossibly strong)


So, this also affects our defense equations: the "correct" amount of armor at any level now gives 20% damage reduction to attacks *from* any level. A level 100 with 2k armor gets the same damage reduction as a level 20 does with 400 armor.

What are the results of all this?
  1. Guilds are now even more important: having a band of friends that know how to fight together is better than having a band that is high level
  2. PVPing isn't limited just to high levels: you can PVP within a *much* larger level range, and enjoy doing so at any level. If you don't want to grind your character, you can participate in guild events without any problems.
  3. PVE combat is still based on level: you need to be higher level to explore harder dungeons. Since monster damage isn't level-adjusted in the same way, low level players will still get pwned by high-level dungeons.
  4. Levels give you access to cool new stuff, but they don't matter as much as how you build your character
  5. Epic items are truly *epic*. If an epic item does 200% of the dps that it should for the minimum level that can equip it, that player will be uber powerful when using that item. Think of our level 10 going after the level 80--he will be doing nearly 70% of the level 80's dps, and will be a force to be reckoned with.

Phew! I hope this mechanic works, it could really unlock a lot of potential in this game.


Now, for a list of stuff I've done:
  • enchantments work
  • items can now have on-death effects (such as a resurrecting heal!)
  • resurrection commands should work
  • added "wishing" property to items: wishing ring = add 20% to chance not to drop equipment on death. if player wears 5 wishing rings, they will never drop items--but they're filling 5 ring slots with something that doesn't add to their hp/mp/dps/defense

Wednesday, August 19, 2009

Bug Fixin', Feature Makin'

Nuked:
- items don't show up on map
- sometimes geosid owner isn't retrieved
- spawn point effect lasts 1000 seconds instead of 1000 milliseconds
- changing to overhead viewpoint revealed the backs of walls weren't drawn correctly
- enable use-geosid magic
- g/home and g/sethome don't work
- need a targeted portal type
- add guild command: g/abandon [geosid name] to voluntarily give up a geosid (usually so you can take over another; leader-only)
- add party commands, including p/close
- compile enchantment types

Noticed:
- gold needs scenery
- something causes geosid burst to stop working until logoff/login
- add type to spin: bow or weapon, weapon only, bow only
- after a geosid-based trans, player is locked in place until another magic is used

Tuesday, August 18, 2009

Hooray Geosids!

Geosids are in the game now, and a guild can take over/own a geosid. Their name will display below the geosid's name on the map. Now--on to adding other geonite-based effects and testing.


1500
Hooray! I've got two geosids up and running--a white one and a red one. You can take them over, effects display and it uses geonite. Sacrificing works great. Now to be sure the bonuses are working and everything saves correctly.

1700
Ironed out some bugs, seems to work fine. I think it's time to see what the "real" game feels like--time to design some maps tomorrow with Erich and get this content all imported!

Thursday, August 6, 2009

You'd be surprised \ There's so much to be done

It seems sometimes like no matter how much we accomplish, more tasks turn up that are still unfinished. Since we have to release pre-beta next week, it really is crunch time now. There's not much choice in this matter--if it doesn't go out, we won't have enough time to test everything before school starts, all of our time will be consumed by classes and the summer will end without a release. That I'm starting to feel a little burned out doesn't help me worry less. However, this is going to happen. It has to. This just means the mantra "what's the simplest thing that could possibly work" is even more important now than ever, given the number of tasks left to complete.

To help organize my thoughts, I'm going to list all of the biggest things (no details, like in the document we've been maintaining) that need to be implemented before pre-beta can go out:

- Spells
- Monster AI
- Treasure
- Geosid item-sacrifice & portaling system
- Merchants (bazaar, geosid, storage)
- Design & Implementation w/ Editor...this is where all the content gets implemented and the world is built.

I think the most immediately important thing is to get monsters alive, interacting and dropping loot. Since most of the melee stuff is implemented, the next most important thing would be to get the merchants back online (this is prerequisite for the geosid system). Finally, filling out the rest of the spells, finishing up the design and implementing all the content with the editor, and taking care of the miscellaneous stuff (like logging server data).

Ah! Here's a breakthough--I think I just figured out how to do the geosid portals: give players a "spell" that allows them to use geonite to create a portal. The different levels of spell are only available when they can be used--i.e. near a geosid with a portal configured for that amount of geonite--and when the player is both high enough level to have that spell and has enough geonite.

For example, players get a Geosid Portal I spell at level 1. The description indicates "Use this ability to have a nearby Geosid consume 10 of your Geonite and create a portal to another nearby Geosid. This ability is not strong enough to move you beyond the Chaos."

Geosid Portal II, a higher-level ability (say 10) could say "Use this ability to have a nearby Geosid create a portal. This consumes 1000 Geonite ." As you gain more levels, you can consume ever more geonite creating portals to more remote areas.


Ok, well that makes me feel better. I can implement that. First, though, I need to solve the monster problem. The basic melee monster is in the editor, but doesn't attack. That's first on my list to fix.


-

So I had to backtrack a bit. I noticed monsters weren't disappearing from the client when they died, so I fixed that first. There is no need now for a destroy-actor message, since all clients will remove an actor from the world at a maximum of 300 + lag milliseconds (max ~500), which is short enough that players shouldn't even notice. Instead of basing it purely on a time delay, it is now based on a sync--this has the added benefit of not nuking all of a client's on-screen data just because their network had a lag spike.

Wednesday, August 5, 2009

Lights, Camera, ... months of work... action?

Since my last post, many new systems have been implemented and we're on the final stretch before pre-beta release. The design side of things has been particularly challenging lately, since we don't really know how these numbers are going to behave once we get them in-game. I'm starting to have a nagging feeling that our damages are too high, but I think we can remedy our situation simply by stretching everything to give us a buffer. Once all of our equations are set, slash damage in half, reduce xp to 25% of what we think it should be, make armor half as good as it is supposed to be, and so on.


For the record, here's what happened since my last post (simply copied from the pre-beta document):
Triggers
Display zone names & zone effects (background sound)
Display player names, player name toggle
Item attachment points - preview in editor
Arena - no PK consequences created "zone rules"
Attach VisualFX to actor type no support for attaching to anything other than feet currently; also, might not look right when geonans die (effect might stay vertical) -Karlgluck 7/22/09 5:50 PM
Special FX bindings - be sure hidden scenery bindings are hidden
framework
implementation
tools
compilation
Mouse-over-actor
Equip Items
Make client actor manager detect swimming/wading/falling/visibility correctly
All equations
HP, MP
Movement Speed, Action Speed
Alignment
Melee Damage/Defense, Spell Damage/Defense
EXP: from party, xp to level, xp from monster
Pits & falling into them
Melee System
Fix client-server request interaction
swimming
Event System
Framework
projectile
targeted special effect
manager

Create "projectile" that compiles an event, embed object for ranged weapons
resulted in necessity of extracting old projectiles -> magic -> spells...
dynamic event compiler
Integrate framework & types into editor
this actually became unnecessary! all types that require events actually contain the events themselves, and integrate them using the dynamic compiler
Add preview dialog
since the types are dynamic, any preview dialog would have to be container-specific; for example, a preview dialog for ranged weapons, one for spells, etc. so this is unnecessary work

Enable compilation of events
Enable compilation of projectiles in server item description
Integrate event framework into client
acquireResources
disable old projectile/magicfx/magic/spells code
done by assigning 0 to number of array entries in each, assert(false) in loader

benchmark test: do server and client start up and work normally?
passed!!!

create network messages for projectile event management
create projectile event
destroy event

pass messages client-side to the event framework
enable ranged weapon combat on the server
client to send create projectile/destroy event packets
detect ranged weapon in processAttackRequest
updateRangedAttack
processProjectiles
add 'range' to item description
remove old scenery renderer from client

Goal: finished on Thursday, July 30
Test: ability to kill monsters with shots from ranged weapons
Completed: 3:00 PM

extra time spent applying new combat profiles, including swimming profile, and debugging the event framework; all item types are now in the game and should compile into their specializations correctly (added: crossbow, javelin, thrown and spear)
Magic System - I
finish framework outline
integrate types into editor
shared/magic
shared/magic/tools

write header for dynamic compiler for magic
add spells framework:
mp cost, listed in classes, casting action, CONTAIN magic
action delay is specified by magic, not by spell--this lets spells' delay go down noticeably at a level-threshold if that is appropriate for a given magic (beam, for ex)

shared/spell
shared/spell/tools

write tool actions
complete-editor/spell/spellactions
complete-editor/magic/magicactions

write source file for Tools::MagicCompiler
compile types
magic list for server
spells list for client & server

load spell list in client
get rid of old spell descriptions
load magic & spells in server
game-file manager

processCastRequest
updateUsingMagic

Goal: finished on Friday, July 31
Test: can kill a monster using direct-damage flame attack
Completed: July 31 at 11 pm
remove old projectile/magicfx/magic/spells/enchantments code
sanity check: can 2 players still see each other online? yep, looks good so far

code cleanup - clean out all old stuff that has been replaced so far

Magic System - II
direct damage
validate distance before applying damage

AOE spells
handle request type
fix parameters in editor
packet event types (p->p, p->l, l->l, l->l+p, p->l+p)
updateUsingMagic

create spell of each type in editor & recompile (save creating & recompiling multiple times later!)
had to change the avatar spells to make referencing work correctly
instead of creating each by hand, write "create spell of each type" method

after recompiling, I noticed that I had to fix the spell availability mask update code
AOE spells work!
teleport
projectiles
handle request type
updateUsingMagic

portals
processCastRequest
incrementMagicStage
advancePortals

add chaos effects to opening a portal to an invalid map
write code for raytrace-validating teleports (needed for dimension doors)

fix portal description in editor
rebuild (fix syntax errors), compile new game file with editor
test: dimension door - passed!
mark system
set via text ("mark1" thru "mark0"), handle in Client netmsg
test: self port to mark 1 - passed!
give maps a hashed unique ID
save marks to database on logout
load marks from database at login

invalid map -> chaos
spin attack
editor type
processCastRequest
incrementMagicStage

recompile & test
remove radius from spin attack (it's taken from the weapon)
attack run
editor type
processCastRequest
incrementMagicStage - (shouldn't get here--assert!)
updateAttackRun
recompile & test

leap
editor type
processCastRequest
incrementMagicStage - (shouldn't get here--assert!)

updateAttackRun
update client to move character vertically when leaping
recompile & test
heal
editor type
processCastRequest
incrementMagicStage
cure
remove from -hp regen
its just a buff

buff
configurable buff icons in editor
mutations (including flying, levitating)
enchantment - armor
make enchantments show up in character descriptions
enchantment - shield
enchantment - reactive healing
enchantment - thorns
add # limit to all AOEs (bow-spin included)
separate threshold levels

DOT/AOE cloud
aoe-buff
dot-aoe-buff
branching
summon
trap - dimension door
trap - black hole
disenchant
invisibility



Notes along the way:
- terrain blending rules aren't compiled!
need jumping animation

Swimming/javelin profiles
Add javelin & other ranged weapons to item types
Need to fix the swimming profile so that it is applied at first entrance to the water (instead of after first action)

Quite a lot, in other words! I broke off from doing the spells today in favor of implementing the treasure system. Although I haven't created the editing utility yet...it's quite a pain to design...the limited testing I've done indicates that the categorized weighting system works quite well.

We're going to make it!