Goal oriented gameplay (was: generators, triggers and aiming)
uekstrom at gmail.com
Mon Jan 10 16:42:39 EST 2005
> Here's the new TODO list with updated generator, trigger and aim syntax.
> * Make everything in Airstrike an object: ai, trigger, generator etc.
I am working on this now. I suggest we do not implement generators etc
work is done (maybe tonight).
> * Add types to objects:
> - Member for the object type
> - Parent link that points to parent object type
> - Helper function that traverses the type tree to root and checks
> whether object or it's parent type had requested type
I have checked in my solution to this to src/core/object.[ch]. It's
not used anywhere
yet though. I solved the typechecking with the function
void *obj_ref(void *object, object_type_t *assumed_type);
which must be used to take a reference to an object. This function may check if
the object is of the assumed type (or inherits from that type).
> * Note: Sprite capabilities and attribute checks are handled with
> messages (e.g. MSG_IS_WALKING). This is needed by triggers
We could also use the (currently underused) enum sprite_flags field
of each sprite. Currently it has only one bit used.
SPRITE_PAUSED = 1, /* animation is paused, movement is still allowed */
> * Add to object type struct counters for how many objects (sprites) of the
> given type have been created and killed (live = created - killed).
> - Modify these counters when objects are created/killed
This will be automatic with the new object system.
> - Add clearing of these stats to and call that on level load or unload.
This we will have to implement, although it should be really simple to
do in objects.c.
[snipped a lot of items]
> I think this will be fairly straightforward to do with the new object
> system, but it will require quite a lot of work...
yeah, you are right. But it's doable.
More information about the airstrike