[rfk-dev] updates

Jeremy Penner jeremy at sporktania.com
Thu Sep 1 16:35:05 CDT 2005


Peter A. H. Peterson wrote:
> I would *really* like to hear from some of the C hackers on this list
> what they think about the new rewrite by Alexy versus the old POSIX
> implementation. I'll put my K&R book under my pillow tonight and maybe
> by the morning I'll have become a C whiz via osmosis.

Positives:
Its handling of collision detection (Is it an NKI?  Kitten?  etc.) is 
nice.  No more giant, mostly-empty array.  I like it.  Supposedly it 
handles screen resizing, but I don't know if the NKIs move around too, 
then.  Obviously, it has the super-special bonus feature of loading NKIs 
from a file; it also randomizes them as it goes along, rather than 
trying to generate non-colliding NKI indexes for all of the bogus objects.

Negatives:
screen_objects should really be passed around by reference rather than 
value; it'd let you implement a proper screen_object_move function, for 
one thing.  (The original failed to do this, too.)  The way NKIs are 
randomized precludes you from playing more than one game without 
reloading the file.  The file loading routine is kind of ugly, in that 
it's constantly freeing and mallocing a buffer, assumes UNIX line 
breaks, and doesn't deal well with NKIs over 160 (IIRC) characters long.

I haven't actually compiled and played it, and so I'm not acutely aware 
of nitpicky inaccuracies with the presentation (though I do know that 
robot always approaches kitten from the same direction -- an important 
regression to beware of!).  I'm pretty sure it won't explode or 
anything, and it's better than the original POSIX implementation.  It 
could benefit from some more polishing, though, if we're concerned about 
code cleanliness.

Jeremy
-- 
Jeremy Penner				http://www.sporktania.com



More information about the rfk-dev mailing list