# ProtoCiv: porting Freeciv to Python

Discussion in 'Python' started by Brandon J. Van Every, Dec 24, 2003.

1. ### Brandon J. Van EveryGuest

I am

- *TENTATIVELY* -

(operative word) undertaking the project of porting the GPL open source game
"Freeciv" to Python. Freeciv is, in essence, an almost straight clone of
Sid Meier's Civilization II, albeit with better cross-platform and
multiplayer support. www.freeciv.org

I'm undertaking the project independent of the current Freeciv project
managers. They are not a variable as to how the project will proceed. Our
goals are too disparate for us to attempt to coordinate with each other.

I'll consider offers of assistance, although first I must do a lot of work
on my own. Still, if my goals strongly ring a chord with your own goals,
let's talk. (And conversely, if you want something totally different, let's
not waste the breath. ;-) Here are my goals:

- the working title of the project is "ProtoCiv," but I'm amenable to better
names. "Better," in my parlance, means more marketable and more likely to
get people to play / develop / notice / care about / remember the project.

- the primary language of ProtoCiv development will be Python. Freeciv is a
C codebase, so a lot of migration work is needed. Python will "own" the
app, I will be starting at main() and digging as far down as I can easily
go. Once the digging is no longer easy, i.e. once I've hit "bad dirt," an
initial Python extension interface will be established. Over time, with the
help of others, the C code will be whittled away to bare performance
essentials.

- new coding in C will be actively discouraged.

- no clones of commercial games such as Civ II will be supported. One of
the first things I'll do in the ProtoCiv project is remove the current Civ
II support, and change the game significantly so that it is no longer almost
just like Civ II. I find straight or near-straight clones of commercial
products to be an offense to the game industry.

- "knockoffs" are ok. I define a "knockoff" as something very similar to
another game, but still a distinctly different game. For instance, Call To
Power II is a knockoff of Civ II, not a clone.

- the main purpose of the ProtoCiv project is to encourage rapid prototyping
by 4X TBS Game Designers. This is against the desires and energies of the
current Freeciv project management, and is my primary reason for going my
own way with this.

- an \alpha, \beta, and \release directory infrastructure will be
established in all distributions so that it's easy for Game Designers to add
features and get them distributed for in-the-field testing. Users will
voluntarily enable features. In ProtoCiv, there will be no Gatekeepers
deciding what game designs may or may not be tried. Anyone will be able to
submit \alpha features, although of course they'll be turned off by default
and the game developer will have to jazz people up about turning them on.
\beta and \release will be more stringently controlled for purposes of
making sure the code works, not for purposes of evaluating whether a given
game feature is good or not.

- ProtoCiv emphasizes Game Designer flexibility, not techie flexibility /
libido for its own sake. Gatekeepering to keep the system architecture
working properly will be more "traditional."

- I am a Windows-centric developer. Currently I'm working on the subgoal of
eliminating Freeciv dependencies upon crufty Cygwin and/or MinGW tools. I
will be maintaining Visual Studio .NET 2003 solution files. I am amenable
to cross-platform support, given that Freeciv already has a lot of
cross-platform client code, but Windows development will not be Cygwin or
MinGW dependent.

- I may integrate .NET support later on, using Python for .NET.

- This is a 4X TBS genre project. It is not a RTS, RPG, FPS, or other kind
of genre project. Project management will not become confused about the
basic nature of 4X TBS. Creating an engine for any game is not a goal.
Creating an easily modified 4X TBS engine, starting from a Civ-style
codebase, is the goal.

- If project components could in fact be used independently of genre, i.e.
world map generators, their modularity will be considered.

- I'm a commercial developer, not a hobbyist. Project participants are free
to treat the project "as a hobby," but when hobbyist and commercial
development cultures collide, commercial culture will win. For instance,
Commercial developers don't think all tools have to be free, nor does all
software have to be open source. Commercial developers do not say "let's
wait a long time before trying X." Commercial developers don't badger
people about giving away tons of work as some kind of moral virtue.
Commercial developers consider time to be money, and assess risk before
spending their money.

- FWIW I'm a proponent of MIT / BSD style "do whatever you want with it"
open source licenses, not GPL. I believe if you're going to give something
away, you should give it away completely. And if you don't want to do that,
don't give it away. I don't want GPL licenses interfering in my business
decisions, what I choose to make open source or proprietary. However,
Freeciv is a GPL codebase, so if I want to use it I'm stuck with it. I will
be looking for ways to put independent project components under MIT / BSD

- Because of the GPL license, no commercial gain of any kind is believed
possible with this project. My main motives are:

1) get Game Designers to advance the Art and Science of 4X TBS game design
2) prototype game features that I might try in Ocean Mars someday
3) find out what level of 4X TBS modding is or isn't possible

- to accomplish these purposes, the project will be actively marketed. i.e.
Get articles about it on Gamasutra, Gamedev.net, gamer websites, etc. when
it's at an appropriate stage.

--
Cheers, www.indiegamedesign.com
Brandon Van Every Seattle, WA

Taking risk where others will not.

Brandon J. Van Every, Dec 24, 2003

2. ### cr88192Guest

<snipped entire post>

I am mostly responding because I found it amusing that I disagreed with
nearly every point mentioned here, this is not meant as any kind of
discouragement though...

it is quite likely that I just have a very much different set of ideals...

cr88192, Dec 25, 2003

3. ### Mark CarterGuest

> - FWIW I'm a proponent of MIT / BSD style "do whatever you want with it"
> open source licenses, not GPL. I believe if you're going to give something

Microsoft have always complained that GPL-ish licences "infect"
everything they touch (yes, yes, I'm perfectly aware of the irony). I
was thinking that, if more stuff was released into the Public Domain -
then that would be a good thing. It might actually be a benefit for
Microsoft to rip off good quality PD work. If they got it for free,
then they might be less inclined to roll there own "feature rich"
solutions, and instead opt for a more conventional approach.

There might be a chance - and of course I emphasis the word "might" -
that they would contribute, in some small way, to ongoing PD efforts.
After all, if they though that they could get someone to effectively
work on their product for free, then they might be a bit more
forthcoming.

Just an opinion.

Mark Carter, Dec 25, 2003
4. ### Tom PlunketGuest

Brandon J. Van Every wrote:

> I am
>
> - *TENTATIVELY* -
>
> (operative word) undertaking the project of porting...

Brandon, why not heed the advice that one holds back such an
announcement until someone actually has something interesting to
announce? You know how many of these sorts of projects are
started, and you know how many of these projects get carried
through to completion.

> - the primary language of ProtoCiv development will be Python.
> Freeciv is a C codebase, so a lot of migration work is needed.
> Python will "own" the app, I will be starting at main() and
> digging as far down as I can easily go. Once the digging is no
> longer easy, i.e. once I've hit "bad dirt," an initial Python
> extension interface will be established. Over time, with the
> help of others, the C code will be whittled away to bare
> performance essentials.

Seems like a huge waste of time, starting with the fact that
editing the C codebase to do what you want is likely, at this
point, far easier.

Since it's GPL'd, it's not like you couldn't just fork the
project and do it in C, sticking Python on for new bits as
appropriate.

> - no clones of commercial games...
> - "knockoffs" are ok.
> - the main purpose of the ProtoCiv project is...
> - an \alpha, \beta, and \release directory infrastructure will...
> - ProtoCiv emphasizes...

Show us the money. Let us know when there's something to see.
Until that point, you might heed the advice here:
Scroll to entry 16 if your browser doesn't go for you (Opera, for
example).

> I will be maintaining Visual Studio .NET 2003 solution files.

"So people who help me will be required to pirate it, and the
ActiveState plugins that make Python develpoment possible in
VS.NET."

> - I'm a commercial developer, not a hobbyist.

Good luck. You haven't made any money yet, right? It's been
five years?

> - Because of the GPL license, no commercial gain of any kind is
> believed possible with this project.

Just because the code is GPL doesn't mean the assets need to be.
Regardless, nothing is preventing you from sticking it on a CD
and charging money for it.

-tom!

Tom Plunket, Dec 25, 2003
5. ### Erik Max FrancisGuest

Mark Carter wrote:
>
> > - FWIW I'm a proponent of MIT / BSD style "do whatever you want with it"
> > open source licenses, not GPL. I believe if you're going to give something

>
> Microsoft have always complained that GPL-ish licences "infect"
> everything they touch (yes, yes, I'm perfectly aware of the irony). I
> was thinking that, if more stuff was released into the Public Domain -
> then that would be a good thing. It might actually be a benefit for
> Microsoft to rip off good quality PD work. If they got it for free,
> then they might be less inclined to roll there own "feature rich"
> solutions, and instead opt for a more conventional approach.

There's plenty of MIT, BSD, and public domain code which Microsoft has
"appropriated" for their own purposes. It's a part of why they're so
successful.

> There might be a chance - and of course I emphasis the word "might" -
> that they would contribute, in some small way, to ongoing PD efforts.

That chance is about as close to zero as you can get, since they're
already have no problem using public domain and the like code and have
made no effort of ever releasing something back. Part of their business
model is to buy software, buy the rights to software, or use public
doman/MIT/BSD software, modify it by adding their own lock-in features,
then sell it.

--
__ Erik Max Francis && && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ I have not yet begun to right!
-- John Paul Jones

Erik Max Francis, Dec 25, 2003
6. ### Ville VainioGuest

Tom Plunket <> writes:

> Brandon, why not heed the advice that one holds back such an
> announcement until someone actually has something interesting to
> announce? You know how many of these sorts of projects are

It's just Usenet - people use the bandwidth for much less interesting
stuff anyway. Also, I think mentioning a project one is about to
embark on in Usenet is a good idea, for finding the possible prior art
or like-minded individuals if nothing else.

> Seems like a huge waste of time, starting with the fact that
> editing the C codebase to do what you want is likely, at this
> point, far easier.

Perhaps the eventual results would be less interesting w/ that
approach?

--
Ville Vainio http://www.students.tut.fi/~vainio24

Ville Vainio, Dec 25, 2003
7. ### Brandon J. Van EveryGuest

"cr88192" <> wrote in message
news:...
> <snipped entire post>
>
> I am mostly responding because I found it amusing that I disagreed with
> nearly every point mentioned here, this is not meant as any kind of
> discouragement though...

Different strokes for different folks!

> it is quite likely that I just have a very much different set of ideals...

Yes, given our previous discussions in
comp.games.development.programming.misc, I'd say your tastes run the
opposite for a number of significant things. Functional vs. imperative,
technology vs. Game Design.

--
Cheers, www.indiegamedesign.com
Brandon Van Every Seattle, WA

"Trollhunter" - (n.) A person who habitually accuses
people of being Trolls.

Brandon J. Van Every, Dec 25, 2003
8. ### Brandon J. Van EveryGuest

"Tom Plunket" <> wrote in message
news...
> Brandon J. Van Every wrote:
>
> > I am
> >
> > - *TENTATIVELY* -
> >
> > (operative word) undertaking the project of porting...

>
> Brandon, why not heed the advice that one holds back such an
> announcement until someone actually has something interesting to
> announce?

Because if someone has my project goals and wants to volunteer source
control right now, I'm taking them up on it. Here's the consideration on
that: some people are telling me to use TLA, not CVS, so that means it's not

>You know how many of these sorts of projects are
> started, and you know how many of these projects get carried
> through to completion.

Yes I do. And you'll notice that I didn't start a mailing list, or really
ask for any help. All I need at this point is:

1) gauge project interest
2) sanity check my goals, in the face of opposition
3) see if anyone happens to be ready and willing to work towards the same
goals

> > - the primary language of ProtoCiv development will be Python.

>
> Seems like a huge waste of time,

One of the meta-goals is Python advocacy in the field of Game Design. Given
my strategic view on the matter, it is not a waste of time, unless it is too
much work to have any chance of ever getting done.

> starting with the fact that
> editing the C codebase to do what you want is likely, at this
> point, far easier.

Even the "simple" act of eliminating the Cygwin dependencies is proving to
be a chore. C is not a good language for anything but portable assembly.

> Since it's GPL'd, it's not like you couldn't just fork the
> project and do it in C, sticking Python on for new bits as
> appropriate.

Do you have an understanding of what it takes to put on "new bits" in
Python? I'm thinking not.

> Show us the money.

Excuse me? If you are in a snit about anyone communicating about stuff, if

> Let us know when there's something to see.
> Until that point, you might heed the advice here:
> Scroll to entry 16 if your browser doesn't go for you (Opera, for
> example).

I could argue all sorts of reasons why it's not "stupid" to state what I
have, but I won't bother. That *would* be stupid; as I said initially, if
you don't have my goals let's not waste the breath.

> > - I'm a commercial developer, not a hobbyist.

>
> Good luck. You haven't made any money yet, right? It's been
> five years?

Almost six. And I'm still doing what I want to do, so that should tell you
something.

> > - Because of the GPL license, no commercial gain of any kind is
> > believed possible with this project.

>
> Just because the code is GPL doesn't mean the assets need to be.

But I'm not Mr. Art Guy cranking out assets. They will probably come from
other people, and it will depend on their sensibilities on whether they're
GPL'd or not.

> Regardless, nothing is preventing you from sticking it on a CD
> and charging money for it.

Sure there is. First CD sold, someone else can do exactly the same thing.
What's the point? Unless you're doing online subscription stuff it is
difficult to have a service model for games.

--
Cheers, www.indiegamedesign.com
Brandon Van Every Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.

Brandon J. Van Every, Dec 25, 2003
9. ### Brandon J. Van EveryGuest

"Ville Vainio" <> wrote in message
news:...
>
> It's just Usenet - people use the bandwidth for much less interesting
> stuff anyway. Also, I think mentioning a project one is about to
> embark on in Usenet is a good idea, for finding the possible prior art
> or like-minded individuals if nothing else.

Yes, that is indeed a peripheral consideration. What if someone in
contemplating it?

--
Cheers, www.indiegamedesign.com
Brandon Van Every Seattle, WA

"Desperation is the motherfucker of Invention." - Robert Prestridge

Brandon J. Van Every, Dec 25, 2003
10. ### Dan OlsonGuest

On Thu, 25 Dec 2003 14:12:12 -0800, Brandon J. Van Every wrote:
> C is not a good language for anything but portable assembly.

This will be fun, the same flamewar we had last month... but with Python
fans involved!

Dan Olson, Dec 25, 2003
11. ### cr88192Guest

"Brandon J. Van Every" <> wrote in
message news:bsflkg$coko2$-berlin.de...
>
> "cr88192" <> wrote in message
> news:...
> > <snipped entire post>
> >
> > I am mostly responding because I found it amusing that I disagreed with
> > nearly every point mentioned here, this is not meant as any kind of
> > discouragement though...

>
> Different strokes for different folks!
>

yes.

> > it is quite likely that I just have a very much different set of

ideals...
>
> Yes, given our previous discussions in
> comp.games.development.programming.misc, I'd say your tastes run the
> opposite for a number of significant things. Functional vs. imperative,
> technology vs. Game Design.
>

quite agreed.

cr88192, Dec 26, 2003
12. ### Erik Max FrancisGuest

"Brandon J. Van Every" wrote:

> "Tom Plunket" <> wrote:
>
> > Good luck. You haven't made any money yet, right? It's been
> > five years?

>
> Almost six. And I'm still doing what I want to do, so that should
> tell you
> something.

In those six years you haven't managed to produce anything, so I'm not
exactly sure what that's supposed to tell us. (Plus, it's useful
information to know that, by your own admission, before those five years
started when you left your first and only job ever in the computer
industry, which lasted only two years.)

--
__ Erik Max Francis && && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ I'm sharing the joy / I'm glowing like sunshine
-- Chante Moore

Erik Max Francis, Dec 26, 2003
13. ### Brandon J. Van EveryGuest

"Dan Olson" <> wrote in message
news...
> On Thu, 25 Dec 2003 14:12:12 -0800, Brandon J. Van Every wrote:
> > C is not a good language for anything but portable assembly.

>
> This will be fun, the same flamewar we had last month... but with Python
> fans involved!

But this discussion would only (properly) be about the appropriateness of
various languages for prototyping Game Designs. I say Python is
appropriate, and C isn't.

--
Cheers, www.indiegamedesign.com
Brandon Van Every Seattle, WA

"Desperation is the motherfucker of Invention." - Robert Prestridge

Brandon J. Van Every, Dec 26, 2003
14. ### Servé LauGuest

"Brandon J. Van Every" <> wrote in
message news:bsglco$cskls$-berlin.de...
> But this discussion would only (properly) be about the appropriateness of
> various languages for prototyping Game Designs. I say Python is
> appropriate, and C isn't.

I agree, but simple text files with a few statements, loops and ocnditional
expressions are good enough for Game Designs

--
Looking for a C(99) compiler for windows?
http://www.cs.virginia.edu/~lcc-win32/

Servé Lau, Dec 26, 2003
15. ### Nathan MatesGuest

In article <bsglco$cskls$-berlin.de>,
Brandon J. Van Every <> wrote:
>But this discussion would only (properly) be about the appropriateness of
>various languages for prototyping Game Designs. I say Python is
>appropriate, and C isn't.

Prototyping != implementing.

Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein

Nathan Mates, Dec 26, 2003
16. ### Gabriel GenellinaGuest

At 25/12/2003 10:45, you wrote:

>Show us the money. Let us know when there's something to see.
>Until that point, you might heed the advice here:
>Scroll to entry 16 if your browser doesn't go for you (Opera, for
>example).

That's because the <name> tag is wrong, should be <a name="tal"> instead of
<a name="#tal">. The # is not part of the name but a separator.
Given that markup, you could jump directly with

(Sorry the offtopic...)

Gabriel Genellina
Softlab SRL

Gabriel Genellina, Dec 27, 2003
17. ### G.I.LGuest

Nathan Mates wrote:
> In article <bsglco$cskls$-berlin.de>,
> Brandon J. Van Every <> wrote:
>> But this discussion would only (properly) be about the
>> appropriateness of various languages for prototyping Game Designs.
>> I say Python is appropriate, and C isn't.

>
> Prototyping != implementing.

Well, duh!

g

G.I.L, Dec 27, 2003
18. ### WTHGuest

> > Prototyping != implementing.
>
> Well, duh!
>
> g

That is a VERY important distinction, and not a 'duh' type of statement.

WTH

WTH, Jan 7, 2004
19. ### Brandon J. Van EveryGuest

Re: ProtoCiv: porting Freeciv to Python CANNED

"Brandon J. Van Every" <> wrote in
message news:bsd101$c1oj1$-berlin.de...
> I am
>
> - *TENTATIVELY* -
>
> (operative word) undertaking the project of porting the GPL open source

game
> "Freeciv" to Python. Freeciv is, in essence, an almost straight clone of
> Sid Meier's Civilization II, albeit with better cross-platform and
> multiplayer support. www.freeciv.org

Here's a postmortem. Short version: I've canned the project. Many of you
will say "I told you so," but at least I almost have a VS .NET 2003 build to
show for it.

First I decided to tackle the subgoal of freeing Freeciv from the UNIX
Cygwin / MinGW crud. As I write this, I have it compiling and running on VS
..NET 2003, and that isn't a small accomplishment. But, the game hangs
shortly after the server starts. I'm probably within spitting distance of
completing this subgoal, but it has taken too long and has been really
really boring. If there isn't some major lurking horror I'll get it working
eventually, but I've put it on the backburner. Personal projects have to be
personally rewarding, and this isn't it.

Looking at the Freeciv C code in more detail, I've realized that there's way
too much code to consider "generally" rewriting stuff in Python. Rather,
I'd have to embed Python and add / rework game functionality piecemeal.
This is a lot of work, there's a whole lot of boring "wrapper code" to cough
up. Between performing this kind of labor on a GPL project, and performing
it for Ocean Mars, I've decided that the former is not rational. And more
importantly, it doesn't make me happy.

I've also become extremely disillusioned with Open Source developers.
Basically, for a commercially minded developer such as myself, I don't think
they're any value add at all. Ergo, all public projects I might conceive of
are fundamentally DOA.

For 6 months I've experimented with how Open Source development might fit my
commercial goals. What I've found is that I can't rely on people, only
their coding artifacts. Every Open Source game developer I've met in the
past 6 months has been, at a basic level, a hobbyist. Hobbyists simply
don't manage projects according to the demands of commercial development.
This implies that if I'm in charge, they won't like my style; and when
they're in charge, it drives me fucking nuts. I've now accepted that the
Open Source talent pool is what it is. It is capable of being fun for
programmer geeks. But with few exceptions, such as perhaps
http://nebula.sourceforge.net, it cannot achieve the kinds of projects I
have in mind.

I'm also starting to downright despise Linuxers. If I see another project
that's "cross-platform, so long as your platform is Linux," I'm going to cut
someone's head off. Linuxers have this completely broken piece of shit
build management mentality about them. They think that because on *their*
OS all these libraries are preinstalled, and everyone's compiling things all
the time, that they don't have to do anything to maintain consistent builds
on other platforms. Rather, it's always the induhvidual's responsibility to
are usually UNIX-centric libraries, often not readily compiled on Windows.
Or requiring Cygwin or MinGW, which real Windows developers don't want to
use. Versioning becomes a nightmare, is it the Cygwin or MinGW version?
It's just not the way mainstream Windows developers do things.

Whether my Freeciv VS .NET 2003 build makes it into the official Freeciv
source pool remains to be seen. The Freeciv people are, after all, a bunch
of Linuxers. They don't have a single .NET developer among them, and I'm
not about to become their .NET buildmaster. When I say things like "Windows
people want to link libpng and zlib against MSVCRT71.dll," they say, "we
don't want to bloat our source tree with needed libraries." Maybe in time I
will get them to accept a separate package of underlying libraries for
Windows folk.

--
Cheers, www.indiegamedesign.com
Brandon Van Every Seattle, WA

"Desperation is the motherfucker of Invention." - Robert Prestridge

Brandon J. Van Every, Jan 13, 2004
20. ### Istvan AlbertGuest

Re: ProtoCiv: porting Freeciv to Python CANNED

Brandon J. Van Every wrote:

> all public projects I might conceive of are fundamentally DOA.

There is no argument about that...

Your only talent is trolling. You do it well enough, peppering
your expose with subtle and quasi intelligent insults just to keep
the discussion going. And that's what trolling is all about.

But I don't know whether one can make a living out of that.

i.

Istvan Albert, Jan 13, 2004