Re: Maps & Memory
- From: corremn <corremn@xxxxxxxxx>
- Date: Fri, 26 Jun 2009 03:35:16 -0700 (PDT)
On Jun 26, 6:15 pm, BirdofPrey <birdofprey...@xxxxxxxxx> wrote:
In my in-dev roguelike, I'm planning to allow for various events to
happen on other maps, from simple things like a timed explosive going
off even if you've moved to another floor, to creatures following you
up and down stairs and setting ambushes for you on the next floor. The
way my code is set up right now, all maps are kept in active memory
all the time.
My question is, is it acceptable to keep all those maps active at
once? I COULD make the game keep track of which maps are necessary to
keep open that loads maps when they're needed and saves them when
they're not, but I'd like to avoid all that work if it's not strictly
necessary. Am I likely to see some slowdown on the later floors when
many maps are in memory? Each game will have 30-40 separate maps at
most. What do you think?
Computers have lots of memory nowadays, however if you see that you
are using to much memory, then you are probably being inefficient.
Look at Incursion for a bad example of this. As you get to the bottom
it can really slow down.
I'd say keep then active, you probably dont want to be running AI on
all your maps at all time though, so make sure you can mark you maps
as inactive, if no processing is needed. Or alternatively mark
objects on a map as active as process them.
Saving inactive maps should be fast and efficient also.
.
- Follow-Ups:
- Re: Maps & Memory
- From: BirdofPrey
- Re: Maps & Memory
- References:
- Maps & Memory
- From: BirdofPrey
- Maps & Memory
- Prev by Date: Re: Maps & Memory
- Next by Date: Re: Newbie question on basic C++ design
- Previous by thread: Re: Maps & Memory
- Next by thread: Re: Maps & Memory
- Index(es):
Relevant Pages
|
Loading