Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: loading rulesets patch
Home

[Freeciv-Dev] Re: loading rulesets patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Cc: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: loading rulesets patch
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Mar 2002 10:00:32 -0600

I'm cc:ing freeciv-dev since somebody might have something interesting
to add...

On Sat, Mar 02, 2002 at 03:22:47PM +0100, Per I. Mathisen wrote:
> On Fri, 1 Mar 2002, Mike Kaufman wrote:
> > > I disagree. That would make it a totally different patch. You see,
> > > we just can't reload rulesets at the moment. The ruleset loading code is
> > > full of mallocs and stuff that doesn't ever get cleaned up. So if we
> > > reload, we are going to get memory leaks and possibly other nastiness.
> > >
> > > Please don't say, "then fix the ruleset code", because that is one heck of
> > > a job and besides, I don't really think we _need_ to reload rulesets. As
> > > Daniel Speyer pointed out, we could and are probably going to set rulesets
> > > and load games from the client (with conndlg) before we start the server
> > > anyway. In the longer run, I am writing a patch to do atomic modifications
> > > to ruleset options from the client.
> >
> > Of course you would have to disagree :)
> > So now I have to tell you why...
> >
> > This is what I see on civserver in a future not too far from now:
> > (dramatized for effect...)
> >
> > Johnny: hey bob, how's it goin?
> > Bobby: yo john, not much, that's why I want to waste several hours at
> >        'civ...
> > Johnny: yeah me too, so what settings you want to use?
> > Bobby: hey, I'm feeling pretty tolkienish today, lets load up the Middle
> >        Earth modpack.
> > Johnny: that's a great idea...
> > Johnny: /set rulesetdir tolkien
> > -nothing happens- ...
> > Johny: WTF?
> > Bobby: no shit, this is a crappy game, let's go play Quake.
> >
> > in short: it's a piece of crap concept to have to have servers dedicated
> > to certain rulesets. in pregame the players should get to decide.
> 
> Well, nobody is accustomed to modpacks at present, so I find the example
> above a bit weird. We're not changing anything people are expecting to be
> there. But ok, back up a few steps... let's try your way:
> 
> ...
> Johnny: /set rulesetdir tolkien
> -changes to tolkien modpack-
> Bobby: Nice!
> -Alfred, Bertil and Leonardo join the game-
> Alfred: Hey peeps, whatsup?
> Johnny: Kewl, we have enough guys to play, let's rock.
> Johnny: /start
> -game starts-
> Alfred: WTF is this??
> Bertil: Ehhhhh...
> Leonardo: no shit, this is a crappy game, let's go play Quake.

Ok, sure, Johnny and Bobby are real assholes in this case as they didn't
inform their competitors. (or give their competitors time to inform
themselves)

> 
> > Second of all, there is absolutely no way for players to know which
> > rulesets they're playing under in pregame (unless it's advertised on
> > metaserver or some such).
> 
> You hit the nail here. This got to change. The metaserver should say what
> modpack is being run.
> 
> Now, most players will stay with defaults and except defaults to be
> played, and will be pissed if a modpack is started without them knowing
> it. Actually, they should get a clear message that a game is running
> something non-standard, because that might be a cheating game (and this
> way of cheating is just _so_ easy to achieve, just, say, add
> [my_nation]init_techs="Industrialization" in my_nation.ruleset; who will
> notice?).

You're right, this would suck, but is currently only a problem if you've
got somebody playing on his own public server (and cheating). In this
case, I imagine he'd eventually get boycotted (but in that case too, he
could hack the server to take out any "announcements" you'd want to put
in about nonstandardness)

So right now when we don't have the ability to dynamically edit rulesets
in pregame. Since some on the list want this to happen, and it seems
reasonable, I think it'll probably happen not _too_ long from now.

(What I did gloss over was the fact that Johnny had to have an elevated
control level to set the rulesetdir)

> So when do you want to know? I want definitely want to know _before_ I
> join a game and start socializing with those people, spending time there.
> I usually know what I want to do before I pick a server, and I want to
> pick a server which suits me. If I set up a server as Tolkien modpack, I
> do not want to explain to 342 people accidentially joining the wrong
> server that this is a modpack server etc etc., I want them to know before
> they join.
> 
> So the logical thing is that civserver announces to metaserver what kind
> of game it is running, so that players can choose. The only consistent way
> of doing this, is by picking modpack/rulesets _before civserver starts_.
> Otherwise, they might join before I get around to issuing the magical
> modpack command, people who are looking for my modpack game won't see it
> when they refresh, or think I've fucked up, etc.. The metaserver dialogs
> (whether client or web) don't update before you hit the refresh button.

Well, this is not too hard if you're honest (i.e. an motd-like string sent
to the metaserver or some such), and I think you realize we can't stop
the unscrupulous. But the point here is: if you can change _any_
settings in the server without other people knowing about it, you are
cheating. 

Johnny: /set citymindist 5
or 
Johnny: /set unhappysize 1 (Yikes!)

Changing to a different ruleset is just a much bigger change
(in most cases). So yes, people should be informed about it (perhaps
even before they join into pregame (should one be able to 'finger' a
port and get a 'show' listing back?, shounds slightly dangerous)) but it is 
not so fundamentally different that one should be _only_ be able to
change it at the console (before the server even starts).

<aside>
I played quite a bit of netrek back in the day (possibly more addictive
than freeciv) and one of the features that would be awfully nice to see
here is the concept of voting to make changes. If its case, since there
was no individual play, you did not need unanimous decisions to say kick
some clueless person out of the game, or indeed, to completely change the
rules. In this case, we would need more unanimity in the voting, but I
think that it would have substantial advantages (the need to agree to
end a game or change the enddate of a game midgame, the need to agree to
change server options, or the need to agree to give one person control
level access to change the server options (and this includes rulesets).

This would alleviate some of you're concerns about _knowing_ if a
setting has been changed.
</aside>

About the mallocs, etc not getting freed, I'm not sure why this is
a problem. doing a /set tolkien /set default /set ancients in pregame is
not going to load the rulsets three times. we're not going to reload, (and 
least it shouldn't at present (maybe when we can dynamically edit 
rulesets...), so this seems a strawman.  

Conclusion: this feature has got to go back in. If you want to write a
warning into stdinhand for "help rulesetdir" about possible nastiness,
fine. fix the ruleset code later.

> 
> I think we should follow the principle of least surprise here. Requiring
> rulesets to be chosen before loading civserver is this: If you start a
> server with a modpack, you know what you get and what happens next. If you
> join a server with a given description, you know what you get.
> 
see above

-mike

> Yours,
> Per
> 
> "What we anticipate seldom occurs: but what we least expect generally
> happens." -- Benjamin Disraeli


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