Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coding advice please




  About my rune code.  I really feel it is done is somewhat
non-optimally.  Right now, the rune checks the square it is in every time
it moves (speed 1) to check and see if someone or something is stepping 
on it.

  It also uses it's move to decide whether it is going to be visible
this turn or not.

  Runes right now 'blink' on and off according to their charisma,
at random.  They are visible 2/charisma of the time, at random.
This was the best I could think of to conceal them without making
them totally invisible.

  This could make runes a bit more expensive than we really want
them to be.

  I've thought about using autoapply on runes, but I'm not sure if
that works for monsters--monsters must also detonate runes if they
step on one.  Can someone who knows a little about autoapply advise me
a bit?  I'd rather not hack the code to figure it out!

  Also, I'd welcome some suggestions on how to improve the rune mover.

It isn't TOO bad right now. It only checks to see if there's anything
in the square, so it is not as expensive as a monster.

  I don't think efficiency is too crucial, since no one would use
too many runes most likely anyway (monsters step on them quicker than
people generally will if you use them indiscriminately.)

  Should I worry about this or continue on with other projects and
worry about efficiency later, or do other experienced coders feel
this is good enough anyway?

Regards,

PeterM