Closed GoogleCodeExporter closed 9 years ago
MapSquare
-Relative Location (Memory)
-Absolute Location (World Map)
-Number (as in SquareNumber)
-Address (duh)
+Tile
-Id (Of the tile)
-Number (Again, for the possibility to just look for certain tiles rather than all
the objects. When found create a MapSquare of it)
+List<Object>
-Id (Of the object)
-Data (Such as ID of player)
-Extra data (It has this for something)
-Number (Being able to get a list of objects. Like if it can find 5 holes, we'd want
it to return 5 objects with what number the Square is, then we can count from
there)
For the developer, it should look something like this. Obviously the naming may
change.
map.GetSquaresWithTile(FishTiles)
Internally, it scans through the current floor. For tiles containing fish, then
returning a bunch of mapsquares with all data needed. Meaning he can just use
Fish(tile1.GLocation);
map.GetSquareWithObject(99,player.ID)
Will get a list of all the tiles with creatures on em, then find the one that
has
this specific id. The return should be a mapsquare with everything in it.
map.GetSquaresWithObject(386, true)
Gets all the ropespots on the current floor. Returns a list of Squares that the
player can rope up at, then the developer can get the closest one himself.
The easiest way is probably to just get the number of the MapSquare, then make
all
the calculations from there in one specific function. Will ease the coding
aswell.
Original comment by hugo.per...@gmail.com
on 25 Aug 2008 at 11:53
That's really good organizing and I like it. Recommended by me!
Original comment by Oskari.V...@gmail.com
on 26 Aug 2008 at 12:11
What do you think about renaming the location types to MemoryLocation and
WorldLocation?
Original comment by ian320
on 1 Sep 2008 at 2:08
I completely rewrote Map from the ground up, most of these should be fixed in
r402.
NOTE: Needs extensive testing! (change to Verified after testing)
Original comment by ian320
on 1 Sep 2008 at 6:27
Original issue reported on code.google.com by
hugo.per...@gmail.com
on 25 Aug 2008 at 11:22