Re: Where to start?
- From: jice <jice.nospam@xxxxxxxxx>
- Date: Tue, 12 Feb 2008 04:52:11 -0800 (PST)
On 12 fév, 11:55, "Ulf Åström" <ulf.ast...@xxxxxxxxx> wrote:
On 12 Feb, 11:29, jice <jice.nos...@xxxxxxxxx> wrote:
If the crash can be reproduced, this is not an issue. A crash occuring
I think the fundamental difference is that I'm trying to prevent
crashes from occuring at all. As player, I'd rather see feature X not
working than losing a promising character because of a crash. As
developer, it's much more useful to get a "feature X doesn't work" bug
report than "my game crashes randomly".
Ok, I'm kind of intentionally playing devil's advocate here. I'm not
saying that I'm right and you're wrong. I think both approachs are
viable. Of course, the less crashes you have, the better it is and if
you can avoid some of them by pre-conditions, it's ok. But avoiding
blindly the crashes everywhere will make it very difficult to find the
nasty bugs. I'm speaking about this kind of error handling code :
void my_func (params) {
if (crash condition meet) return; // do nothing
... // do something
}
This will take you to the hell of debugging because you may never
notice that there was something wrong during this function call and
the first visible impact may lead you to the wrong track. IMHO, the
proper handling of an unexpected crash condition would be :
void my_func (params) {
if (crash condition meet) {
// log error and everything needed to track its cause
exit(1);
}
... // do something
}
The exit() is very important because it will allow to correlate the
player's last action/situation to the error. If you only write a log
and keep running the game :
- the player may never notice the error
- he may notice it much later in the game and may not be able to find
out what was its cause.
To finish, I think our two approachs follow two distinct goals :
- either you add lots of controls in the code so that the game never
crashes whatever bugs it contains. This will smooth the player
experience, but your code will be more complicated and some bugs will
be difficult to fix without a very advanced logging system.
- either you let the bugs crash or stop the game. This will be very
painful for the player if you don't do enough testing before
releasing, but eventually, bugs will be corrected faster (and the code
is simpler) (and you need electric fence to use this approach) :)
--
jice
.
- Follow-Ups:
- Re: Where to start?
- From: Ulf Åström
- Re: Where to start?
- From: Jeff Lait
- Re: Where to start?
- From: Gerry Quinn
- Re: Where to start?
- References:
- Where to start?
- From: addcombatinenvy
- Re: Where to start?
- From: Ulf Åström
- Re: Where to start?
- From: poorchava
- Re: Where to start?
- From: Ulf Åström
- Re: Where to start?
- From: jice
- Re: Where to start?
- From: Ulf Åström
- Re: Where to start?
- From: jice
- Re: Where to start?
- From: Ulf Åström
- Where to start?
- Prev by Date: Re: Stevey and overengineering
- Next by Date: Re: Stevey and overengineering
- Previous by thread: Re: Where to start?
- Next by thread: Re: Where to start?
- Index(es):
Relevant Pages
|