[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: A patch



On 04.05.2007 19:15, haruspex wrote:
> Some questions.
> I intend to add some statistics at mission debriefing (like kills,
> advancements etc.). Is this needed at all?

Kills, casualties might be nice, although it can get pretty muddy,
e.g. when taking over enemy shops. So I'm not sure whether we can
actually come up with meaningful numbers. And of course you'd have
to modify the save file format which isn't so nice.
Advancements are pretty useless IMO.

> If yes: it seems I can't
> find which function exactly is used when a new game is started. What
> is it?

Depends a bit on what you want to do, but InitWindow::StartGame is
probably a good starting point.

> Another question: what will happen if a locale file misses some
> messages?

I cannot. The file needs at least (English) placeholders for
untranslated messages, or the game will simply discard it.

> (And, by the way: why all datafiles (locales, tilesets,
> unitsets etc.) are somehow compiled?)

Mainly for performance reasons and keeping error checking simple
in the game itself.

> > Nice in general. What I'd really like would be something like grayscaling
> > the unit instead of just using a full white overlay. Or maybe shading it?
> > Not sure. Lighter probably looks better, but it's hard to say without
> > actually seeing it.
> 
> I guess I haven't spent enough time adjusting the constants for the
> effect. The unit image was supposed to become gradually lighter and
> lighter, then be almost only a silhouette for some time and then turn
> back to normal state. Probably increasing time of the effect and
> reducing alpha value of the white layer should work.

Yes, might be the timing as well, though I suspect the plain white
is still part of the reason.

> > I'm wondering about the wait() function, though. What's the reason
> > you're not simply using SDL_Delay() there?
> 
> Perhaps it's an example of "code WTF" (: Quite tense time that I now
> have makes sometimes me overlook simple things... Just one question:
> do SDL_Delay() and SDL_GetTicks() use the same units of measurement?

Yes (milliseconds).

> > > MinGW.diff - a line I needed to compile with MinGW (not sure whether
> > > this applies to everyone, but maybe this could be of any use)
> >
> > Now this looks odd. Maybe there's some header where we could get that
> > define from instead of hardcoding it ourselves? I'd rather not start
> > duplicating the Windows system API...
> 
> I believe it is just some values which are for some reason not set by
> MinGW itself... Anyway, I don't insist on applying this patch. Only it
> might be helpful for someone some day, so let it be in the mailing
> list (:

I'd be surprised if this was set by the VC compiler, and not coming from
some header.

> > > turn.diff - units turn in the direction of their attack
> >
> > Not sure, either. It's a rather small thing, but it somehow feels odd
> > to me. Maybe it's just being used to units not turning, don't know.
> > Other opinions?
> 
> Right now it only affects graphical side of things, doesn't it? And
> for me it seemed odd that units manage to attack somebody behind their
> back (:

Well, if a tank had to turn before it could shoot at someone behind
it... Speaking of which, this behaviour is actually broken. Ever
thought of trains? ;-)

Jens