[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to continue
From: |
David Philippi |
Subject: |
Re: How to continue |
Date: |
Tue, 11 Jun 2002 16:49:01 +0200 |
User-agent: |
KMail/1.4.1 |
On Tuesday 11 June 2002 16:35, Ingo Ruhnke wrote:
> As long as the code works I don't (should not) rewrite it. Most of the
> time one can get away with rewriting parts of the interface.
??? If code is dirty, one should very well rewrite it. If you don't do it,
all those little hacks will add to a something which can't be parsed by
other developers anymore. Rewriting doesn't mean that you have to change
anything of the effect.
> In the end this isn't really an issue, copying an std::vector<> of a
> hundred pointers shouldn't really take that much time.
No, it really shouldn't. But if you make it to a rule not to waste
performance if you don't really gain anything, you will save quite a bit of
time otherwise spent with optimizing the code. I think it's always usefull
to think a few seconds about the performance of a particular solution - if
you don't find a better one at once, ignore it until you run into
performance problems.
> If one finished the level, none. If the time runs out, then the ones
> which are still around and not killed or exited.
I'm starting to understand the concept. There's a vector of all which is used
for garbage collection. The list of active pingus is only used for gameplay
but if a pingus get's out of it it isn't deleted, right?
> No. We currently have three main types of objects WorldObjs (exit,
> entrances, traps, etc.), Pingus and Particles. Both Pingus and
> particles are dynamic and get removed/added quite a bit, both of them
> already have there own manager class which handles allocation and
> deletion. The WorldObjs themself are currently static, they get
> created on level creation and get removed an level destruction. To
> keeping a second garbage list arround isn't necessary at the moment.
So the change would be to introduce a manager class like the ones for pingus
and particles so that there's no need to use shared_ptr<> ? Or rather just a
static list which contains every element to be deleted at level end.
Bye David
- How to continue, David Philippi, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, Ingo Ruhnke, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, Ingo Ruhnke, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, Ingo Ruhnke, 2002/06/11
- Re: How to continue,
David Philippi <=
- Re: How to continue, Ingo Ruhnke, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, Ingo Ruhnke, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, Ingo Ruhnke, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, David Philippi, 2002/06/11
- Re: How to continue, Ingo Ruhnke, 2002/06/12
Re: How to continue, Ingo Ruhnke, 2002/06/11