G
Guest
Guest
Archived from groups: rec.games.roguelike.development (More info?)
I've been looking at the source code to IVAN for the past 30 minutes. IVAN
is a RL written in C++ and which is more object-oriented than some other RL
code that I have read.
IVAN uses an array of "lsquare" objects to represent the map. These lsquares
have about 20-30 different fields and at least 150 different functions
handling everything from lighting to the handling of spells.
I'm thinking about switching to the "every tile is an object" methodolgy
myself. Currently my tile map just stores an array of tile structs; and a
tile struct is the index of the ground tile at this square, and a pointer to
an ArrayList holding anything that might be occupying the tile. I'm thinking
that the every-tile-an-object idea would make it easier to keep my code
object-oriented and it would also make it easier to keep track of the
properties of different tiles.
But it seems like the IVAN design takes things a little too far... I mean,
spell-handling logic in the map tile object?
What do you guys think?
--
Blog:
Shedletsky's Bits: A Random Walk Through Manifold Space
http://www.stanford.edu/~jjshed/blog
I've been looking at the source code to IVAN for the past 30 minutes. IVAN
is a RL written in C++ and which is more object-oriented than some other RL
code that I have read.
IVAN uses an array of "lsquare" objects to represent the map. These lsquares
have about 20-30 different fields and at least 150 different functions
handling everything from lighting to the handling of spells.
I'm thinking about switching to the "every tile is an object" methodolgy
myself. Currently my tile map just stores an array of tile structs; and a
tile struct is the index of the ground tile at this square, and a pointer to
an ArrayList holding anything that might be occupying the tile. I'm thinking
that the every-tile-an-object idea would make it easier to keep my code
object-oriented and it would also make it easier to keep track of the
properties of different tiles.
But it seems like the IVAN design takes things a little too far... I mean,
spell-handling logic in the map tile object?
What do you guys think?
--
Blog:
Shedletsky's Bits: A Random Walk Through Manifold Space
http://www.stanford.edu/~jjshed/blog