Friday, February 12, 2010

How much is too much?

One question that always comes up when working on a game is how much information to store. Do you store everything that's running in the game at once? Do you only store some minimal information about the game, like accomplishments?

In tinygame, I'm attempting, at first, to store and run *all* content on all maps simultaniously. I've only got a half-dozen maps running right now, and they're not even connected in the complex way I want them to be eventually connected, but I'm running all the content on all the floors and calculating everything at once.

Which means I have to be very careful how many monsters I let spawn on each map, the size of maps and so on.

I've touched on the game recently (no, really, I do work on this thing!) and I've decided that about eight monsters per spawn point is a good starting value. Eight monsters per flor, plus the player, and... well, it can get a little processor intensive.

One way I've premtively attempted to divert some of the processor chug is to break the game down into running at different frames per different things. Things like the player run a few times per second, most spawn points run once every three seconds, monsters act every one or two seconds. This has a umber of immediate effects. First, the player has the advantage over all monsters that he can act several times faster than them. They'll still chase him, but he can outrun them, he can outfght them, and so on. A clever player could fight a powerful monster and win without damage by moving at the right times. Secondly, it means not everythinbg in the world needs to be calculated at the same time. If there are ten thousand monsters, they migt be broken up between a hundred cycles of processor, which is a hundred monsters a cycle, and while it might become slow is still a huge advantage over ten thousand in the same time frame - and only a very minor change in the game play.

What do you all think? Anyone who'se out there?

No comments:

Post a Comment