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

should field provide utilities for computer?



I have a question.

Should I provide some utility functions in field.h for computer.c to use?

That would include making field_rock_collision public, maybe also field_weapon_collision, and moving computer_field_direction to field_direction.

Advantage: less duplication of code, since computer and field both need this kind of information.

Disadvantage: less modular in the sense that field is sharing information with the computer player. I think it's ok, since it's not actually sharing data structures, but I wanted others' opinions.

The reason this is coming up is because I've started thinking about how to do the rock-bouncing I mentioned earlier. That would require the same tests that computer_field_direction does.

Also, computer_field_hit_obstacle is the kludgiest of the field AI functions. I might be able to clean it up by letting field.c do some of the collision tests.

- Mike
-- 

This message comes to you from GVOX, pioneering Immersive Music(tm)
experiences -- the Next Generation of Music Entertainment
(http://www.gvox.com) and Education (http://www.notationstation.net)

Mike Ciul
GVOX Interactive Music
1080 N. Delaware Ave. 8th Floor
Philadelphia, PA 19125
Voice: (215) 922-0880 Ext.: 144 Fax: (215) 922-7230