by rld » Tue Oct 16, 2012 10:41 am
So, the current design for the ACK engine allows objects to be stacked in room-type and worldmap-type regions as follows:
worldmap regions:
- 1 terrain item per tile
- any number of items/vehicles per tile
- up to 1 creature per tile
There seems to be a limit on the number of floating/movable items that can be in each world map. From the text export file, it looks like 255 total items/vehicles.
Room-type regions are similar except that they can stack any number of items in a space, terrain, items, whatever, even creatures, although a creature won't do anything on its turn unless it is the top 'item' on the stack.
There is a 'heap' of free spaces shared by all rooms in the region for stacked items, which allows you to put any number of items on a given tile should you want to for some reason (hundreds if you like), but there is a hard limit for the whole region of 2500 objects or so.
The thing I am wondering is, given the additional flexibility that macros offer in ACK, does it really make sense to have to be able to stack 20/30/40/50 items on a square? Does anyone ever do this in their adventures?
All the stacking mechanisms add a lot of complexity to the code - if there were just a fixed number of objects that could live in each location, it would take up a little more room in memory per tile, but it would be much simpler. And anyway, the whole ACK design assumes that you are only loading one room at a time into memory (for room regions), or a certain number of 16x16 'chunks' (for worldmap regions).
But what would a good limit be? Something in the 10-20 range sounds reasonable to me; even ACS (which had no macros at all) usually didn't stack more than a dozen or so things in a square at once.
If you had all the data stored together, it would be much easier and more predictable to do things like copy chunks of maps, save and restore states of rooms/areas, etc. on the fly.
So, the current design for the ACK engine allows objects to be stacked in room-type and worldmap-type regions as follows:
worldmap regions:
- 1 terrain item per tile
- any number of items/vehicles per tile
- up to 1 creature per tile
There seems to be a limit on the number of floating/movable items that can be in each world map. From the text export file, it looks like 255 total items/vehicles.
Room-type regions are similar except that they can stack any number of items in a space, terrain, items, whatever, even creatures, although a creature won't do anything on its turn unless it is the top 'item' on the stack.
There is a 'heap' of free spaces shared by all rooms in the region for stacked items, which allows you to put any number of items on a given tile should you want to for some reason (hundreds if you like), but there is a hard limit for the whole region of 2500 objects or so.
The thing I am wondering is, given the additional flexibility that macros offer in ACK, does it really make sense to have to be able to stack 20/30/40/50 items on a square? Does anyone ever do this in their adventures?
All the stacking mechanisms add a lot of complexity to the code - if there were just a fixed number of objects that could live in each location, it would take up a little more room in memory per tile, but it would be much simpler. And anyway, the whole ACK design assumes that you are only loading one room at a time into memory (for room regions), or a certain number of 16x16 'chunks' (for worldmap regions).
But what would a good limit be? Something in the 10-20 range sounds reasonable to me; even ACS (which had no macros at all) usually didn't stack more than a dozen or so things in a square at once.
If you had all the data stored together, it would be much easier and more predictable to do things like copy chunks of maps, save and restore states of rooms/areas, etc. on the fly.