Thursday, July 8, 2010

Potions Everywhere!

I got most of the command menu, inventory and item stuff in place. If there's going to be any hard to find bugs it will be with those so I'm testing them extensively before I move on.

As a stress test I added 10,000 potions to random positions on the map and didn't notice any slowdown. So I pushed it up to 1,000,000. Without placing any items this simply increased the time it takes to load the game significantly. Normally the game loads nigh instantaneously. Once the game loads it runs fine but makes the game use over a gig of system memory. If I actually place that many items...well I'm sure it would load eventually.

The total number of items on the map should never reach 10,000. To do that would require the maximum number of creatures to drop the maximum number of items in their inventory. For gameplay reasons I don't plan on allowing creatures to drop more than a handful of items when they die. Combined with items already randomly scattered on the map I estimate the most you'll ever see is around 2,000.

Of course there's nothing to stop the player from dropping that many items and I'm sure some will try. However it will start to look pretty ridiculous around the 100 mark when they start dumping items all on one tile.

I still have a few things to sort out with commands and inventory then I'm going to start laying the groundwork for save functionality.

No comments:

Post a Comment