G
Guest
Guest
Archived from groups: rec.games.roguelike.development (More info?)
I'm currently trying to write item code in my game and I wonder how to
make items group. I see two ways to do this:
* Items would be grouped in code by adding "item count" property to
class. This would be very convenient way but would need adding some
spreaded code. One item object, which can represent many items, is bound
to one letter.
* They will be grouped only in players eyes. Program scans the list of
items to count how many of them are with the same properties and then
display list. This way is slow, but it will probably need only one big
algoritm. One letter is bound to one item too, but if this item is
dropped/changed/destroyed the letter must be bound to another item.
--
Milesss
m i l e s s s @ i n t e r i a . p l
www.milesss.mylog.pl
"/0"
I'm currently trying to write item code in my game and I wonder how to
make items group. I see two ways to do this:
* Items would be grouped in code by adding "item count" property to
class. This would be very convenient way but would need adding some
spreaded code. One item object, which can represent many items, is bound
to one letter.
* They will be grouped only in players eyes. Program scans the list of
items to count how many of them are with the same properties and then
display list. This way is slow, but it will probably need only one big
algoritm. One letter is bound to one item too, but if this item is
dropped/changed/destroyed the letter must be bound to another item.
--
Milesss
m i l e s s s @ i n t e r i a . p l
www.milesss.mylog.pl
"/0"