[Freeciv-Dev] Re: new generalized calendars
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tuesday 27 August 2002 19:38, Reinier Post wrote:
> On Mon, Aug 26, 2002 at 12:46:00PM +0200, Bart Coppens wrote:
> > I think all of these should be located in a script rather than in the
> > gamefile itself. All these events could easily be scripted without having
> > to worry about implementing all those possibilities in the calendar code.
> > You'd only need an interface to change the calendar with a script.
> Load a game stored on civserver.freeciv.org and continue to play
> with it. How do you know which script to use? Is the script
> even available for your platform?
Load a modpack from freeciv.org Try to use it on a Windows system. It won't
work because Windows doesn't use xpm.
I think you won't find a script without a modpack or scenario attached to it.
Using a script without using its graphics and rules doesn't seem very useful,
does it? So when you'd find a platform not supporting this script, it
probably wouldn't support the graphics either. If you'd use perl as the
scripting language, you'd have more problems getting to make your graphics
work on your platform than your script.
Scripting is mainly used for dynamic events and such. Starting and ending
times of ages are mostly fixed times. Like the ones in the standard freeciv
ruleset. Dynamic events like the death of a unit should be scripted.
Compare it with a website. You'll probably use a static HTML file for your
contact page, but probably not for the daily changing news section. That's
because scripting languages like PHP and perl are designed to make life
easier for all of us with a site with dynamic content. It's faster updated,
doesn't need as much trouble as with only static html pages.
Hardcoding ALL possible events just into the freeciv code wouldn't be worth
the effort, I fear. Providing scripting, may make it much easier, not only
for coders as they wouldn't have to spend time on coding all those extra
events in Freeciv, but also for the developpers of modpacks, who would then
have a MUCH more powerful way to let calendars interact with the game.