Even so it’s fun

Spent the morning writing more combat code, functions to retrieve actions and check validity of actions and so forth.  Error-checking is taking up about half the time with this, but it’s important to have (if it wasn’t there then a player could potentially submit a fake ‘post’ and take any action they pleased, if they figured out the id for that action).  My extensive design notes have saved a lot of time–it’s always a lot faster when you know what you’re supposed to be coding–and helped avoid at least one rather sticky situation.  Especially for something like a combat system, it really is very important indeed to have it all worked out before you start coding, unless it’s a very, very basic one.  With mine there’s quite a bit of complexity so without design notes I would’ve gotten stuck at least half a dozen times already.  As it stands it’s been fairly straightforward, it just takes a lot of time to implement everything.  In any case, it’s up to ‘phase 4′ now, which means the player can encounter a monster (and everything gets generated and stored properly), the monster will perform a ‘pre-action’, the player is presented with a list of actions (sorted by the item or lack-of-item that enables said actions) and can choose one, then the code grabs all the relevant stats for that action and adds the stats for the item it’s performed with (and does something similar with the monster; rolls up a random action based on their pre-action, grabs the stats for the action and adds the monster’s stats to it) and puts it into a nice tidy little array, ready to work with.

Next is the actual ‘combat’ part of the combat system–hit and damage resolution.  This is where things might get a little messy, so I have to be extra-careful to make sure things progress cleanly and clearly.

Advertisement
Published in: on March 10, 2009 at 00:21  Leave a Comment  
Tags:

The URI to TrackBack this entry is: http://shaid.wordpress.com/2009/03/10/even-so-its-fun/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.