Monday, June 1, 2009

22 Quests

Questing is going GREAT!  I've coded all the behavioral stuff into the NPC (the different phrases) and I'm about to test him out.  Gotta recompile because I added another phrase, though:  accepted quest but can't pay.

Here's my list for today:
  1. Test NPC dialogue for various situations with hard-coded quest parameters (half an hour)
  2. Implement quest proposal display on client with accept/decline buttons (1 hour)
  3. Write quest interaction code that checks to see if you qualify for a quest, have completed a quest, etc
  4. Save questing data between sessions and ensure consistency
6 pm already?!?!?!!?!?!!?
Well that was crazy, I woke up at 7...had some food...took a shower...wrote this post around 8:30 and started coding.  I forgot lunch, whoops!  I guess that's what happens when you're having a BLAST doing something you're really interested in.  Quick accomplishment list then I'm going to work out:
  1. NPCs speak to the player and can have very long phrases that don't interfere with one-another.  Situation:  two players both trigger an NPC to say a different set of phrases at the same time.  Whose phrases win?  Well, in this system BOTH do!  The NPC sends out the entire phrase at once to all clients when it is generated, along with the actor to whom he is speaking.  If a client realizes that the NPC is speaking to its avatar, it will lock the NPC's speech as "persistent" and only display that NPC's phrases, even if the NPC is triggered to say something else by another client.  This also makes it so that the client is entirely responsible for rolling through the NPC's spoken phrases, which takes a lot of burden off of the server.
    REALIZATION: This is why I love this blog!  I just realized that because of this system I don't even have to sprintf the actor's names into the spoken text anymore, I can just leave the %'s and do a straight-up send on the text!  Since the clients know which actor is being spoken to, they know that actor's name implicitly!!!!!!  (minus the no-name bug....guess I'm gonna have to fix that one before quests go out)
  2. The quest accept/decline panel works great
  3. All methods for quest states are stubbed out
ten
phew, I've implemented the prerequisite method stubs.  tomorrow i should be able to do more coding, then actually be able to try out a quest or two!  Wednesday looks good for release =D

No comments: