Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] Re: PATCH: Advanced City Name Generation (version 2)
Home

[Freeciv-Dev] Re: PATCH: Advanced City Name Generation (version 2)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Erik Sigra <sigra@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: PATCH: Advanced City Name Generation (version 2)
From: Tuomas Airaksinen <tuma@xxxxxxxxxxxx>
Date: Wed, 31 Jan 2001 15:34:31 +0200
Reply-to: tuomas.airaksinen@xxxxxxxxxx

On Tue, Jan 30, 2001 at 09:28:47PM +0100, Erik Sigra wrote:
> måndagen den 29 januari 2001 22:43 skrev Erik Sigra:
> > Hi,
> > The patch yesterday was the proof of concept. With this patch, city name
> > generation will work just as great as with the last one, but the code is
> > cleaner. I removed unneeded stuff, fixed the copyright notices (I hope),
> > and optimized memory usage. Now a namer is loaded from a file to memory
> > only when a client requests a city name suggestion from that namer.
> 
> I discovered a serious bug in the patch. When you have requested all the 
> names in a random namer, you should get the suggestion "? no more names?", 
> but instead, the servers enters a long loop and eventually returns the 
> suggestion "" to the client.
> 
> I spent a few hours searching for the problem and finally found it. The 
> problem is that the random functions work different in Freeciv than in Xconq, 
> which makes porting stuff problematic; Xconq's xrandom(0) returns 0, while 
> Freeciv's myrand(0) returns a random number up to Integer'Last. This random 
> number is then the number of iterations the server will spend in the long 
> loop.
> 
> I have fixed the bug, but I need to verify all uses of myrand. Expect a fix 
> tomorrow evening.

I even downloaded your patch but didn't get to testing. I'll test tonight.
So I don't know anything yet, but one big thing that comes to my mind is
that it has to be optional fetarue CLIENT-SIDE, so that user can select
whether he want generated or real city names.

Otherwise, this is just good.. best thing is has been taken from xconq and
not written ourself.

-- 
Terveisin   Tuomas Airaksinen        linux
Kotisivu:   http://tuma.cjb.net/      is all   
Sähköposti: tuma@xxxxxxxxxxxx          we   
Icq:        11870110, IRCnet: tuma      need 

Attachment: pgpywR9My5wK5.pgp
Description: PGP signature


[Prev in Thread] Current Thread [Next in Thread]