Slashdot Log In
The Hacking Contest Nobody Tried to Win
from the cooperation-not-competition dept.
The Hacking Contest Nobody Tried to Win
-by magentaI am very glad that I decided to enter.
First off, nobody there, including myself, cared about the potential for prizes. There was a great feeling of camaraderie, of friendship. Thirty people (including Loki Entertainment's representatives; very few people, as it turns out, actually signed up, probably due to some of the FUD spread on Slashdot regarding Loki's intentions) talked to each other as though they were old friends even though we'd never met each other online, much less in real life. We all exchanged ideas for hacks, bounced ideas off each other, and discussed means of implementation. The attitude was the opensource mentality at its best.
And then we saw the source.
The official Loki Hack '99 t-shirt has a slogan on the back. The slogan is "I saw the source and lived." This slogan is incredibly apt. At the risk of offending Activision (which I certainly don't intend to do), Civ:CTP isn't exactly the best-engineered program around. Imagine the original release of Mozilla, put into a blender on frappé, shoved into a toaster oven and let to sit on medium heat for a few days. And then microwave it. The individual pieces of code weren't too bad (if not inelegant), but the entire package wasn't arranged in any semblance of order. The first hack I wanted to perform was XaoS-like smooth zooming on the map, so that when someone clicked on a zoom button, it would do it smoothly. I couldn't find, nor could the Loki people tell me, where any sort of useful callback would be. After tracing through about 10 levels of indirection, going past hard-coded constants and multiple redundant and nonsensical calls to seemingly-random parts of the source, I gave up and decided to work on other things.
But I saw the source, and I lived.
That is such a cool concept. Namely that I saw the source. The source to a very commercial, very proprietary program, from a very un-opensource company. Activision put a lot of faith and trust into this experiment, and hopefully they will find that it was well worth it. In just 48 hours, a couple dozen programmers who had never seen the source before added in some incredible changes. I rewrote the map generator to generate quasi-fractal terrains with randomly-combined algorithms. The person sitting next to me changed the game logic so that different civilizations would have different abilities (rather than just being different in name, one tribe could run faster but be weaker, while another one could produce technology more quickly but not generate wealth, or whatever), which was no mean feat considering the network-play mechanism. Various people ported SDL (the low-level graphics API written by Loki for the purpose of having DirectDraw-esque functionality in Linux) to varying other APIs, such as Clanlib and GGI. One person, whom I now consider myself friends with thanks to this experience, added in hooks so that during a network game, you could launch an arbitrary program (such as tetris) while waiting for other people to finish their turns, and also added in hooks for publishing the gamestate to an external server, so that people can watch the game from the outside, getting a play-by-play summary for example.
I saw some very cool things. One of the reasons I chose to work on the map generator was that unlike the main program, which took several hours to build fresh and 10 minutes to link (on a quad Xeon-600 with a gigabyte of RAM), the map generator was implemented originally by Activision as a COM object. Sam of Loki decided to take the next logical step when porting this code to Linux by making it a separately-linked set of shared libraries to be linked at runtime. Of course, Linux doesn't have any good COM implementations, certainly none which are readily-available and behave the same way as MSVC's, so what did he do? He basically reimplemented the most important functionality (QueryInterface, AddRef, and DelRef) in about 10 lines of C++, confirming my suspicions that without DCOM, COM is just a C++ refcount garbage collector.
The competition (or lack thereof) was basically the embodiment of open source. Twenty or so talented hackers teamed up to make sweeping improvements on someone else's code, without any real desire for glory or money. Most of the Slashdot naysayers were saying that Loki was obviously trying to take advantage of talented programmers by conning them into giving up quite a bit of labor for free. Well, Loki certainly didn't get it "for free," as they went out of their way to be as helpful and giving to the "competitors" as they could. They provided everything, short of travel; they even rented a hotel room that people could take turns crashing and showering in, and when the hotel-catered meals weren't enough, they happily went and got food for us as needed. And of course, the best thing that Loki did was deciding to do this to begin with. That and coming up with a very flexible NDA which only restricts our usage of the physical code for the next five years, which of course, we weren't allowed to leave with anyway.
I can't properly describe how incredible this competition was to anyone who wasn't there. Particularly I know I can't describe it to people who are driven by money and recognition, rather than the love of simply coding. Again, there was no feeling of competition there. Nor did there need to be. As bad as Activision's code was, it wasn't bad enough to stop people from simply having fun and doing very cool things. It surprised everyone there how productive they could be under the circumstances. It certainly surprised me.
Hopefully this experiment will be a positive lesson to Activision and other companies that opening the source can lead to wonderful consequences.
In any case, I would definitely like to thank the wonderful people at Loki Entertainment for enabling this to happen, especially Sam, who tried his best to help me whenever I was stuck on a piece of code, and Scott, who stroked everyone's ego in nice ways. I would like to thank the people I met there, especially Chris and Ryan, for being so cool to work with and knowing what this contest was really all about. I would definitely like to thank Activision, who made this possible to begin with; I look forward to seeing the results of this experiment, on every scale.
People who don't know any better sometimes think magenta's real name is Joshua Shagam.

Re:An Interesting Quote (Score:3)
Libertarian goverrnments will not be able to move military units outside of their home territory, but will receive large science and production bonuses. Once a libertarian government is chosen, all fascist and communist civilizations will immediately declare war on it.
What kind of cinderella notion of Libertarianism does that represent? I'm a libertarian, and it seems to me that the main cost of libertarianism is more civil unrest, and less population growth, and much less production and wealth. Unless the populace is very educated. Think of all the drug addicts, and other things this society would have since it didn't consider anything as evil if it only harmed the person doing it (as proliferated in the current Libertarian platform).
If anything the Ecotarian "back to the earth" society is already a pretty much a good embodyment of Libertarianism of that order(IMHO). But it could be extended...
If one wanted to grant the benifits ESR suggested they should be more costly. It should require the same happiness level as a democracy (if not more), but require even more education to maintain a productive society. Potential rebellion would be greater also.
And definately, I don't think that communist and fascist governments really care about a libertarian order next door. It would be much easier to conquer a country where no one had to join the military anyway. In fact they tend to come in and fill a vacuum left by the lack of leadership from a week government. Remember the Articles if Confederation?
(Btw, not to sound like I'm haranging my party. I am Libertarian because I believe a government is a collaberation inside a society built to preserve the liberties of those in that society. And that less is more when it comes to government on average. Not becuase of unrealistic beliefs that if the government removes its laws and consequences then we can truely be free and without law.)
And kudos to those who did enter, on the most part I really liked hearing about the cool things they did with the code.
^~~^~^^~~^~^~^~^^~^^~^~^~~^^^~^^~~^~~~^~~^
Loki's own staff would die before they did this (Score:3)
You have to start looking at costs and benefits of doing these things more and more and coding just for the experience less and less. Loki's programmers all have degrees in CS and very high grades, and whatever open source projects they did in the past were a tiny blip when they got hired. So as your student loans default one by one you're going to need to think more and more about where you put your volunteering.
Re:Sick of this attitude (Score:3)
I suppose it comes by extension of the right to share anything else. If I want to let a friend live in my house rent-free, I do not expect the builder to be knocking on my door saying "sorry, you can't do that, you're threatening my livelihood". Yet software builders take their ability to dictate how their "houses" may be used for granted.
Now you know perfectly well that this isn't always an option. If it wasn't for the work of the GNU project, those of us who wanted to share our operating systems would have no legal choice at all. Even now, Microsoft is struggling to stop this choice being a viable one. Or are you suggesting those of us who don't like to be blackmailed into shrinkwrap contracts shouldn't use computers at all? That wouldn't leave us in a very good position in the 21st century.
RMS himself has made it clear that he doesn't expect free software to save the world. But software freedom is an issue important enough to him that he has decided to devote his life to it, and I think it's worthy of our attention.
Absolutely. I am not saying I think that Stallman is correct, I am saying that we should consider his arguments. Perhaps there is a moral imperative for free software.
Re:echos of the gpl (Score:3)
---
"'Is not a quine' is not a quine" is a quine.
Re:I have a few quick questions... (Score:3)
As far as other places, the only other one I can remember is Ryan Gordon who came in second for doing the aforementioned server-publishing hack.
BTW, I wrote this article a couple hours before winners were announced. (Roblimo put me on a pretty tight schedule. :) My attitude was unchanged after the award ceremony, except that I was disappointed that I didn't win the machine. :)
---
"'Is not a quine' is not a quine" is a quine.
Re:Umm, I have another one for you guys :-) (Score:3)
I can't speak for everyone, but I'm still recovering from that first 48. :)
---
"'Is not a quine' is not a quine" is a quine.
The NDA that we're under (Score:3)
NONDISCLOSURE AND ASSIGNMENT AGREEMENT
FOR PARTICIPATION IN THE LOKI HACK 99 CONTEST
This Nondisclosure Agreement ("Agreement") confirms an agreement between
Loki Entertainment Software (the "Company") and _________________________
(the "Receiving Party"). In consideration of the Receiving Partys
participation in the Loki Hack 99 programming contest (the "Contest")
and any access of the Receiving Party to Proprietary Information of the
Company and its licensors, the Receiving Party hereby agrees as follows:
1. The "Receiving Party" understands that the Company has disclosed or
may disclose information relating to the game Civilization: Call to Power
(including, without limitation, drawings, designs, specifications, data,
manuals, know-how, formulas, computer software, source code, algorithms,
data structures, scripts, application programming interfaces, protocols,
processes, ideas, inventions (whether patentable or not), schematics and
other technical information), which to the extent previously, presently,
or subsequently disclosed to the Receiving Party is hereinafter referred
to as "Proprietary Information."
2. The Receiving Party agrees (i) to hold Proprietary Information in
strict confidence and to take all reasonable precautions to protect such
Proprietary Information (including, without limitation, all precautions
the Receiving Party employs with respect to its most confidential
materials), (ii) not to divulge any such Proprietary Informa-tion or any
information derived therefrom to any third party who is not a registered
participant in the Contest, (iii) not to make any use whatsoever at any
time of such Proprietary Information except as necessary to participate
in the Contest and (v) not to copy or remove from the Contest location
any such Proprietary Information. Without granting any right or license,
the Company agrees that the foregoing shall not apply with respect to any
information five (5) years following the disclosure thereof or any
information that the Receiving Party can document (i) is or becomes
(through no improper action or inaction of the Receiving Party) generally
known by the public, or (ii) was in its possession or known by it without
restriction prior to receipt from the Company or (iii) was rightfully
disclosed to it by a third party without restriction, or (iv) was
independently developed without use of or reference to any Proprietary
Information. Without granting any license to any copyright or patent
rights, nothing in this Agreement shall restrict the Receiving Partys
use or disclosure of such Proprietary Information may be retained in
intangible form in the Receiving Partys mind after the conclusion of the
Contest.
3. Immediately upon the conclusion of the Contest at 3:00 p.m. E.S.T on
October 13, 1999, the Receiving Party will turn over to the Company all
manifestations of Proprietary Information of the Company and all
documents or media containing any such Proprietary Information and any
and all copies or extracts thereof. The Receiving Party acknowledges and
agrees that it may not remove at any time any Proprietary Information
from the controlled facility where the Contest takes place.
4. The Receiving Party acknowledges that its participation in the Contest
is solely for the purpose of creating a modification, addition or other
alteration to the game Civilization: Call to Power (the "Hack") and
agrees to assign and hereby does assign to the Company all of the
Receiving Partys right, title and interest in and to the Hack and all
trade secrets, copyrights, patent rights, trademark rights and other
intellectual and proprietary rights therein. The Company agrees to
release the Hack in binary form for free download on the Internet;
provided, however that nothing herein shall require the Company to
release any (i) defamatory, libelous or obscene material, (ii) materials
which compromise the anti-cheating facilities of the game Civilization:
Call to Power, (iii) material which infringes any trade secrets,
copyrights, patent rights, trademark rights or other intellectual and
proprietary rights, or (iv) any Proprietary Information.
5. This Agreement applies only to disclosures made during the course of
the Contest. The Receiving Party acknowledges and agrees that due to the
unique nature of the Proprietary Information, there can be no adequate
remedy at law for any breach of its obligations hereunder, which breach
may result in irreparable harm to the Company, and therefore, that upon
any such breach or any threat thereof, the Company shall be entitled to
appropriate equitable relief including, without limitation, injunctive
relief (without the requirement of posting any bond) in addition to
whatever remedies it might have at law. The Receiving Party shall not
export, re-export or remove from the U.S. any Proprietary Information or
direct product thereof in violation of any U.S. or foreign law,
regulation or other order; this obligation shall survive termination of
this Agreement. In the event that any of the provisions of this Agreement
shall be held by a court or other tribunal of competent jurisdiction to
be illegal, invalid or unenforceable, such provisions shall be limited or
eliminated to the minimum extent necessary so that this Agreement shall
otherwise remain in full force and effect. This Agreement shall be
governed by the law of the State of California without regard to the
conflicts of law provisions thereof. Notices hereunder will be effective
only if in writing and upon receipt or three (3) days after deposit in
the U.S. mail, first-class postage prepaid. The prevailing party in any
action to enforce this Agreement shall be entitled to costs and
attorneys' fees. No waiver or modification of this Agreement will be
binding upon either party unless made in writing and signed by a duly
authorized representative of such party and no failure or delay in
enforcing any right will be deemed a waiver. This Agreement supersedes
all prior discussions and writings and constitutes the entire agreement
between the parties with respect to the subject matter hereof.
---
"'Is not a quine' is not a quine" is a quine.
echos of the gpl (Score:3)
I guess my unanswered question is - should you have fun even if the people you associate with would disapprove of it? For me, the answer would normally be yes. But the moral dilemma found with the free software / open source philosophies leave me with a bad taste in my mouth.
--
Re:Sick of this attitude (Score:3)
Imagine if you couldn't build your house without paying somebody else because they already patented the idea. Now you see why I despise proprietary software so much - it restricts my ability to further the state of the art.
This is what I mean when I talk about a moral imperative - because that is the result that has, and will continue to, happen until we make a conscious effort to stop it.
--
Umm, I have another one for you guys :-) (Score:3)
Wow, you guys really did some cool work in only 48 hours. Could I ask for another 48 hours with the source code [freeciv.org] of Freeciv [freeciv.org]?
I'm drooling when I'm thinking what such a talented bunch of coders could do to my favourite game. :-)
Dangers of closed source (Score:3)
There've probably been a whole bunch of projects that benefitted significantly from opening their source, but this is an excellent real-world example that should be enshrined in history.
Here's hoping, though, that no Activision PHBs look at this as evidence that opening the source -- even temporarily -- invites pillory as well as improvement.
Re:echos of the gpl (Score:3)
Whatever about your feelings about proprietary software -- and in general I agree -- the claim that sitting down with the source for a game like CTP for a day is fallacious in the extreme. Hac gratia hactis is the rationale for many; but this is far from the only reason.
Activision may have gone into this for the publicity, but if they see how a game can be improved so dramatically in one day by a [collective term for] open sourcers, then they may reconsider their position, however slightly.
If you're going to win the hearts and minds of proprietary software CFOs, you've got to do it by example, not by pious posturing. And however much you point at software like Apache, the message won't be driven home until they see a demonstrable effect on their own products. That's what they saw here.
It is a shame you missed the point (Score:3)
The first few hours of the competition were spent scanning the 500,000+ lines of C++ of CivCTP, with little said between the contestants. Then we all began talking to each other to see if someone had seen some object or another anywhere during their travels through the code base. Before you knew it, it wasn't a competition any more. It was a big knowledge swap meet.
Why did we all sign up? I don't know. My personal reasons were a chance to check out the structure of a commercial game and also to get a chance to meet the other folks who had more experience than me. I only really wanted to learn more about game programming. After all, I think just about every coder has the deep-down desire to create games, right?
Perhaps Loki gained some free advertising from the event. I can tell you from being there that extra press was a necessary side-effect. The Loki staff were more interested in talking to the contestants. Was this for the screening of potential Loki coders? Perhaps. Was it for learning more about different areas of code development we weren't that familiar with. Most certainly. If you even made mention of some topic of programming or of a particular library that others weren't familiar with, you suddently found that you had an audience of 5-10 people, hanging-off your every word and wanting to learn more.
Just about everyone there was an expert in some area. Just a quick glance showed people that were very high in the food chain in many open source projects: Clanlib, GGI, GCC, and many others. Were they there to get more their names plastered all over press releases? They didn't need it. They were already well-known within the Linux community.
I had the opportunity to talk to several other of the programmers there, as well as with Loki's staff. It wasn't the lure of job offers or being mentioned on Slashdot ( ;> ) that drives these folks. Its the idea that more than one viewpoint produces a better final result. Which, last I checked, was one of the big reasons for open source in the first place.
While it was true that testing of our hacked code wasn't very robust, it wasn't meant to be. Loki and Activision aren't going to just scoop up our code, merge it together, and then repackage it to sell another million copies. Some features that we developed may be taken under consideration by Activision for a later Civ release, but it would be the concepts that we created, not our code.
I'm afraid that people have gotten the notion in their heads that this whole event was a chance for Loki to grab the spotlight, Activision to make some money, and a few hackers to be abused by some corporate machine. Far from the truth. It was a chance for Loki to use their leverage to let the open source movement to gain some steam and for some talented folks to show Activision that open source works. The result was a resounding success.
... and I think I learned more about "real-life" coding in 48 hours than I did in four years of college ;>
Andrew Henderson
Runner-Up, Loki Hack '99
The dream NDA (Score:3)
1. No showing of the code to anyone for five years (no printouts).
2. ALL code seen during the competition may be discussed with anyone. So, if you want to know what is inside CivCTP, just ask someone who went.
3. ANY knowledge gained by a programmer by looking at Activision/Loki's code may be used for that programmer's IMMEDIATE monetary gain if desired.
Hardly a standard corporate NDA, hmmmm? ;>
Andrew Henderson
Runner-Up, Loki Hack '99
My underwear is showing (Score:4)
Without DCOM, COM is for reference counting. That's absolutely correct. The windows version isn't really any different in how the code for the map generator plugin works. The only reason I used COM as an interface is that I happen to be familiar with it from a previous job (which also included plugins on Unix systems using COM, there really isn't anything to it)
Anyway, thanks for the review. What doesn't kill us makes us stronger, eh? I'm glad the experience on the whole was a positive one.
On a tangent, I hate to ruffle anyone's feathers , but the compile times on windows are quite a bit faster than Linux. A complete build from scratch on a P2/450 takes less than an hour, and linking just a minute or two at most (much less for non-full builds). I'm guessing the major factor is precompiled headers. EGCS doesn't have them. If we turn them off on windows, it takes hours there too. Incremental linking also helps. With the linux version, the whole program has to be linked from scratch every time. VC however just relinks the object files that have changed, when possible. I'd really like to be able to write games using emacs and GCC again, but the compile times for large projects really need to come down.
Re:Games and GPL (Score:4)
- Content - for the base content to properly connect to a server (prefabs, standard character models, etc.), the server owners sell a CD for, say, $5 which is the price of admission.
- Caching - one of the potential features of my architecture will be distributed storage, but there will still need, for practicality purposes, to be a server-side repository of cached player information. $1/MB/month for such a cache seems reasonable; you can play without it, but it'll annoy other users when they keep seeing placeholder graphics instead of your custom avatar and environments while it takes forever to download your real data. (Of course, if you use only prefabs, rental of a cache will be completely unnecessary. Also, it'd be very possible to specify a different source for the data, so if you already have a high-bandwidth webserver, the cache would also be unneeded.)
- Subscriptions - maybe a player just needs to pay $5/month to be allowed to use the service, or otherwise just use a guest account with a maximum number of guest connections at any given time. Of course, other people could run services out of the kindness of their hearts (look at dyndns.org vs. dyndns.com). It'll all be open, and people can run servers however they see fit.
So yes, I think something much, much grander than EverQuest could easily be both opensource and a commercial success. Hopefully I'll be able to actually get started on writing up initial specifications soon.---
"'Is not a quine' is not a quine" is a quine.
I'm glad I read this... (Score:4)
I know that many game companies consider their code to be very proprietary and treat it like their only chest of gold. Which, of course, is common to many software companies today, and isn't necessarily an invalid reaction, but I really love what I've been seeing over the last few years in Open Source.
There are some game programmers in our field that, while not being exactly open-source, do share their views and opinions with each other, especially among the Dallas developers. I've always throught it was really great how John Carmack (id) would chat with Mark Dochtermann, Jim Dose, Jack Mathews (all three at Ritual), Gary McTaggart, Charlie Brown (both at Valve), Billy Zelsnack (late of Rebel Boat Rockers) and Corrine Yu (3DRealms) about what they were all doing. While not a totally free-flow of ideas, and certainly not source hacking together, it was nice to see things get loosened up a bit.
The idea that's popping around in my head is to do something like id does with their test versions (QTest, Q3Test, etc), but somehow combine it with a similar OSS event to the one described above. Maybe a month or so after releasing the test, host an event over a weekend where qualified folks can come and hack on the source to make any modifications they think would be cool after playing the test version for a month.
Any thoughts on this? Any other ideas? I know for a fact that going purely open-source with our new technology won't fly past my other partners, and I'd even have to stop and think really deeply about it myself even if I were alone in this venture, but I really do believe that the open source model provides some wonderful benefits that I'd love to foster.
I'd love to receive email replies, but during an ISP change yesterday, I lost DNS and have no idea when it will be back up. Here's an alternate if you're interested in discussing this privately:
donm@fatbrain.com
I was invited as well... (Score:4)
But, then I came to a dilemma. Loki only notified us on October 1st (the contest began Monday, the 11th). My biggest problem was a) finding a cheap ticket on such short notice and b) I'd have to miss a week of classes here at UC Irvine. I could live with missing classes (it wasn't the best of times though, but I could have done it), but I thought it was unfair that we had such short notice to plan our trip. I searched around the web and ended up at CheapTickets.com. I could find a flight that kind of got me there for around $300. However, if you've dealt with CheapTickets, they want to send your ticket via snail-mail and it MIGHT have been there by that Friday (I was supposed to leave Sat. morning - cheapest flight out was then!). However, after emailing Kat from Loki about my dilemma, she suggested that I could pick up the tickets from CheapTickets's office in Fullerton (about 30-40 min away by car). Only problem is that I don't have a car. So much for that. I was not going to spend $300 and have even the slightest possibility that I was not going to get my ticket. I don't believe that that was fair. I'm not even going to broach the hotel rates ($69/night for the cheapest room). Again, Kat suggested that I might be able to find someone who was willing to open up their room for me (or I could sleep in the Hack room). Neither possibility excited me greatly.
Then, I stopped and thought about it for a while. I have been flown to interviews before on 2-day notice (as evil as everyone thinks Microsoft is, they did that for me...) and they paid all expenses. Now, you have to be silly to think that Loki will not try to hire some of these people that they liked from the Hack (they even admit as much on their Hack FAQ). My thought was, "Why should I pay $500 to give somebody some good PR?" ($500 includes all misc. expenses and is a conservative number). The answer of course is that I got to play around with some cool Linux game source code. But, is $500 worth this honor? In the end, I decided that it wasn't.
As some people suggested to me, if I had already been going to ALS, then this would have been a no-brainer and I would gladly have done it. But, that was not the case. In perusing Loki's pages about the Hack, it is quite interesting to note that there are a substantial amount of students were from the Atlanta area (Ga. Tech, etc.). The "older" people appeared to be employee of companies (who get a salary and can probably afford $500 more than a starving college student).
It would have been a great experience, but I passed it up. I have a feeling there will be more opportunities. In fact, Loki has mentioned that since I live in their neck of the woods (in Orange County), that they may look to hire me for some open positions. Cool. I would not have a problem working for them. The difference is that I'd be getting paid. That's the difference. I'll hack all you want if you pay me. If I am doing it out of my own free will, then I guess that I have certain restrictions that I place upon myself.
Justin
Sick of this attitude (Score:4)
A programmer who, by the sweat of his or her brow, produces a piece of software, owns that fruits of that labor. It belongs to them. End of story.
If, he or she, out of pure nobleness of heart, decides to share the work with the rest of the world by releasing the source under one of the free licenses, we should applaud loudly.
But if a programmer chooses to release it under a non-free license, we should support their right to do so. That, to me, is what freedom is all about. The ability to decide for yourself how your work is disemminated to the rest of the world.
Anyone who claims that open source is free like speech should recognize the parallels to speech here. If you are a supporter of free speech you have to support an environment where people feel safe to express ideas and opinions that not everyone else agrees with. If you start denigrating some forms of expression, then the environment as a whole is no longer free.
Stop this "moral imperative" nonsense. Its noones moral imperative to try to dictate licensing conditions for someone elses work.
(sorry for the rant)
Games and GPL (Score:4)
Undoubtedly, some people would bend or break the rules of the game, either just for the joy of hacking, or in an attempt to gain skills or items in the game that are beyond their current means.
So, the next question is : is that a bad thing? I suppose that it is, under many circumstances, but I can imagine a game where part of the fun is to see how far you can hack the rules - within certain limits.
Second runner-up's view on Loki Hack... (Score:5)
(Man...I wish I had seen this a few hours ago!
Uh, hi. I was runner-up #2. My name's Ryan. I wrote the "server mod", which isn't really a server mod, and I'll explain in a minute. First, I want to discuss Loki Hack and ALS.
I wasn't going to ALS at all, originally. It was another Linux conference that I couldn't schedule into my life (like all Linux conferences...sigh...) but I saw Loki's advertisement for the 'Hack on Slashdot, and figured "Hhm...no prayer of beating the Slashdot masses with MY application, but I'll enter it anyway." I actually screwed up my 'Hack application, referring to the contest as "48 contestants doing 30 hours of programming"
So, needless to say, I was somewhat shocked when I checked my email one Friday night to find that I was invited to participate.
I later found out that there was only ~31 entries...20 of which agreed to show up. So much for that Slashdot effect, eh? Realistically, it was VERY short notice to put a lot of demand on a contestant's time and money...I suspect next year this may be less of an issue.
Still, I quietly took a week off from work (I wonder if I still have a job? Oh well...) Transfered some flow to my check card, and hopped in my little blue Saturn to make the drive from Charlotte to Altanta...only 3.5 hours down I-85 South. Not bad at all.
One contestant was there before me, having "hitchhiked" from Salt Lake City. Smart guy...works for MyComputer.com. Met Scott Draeker and Sam Lantiga of Loki, got my case of CD's flipped through quickly by the security guard (which was the extent of the "police harrassment" any of us got...which was MUCH less than expected by me...but I'm paranoid.)
So I popped in my custom CD-R of important data: source to FTE, glibc reference in HTML, Limp Bizkit in MP3.
Others began to arrive. The guy next to me noted there was a nametag waiting for a contestant named "Eric Raymond." As the contest started, Mr. Draeker annouced that whomever was the contestant from IBM, he need not worry; IBM's lawyers said the NDA was okay for him to sign. After a (VERY) brief overview of the code ('the "gfx" directory is for graphics, "ui" is the user interface, etc...any questions?'), we all went around the room and introduced ourselves and what we wanted to do to the code. There was a contestant from Zendragon software, who was an old-school XFree86 hacker. There was a guy from Cygnus software. Someone else was from Creative Labs. San Mehan from VA was there. Eric Raymond was not, yet. One person wanted to port to Clanlib. One wanted to redesign the tile properties to include stealth, etc. for "more realistic" tank warfare (he was a programmer from Florida working on defense contracts or something). Others talked about AI, GGI cubes, and other more-than-impressive stuff. And they were all confident this would be accomplished in 48 hours.
Needless to say, my little punk ass was feeling more than slightly underqualified at this point.
"Uh, hi. I'm Ryan Gordon, I'm a programmer in Charlotte, NC, and I haven't the SLIGHTEST clue what I'm going to do with Civ, yet. But it'll be REALLY cool when it's done."
I gave a goofy smile and a thumbs up. Everyone (myself included) probably considered the possibility of mental retardation.
Admittedly, I'd played the Win32 version of Civ:CTP for the first time the previous night. Never the Linux version. I hoped they were similar. Remarkably, they appear to be identical, minus a splash screen from Loki at the start of the Linux port.
NDAs are passed out. They are a JOKE. We may not physically remove the source from the room, but we may discuss it at our leisure publically. Anything we retain IN OUR MEMORY can be used for personal, public, commercial, and non-commercial uses. I interpret this to mean that if my memory was good enough, I could leave the hack, type in 0.5 million lines of code, and legally own it. Maybe I'm wrong. Scott Draeker is a software licensing lawyer when not running Loki, and he called the document an "Anti-NDA." He had never seen the memory clause before, and suspects he never will again. No one knows why Activision allowed that one to get by. Somehow, I don't see myself as a threat to their business, though.
The hack begins. We tore through code like we tore through the cases of Pepsi. No one says much beyond the standard jokes about the quality of the code.
A word about that. The code to Civ:CTP is...well...I've seen worse. But it wasn't great. There wasn't any documentation (but comments in the code existed...I wish there was more, and an overview or whatnot would have helped a lot...) Specifically, internally, a good portion of Civ is scripted using the "slic" engine...no documentation exists for this engine at all, in source comments or printed form; indeed, Loki didn't have this either. Script syntax and usage could only be grokked from the source code itself. This principle applies to the entire codebase. Loki developers noted to me that it took them three days to get a dialog box to draw using the aui (activision? abstract? user interface) code from civ:ctp. I didn't have that much time, but being stubborn, spent about 30 of my hours trying to grok it. I failed on that one.
This brings us to a good point. It occurred to us all, subconsciously and early on, that the best help resource was not Loki's developers (who didn't know where to point us for the REALLY obscure details we needed for really strange hacks) but rather EACH OTHER.
Okay, group hug.
Seriously, we found that the obscure details we needed were usually found by someone else, or that they were willing TO STOP WHAT THEY WERE DOING, and help us search. Amazing. Anti-contest.
Eric S. Raymond -DID- show up, and gave up on adding a new government type...no one (especially Eric) has that much free time to spend on something of that magnitude. Later on, he added more cities to the game, but mostly had other things to do with his time. I can't say I blame the man...Linus Torvalds himself would have more free time than Eric at ALS.
So the contest continued. I found myself asleep under the food table at one point around the 18 hour mark...crawled out from under there and back to my seat blurry-eyed to continue working...no one thought this was unusual.
Around 24 hours, Cartman (the quad Xeon, 1 gig RAM build server) crashed. It took forever to get it back, and the solution seemed to be disabling NFS, as it was devouring memory for those multiple copies of 80-megabyte debug binaries and such...we continued then by telnetting into Cartman and doing our work there instead of exporting the devel directories to our individual boxes. That seemed to fix it.
As the contest reached the 10-hour-left point, I -FINALLY had a good way to do my hack. The original idea remained: I wanted to play Tetris (or pong...or whatever) in between network game turns. In a 32 player game, you have TIME TO KILL between turns. I thought I'd add this to the game in a Civ:CTP dialog box. You see the failing? Writing tetris from scratch in 48 hours seemed trivial in comparison. In reality, it probably was trivial in comparison.
Also, a friend had previously suggested to me that I add an "addiction meter" to the game. Something like a popup that says "You've been playing for 6 hours and 19 minutes...this rates you as: -JUNKIE-"
So I used an old Unix philosophy: why make one BIG program, when you can have a bunch of little ones that exec() each other?
So here's my hack: I added code to Civ that will spawn external programs at the beginning and end of the local player's turn. These are specified by the environment variables CTPBEGINTURN and CTPENDTURN. The values of those variables are the file to exec(). If the variables don't exist, then no fork()/exec() is done.
But wait, there's more.
At the start of each turn, Civ can now dump out a text file of game state information. This includes network game info (can I dynamically join this game?, etc) and player info ("Brian Boru", isAlive, etc...)...uh, and other little things, like if anyone's built a space city yet.
Nothing too insecure for cheating's sake.
This file is written to $HOME/.civctp/civchain.txt (or wherever you specify with $CIVCHAINFILENAME), before the process is spawned. The spawned code can be anything with the executable bit set; a shell or perl script, binaries, etc...
This leads to a primary benefit: extensibility BEYOND the hack. Users in the open source world can add new features, roughly, through a rough interface to the game. It sure as hell isn't ideal, but it's better, in my opinion, than a slightly improved, but hereafter untouchable, AI algorithm would have been.
Some uses for this?
1) The user can spawn xtetris/xbill/xcetera at the end of his turn, and have a shell script kill off the game when his turn comes around again.
2) The user can run a program that reads civchain.txt and pops up a dialog if he's been at it too long (the addiction rater I mentioned before.) The difference is now that this isn't limited to closed-source, and it's not limited to C++ and the AUI classes.
3) The user can parse the details of civchain.txt to a pretty HTML file, and dump that onto a webserver so people can see the current status of a game by hitting the website. Indeed, I wrote this program as proof-of-concept during hour #48.
There are deficiencies, and even bugs, especially in the civchain.txt creation, but it's usable. Email me for details. My address is at the bottom of this reply.
Thanks for reading this far if you just wanted the details of the "server hack."
Eventually the judges came around. I apologized to Hemos for not having any Nanotechnology in my hack.
Lots of cool was created. Eric got all the US capitals added to the game (and we all stopped to help...taught us all how piss-poor our georgraphy skills were...we couldn't even think of all fifty states for quite awhile...of course, we were mostly on our third day without good sleep.) Daniel, who later kicked my ass at BattleTech at Dave and Busters, ported (miraculously and without a prior test run before judgement) the program to clanlib. The dude from Creative Labs got Civ:CTP running on a side of the infamous GGI cube. Joshua got a bunch of cool things done. There was a lot more, but these were the ones I remember best.
As for the future use of these, obviously the Clanlib and GGI guys should be crapping their pants when they hear about the port, and the Aztecs are a great (re)addition to Civilization. I hope my addition is at least flexible enough for some creative soul to make use of...many things (like the addition of a porcupine race...sorry, Josh!) will probably NOT be folded back into the game, but some details (like the wandering players hack) could even make it as far as the next win32 release...who knows? I doubt Loki could even be ACCUSED of getting "free labor" out of this...but Activision and Loki definitely got "free ideas"...and that's cool. Open Source isn't about code so much as good suggestions from peer review...fresh perspectives...maybe Activision will see that Intellectual Property is expanded in a new way much more so than it is diminished in the common ways through open source.
But maybe not. That's okay too; I had fun. Call me a selfish detractor from the open source movement, but I don't care if Activision opens this game up. I also don't care that I "consorted" with the enemy for 48 hours, and gave them free peer review. It was fun. I met all sorts of cool people from the Loki guys to Phil Hughes to Illiad to Eric Raymond to Liz Coolbaugh to Taco and Hemos to Scoop to that dude from Cult of the Dead Cow to...countless others. I got offered some jobs (and Scott, I'm still sending you that resume...Charlotte isn't TOO far from California, right?) by some very varied sources.
And I learned a lot. It was a growing experience. Not only did I learn more about how (not) to manage a massively large project, but I saw what great minds do when they connect. I learned that you needn't be TOO ashamed when you've been up for 45 hours and forget how a C++ constructor works. (oops.
So in the first and last Loki Hack of the century, I'd say the result was entirely positive. The only thing I would seriously change, if I had it all to do over again, would be how I attacked the code. The best plan seemed to be to plant some hooks and get out of the code base as quickly as possible.
As for next year, there's been some grumblings of plans for a Loki Hack '00, but nothing is definite. Let's just say if it goes anything like what we all discussed at the open bar after this year's event, it'll be a) VERY different, b) much better, and c) have wider-reaching effects and implications. I think you'll be impressed, whether you liked Loki Hack this year or not...I just don't want to promise things for Loki that aren't nearly definite yet, but you can get some hints from other replies to the original article.
In closing, big thanks again to Loki for the opportunity. I enjoyed every moment and got so much from it...and it only cost me gas money...everything after that, I spent of my own free, impulsive will.
Comments, questions, and everything else that isn't spam is welcome at ryan_gordon@hotmail.com.
--ryan c. gordon.
second runner-up, loki hack '99.
Interesting query.. (Score:5)
While I'm not precisely a big fan of proprietary software (about the only non-GPL stuff I ever bother to use are PICO and PINE.. which I see no real benefit to GPLing in the first place =P), I've never been all that concerned about non-free game software. Most of the software that I prefer be free are general purpose or otherwise a means to an end (and most especially device drivers ). I don't really care about the newest Quake being free software the moment it comes out any more than I am drooling all over myself to see the PlayStation 2 get "open sourced" (as someone complained that it wasn't.. the argument against closed consoles was quickly follow by retorts of "is something worthless because you can't program it? just because your toaster isn't open source you're not going to use it?" or something like that..).
When it's just a game (especially since most games have a short life expectancy), I really don't see a problem with it. I don't really think generating proprietary software in general is "evil" per se, but I certainly wouldn't waste much time on such things (aside from games.. ;). While it might be nice to see id release the code for their games a while after they come out, I don't see it as any sort of pressing issue that they be free software to begin with, or at all. Stuff you sort of have to rely on, like your operating system or other damn useful tools, I see a problem with helping along proprietary systems that simply don't work like they should (and yet get marketed as the best thing to happen to the world since.. um.. sex..? ..certain religious orders apt to disagree.. ;).
Ok, now that I've beaten my point to death and just about bored myself senseless.. Loki really isn't that bad of a company (haven't they been releasing libraries and other tools they used to create games as free software?), and since games are only for play, it's not quite the same as pushing along "the corporate machine". Now, if a bunch of hackers were invited to Redmond to get all the wrinkles out of Windows 2000 and were offered a neat new computer to the one who did the best work (and lots of notable individuals actually accepted!) then you'd have much more cause for that bad taste in your mouth.
Until then, focus on what's more important. ;)