[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: field.c todo



Mike Ciul wrote:
} 
} Rob- how different is the Adept field? Would it be possible for one hunk
} of code to handle Archon and Adept field play? I don't know if field.c is
} flexible enough right now, but if we're going to start tearing into it,
} flexibility would be a good goal.

It's different, but it could concevably be handled by the same chunk of
code.  Depending on which elemental realm the combat occurs in, the effect
of the obstacles on the players and their bullets changes:

    realm	player	bullet
    -----	------	------
    earth	stop	block
    air		slow	deflect 45 degrees
    fire	damage	no effect
    water	slow	slow
    void	there are no obstacles in the void

These different behaviours could be fairly easily done in one piece of
code, by say having pointers to functions for the effect of a
player/obstacle or bullet/obstacle collision which is set appropriately by
the code which generates/initialises the field.

There's another difference which I suspect will require some additional
work to do cleanly; the obstacles in Adept don't cycle on and off like they
do in Archon - they're constant.  A simple fix would be to return from
field_lumi_cycle immedately if in "Adept mode" (or not call it in the first
place).  I feel a better way would be for the theme file to specify the
behaviour of player/rock and bullet/rock collisions, on a per-frame basis,
as well as the frames of the animation.  Then there wouldn't have to be any
specific code in field.c for a rock luminance cycle - you'd plonk the rocks
down at a random frame of their animation, and they'd just animate and
change behaviour over time.  Such a solution would also address the issue
of differing elemental obstacles, too, since the theme file could specify
the appropriate behaviour.

However, since I haven't done any xarchon coding in a while, and probably
won't in the near future, maybe stick with the simple solution until I get
off my rear end and start doing Adept properly :)

							Have fun,
							 Rob R.
							  \((/
							  ~oo~
							  /))\