Hokay so it’s tomorrow, but I haven’t gotten much more thought on the Action issue.
Here’s how it works in my head. The player chooses an action, and that action is added to the timeline, so that when the duration of the action is up, the action will be completed and the player will be prompted to take another action. During that time, other things will also be taking actions, and sometimes they need to interrupt what the player is doing.
The timeline is basically an ordered list of actions like get thing, approach thing, or rest. In certain situations, an action will interrupt the action of another mobile. If something dangerous appears, it’ll interrupt your rest. But, you still had some rest, or you still walked a certain distance. For non-instant actions, I have to consider how far you got before you were interrupted.
I think that if I include a ‘Current Action’ property in the Thing class, it’ll allow me to have a link to the specific Action that any Thing is doing. That way when another Thing’s Action interrupts this Thing’s Action, I can determine how far along the Action was, and correct things.
One problem I’ve got is interception. Suppose there’s a guy walking across a field, and you approach him. You’re not approaching the spot he was, you’re approaching him, so your movement gets pretty complicated, probably some sort of arc. I’m going to have to do some pretty serious math, I think. ^.^;;
Anyways, for any non-player Thing, the Behavior function is run when they finish an action, or when they’re Interrupted, and that function is given the same list of possible Actions that the Player would be, and they select their next Action from the list.
Alright I think I’ve done too much thinking and worrying about this. I’m going to code it, and if it doesn’t work I’ll fix it.
*work work work*
I was thinking of measuring the player’s strength as a quantity of Newtons, or the amount of force they’re able to apply. I have no idea how I’d quantify that for Agility or Endurance though, so instead I’ll use the D20 method. 10 is an average person’s strength, agility, and endurance.
*work work work*
Okay that gives me the basic data classes.
*work work work work work*
Okay! Now I’m going to make the first edition of the actual TextWorld class. And since this is Flash, I’m going to just go ahead and make the TextWorld hold the graphics and do the processing both.
Hokay it’s been a while, but as I recall I’m going to have four textField objects. What shall they be called? Oh, oh yeah, I made that scrollbar thing, so I have to make the scrollbars, and then put the TextFields in them.
Aww buggery some guy is chatting me up, so I’ve completely lost my groove. I’ve got to go home after he’s done. But, progress!