Tuesday, May 4, 2010

Skill Tree Initial Work

So one of the primary goals for this iteration was a skill tree. I love games with an in depth set of skills to choose from. Whether strategy games, or RPGs, having a long tree to climb with choices and tradeoffs brings a richness that I enjoy.

I'm far from there yet, but here is what I have so far...


It's a "field" of nodes, read from a file. Each one is associated with a skill read from xml. It currently doesn't do anything yet, but the idea is that as the player levels, they will get skill points, to spend in the tree.  

In the future, it will be a tree (or more accurately, a forest), with dependency information. Some nodes will give new abilities, other improve existing ones. There will different trees for each spell school, and most likely a tree for "martial" skills like weapons/armor/etc.

An idea I've been kicking around is making the cost of nodes dependent on the number of nodes you already have filled in on a given tree, and inversely dependent on the number of nodes filled in on the opposition tree. For example, every node you fill in on the fire tree makes other fire skills cheaper, but adding water nodes makes fire nodes more expensive. That way, we make dipping into opposing schools more difficult but not impossible.

I have a lot of work to go, but I'm excited about the concepts and what I have implemented so far. Any thoughts?

3 comments:

jice said...

I like skill trees very much too :)
I'm not sure the balancing mechanism is necessary though. Keeping the player from using skills from different schools of magic might limit the gameplay and the depth of the game. Such mechanism should only be applied to fix a balance issue, not before.

Computing the graph for a proper display is tricky too (except if the graph is hardcoded). It took me some time to get it work properly in pyromancer!. Not sure this is of any use for you, but the graph computing code is there, in the render function :
http://doryen.eptalys.net/svn-pyromancer/src/powerup.cpp
It's quite lost in the bloat though...

Anyway, I'm looking forward to the next release ;)

donblas said...

I hate to say I'm punting on the proper graph part for awhile, but I am.

I have a hard coded file that lists node positions and lines between nodes. The dependencies will also be hard coded instead of calculated for awhile.

fu said...

Sounds like a good plan of make it work first, worry about making the underlying bits afterwards when you've run out of new features to add. :)

Moreso than balance I think making the choices interesting is important for player fun. Enabling players to achieve all results with a single character ultimately damages the experience in many ways I think.