Sunday, June 11, 2006

Game Info: Progress

I have been working on item object interactivity for the past week: picking stuff up, dropping stuff, wearing, removing, wielding, unwielding, putting stuff in containers, removing stuff from containers, moving the container and all its contained objects, etc. While I realize there are already some libraries out there to work off, I've decided to code everything from the ground up. My approach is a little different that what has already been shared. (It may be less efficient, too, but I've yet to do a direct comparison.) I'd like all game information (inventory, objects in rooms, etc.) to be presented as text in the main game window. This means coding out the panes, and creating my own disambiguation menu for referenced objects of similar names.

I've also been paying attention to the NPC model, which I've made the PC a member of. The idea is to treat NPC's in the exact same manner as the PC, or vice versa, so that NPC's are capable of doing everything the PC is capable of doing, and in the same manner. For example, an NPC can attack or talk to another NPC; they can pick up objects and interact with them; they can respond to actions (react); they can make their own decisions based on needs and schedules. They do all this with the same procedures and functions that the PC uses. This means that the relevant code sections must be built to suit artificially intelligent objects as well as the PC. Fun stuff. And surprisingly easy with ASL. Yes, there are limitations, but that just changes your model. So far, anything that I've set out to accomplish has proved possible.

For instance, I thought the syntax

#(object):property#

was severely limited because, although I could reference the object as a variable, I could not do so with the property. As it turns out,

$objectproperty(#object#; #property#)$

solves this, and is immensely useful.

If anyone would like to look at some code for my particular method of item object interactions, just let me know. I'll post it per request. By the way, the startscipt code has been updated to text instead of an image.

0 Comments:

Post a Comment

<< Home