Skip to main content
GameDev.net gamedev.net
🔒 Locked

The great GD.net collaborative coding horror experiment? (...and the results are in!)

Started by rip-off Oct 23, 2013 at 12:16 PM 64 replies 26.8k views
Original Post
rip-off
rip-off

//EDIT: See THIS POST (from page 4 of this topic when viewed with default settings) for the "results".

//EDIT: See THIS POST (from page 3 of this topic when viewed with default settings) for revised rules and links to the actual topics.

Possessed Inspired by this thread, I was curious as to what would be the outcome of a game developed collaboratively right here, with the main rule being You can only add new code, not alter or remove existing code. I'm not sure if this has been done before, while I am vaguely reminded of something gone before I cannot find any thing.

Here is how I see this "working" (or, as is perhaps more likely, going up in flames):

  • I will post a basic skeleton program. I'm thinking C++, SDL 1.2.X or SFML
  • Posts here will act as a kind of revision (un)control system, each post a "commit"
  • You must attempt to amend the current version of the code (revision number?)
  • The code change for a single "commit" should be relatively small and cohesive - add or change a single feature at most
  • Posts should highlight what was changed (if possible using a diff?)
  • Posts should include the full source of the program so far
  • The program will be in a single file only
  • Dependencies are limited to the standard library and the multimedia library only. No OS-specific calls
  • Assets may be attached to your post, they should be free of copyright restrictions
  • You can only add new code, not alter or remove existing code
  • You may, however, alter numeric or string constants in existing code
  • You may add code into existing lines:
    • Add a new clause to a condition
    • Add to an existing expression
    • Add parameters to existing function declaration/definition/call sites
    • Adding // at the start of a line is allowed by this rule (?)
    • You may also "insert" a newline after a //, thus uncommenting such code
  • The code must compile on your platform of choice, and should strive to be cross platform
  • The code must not crash, to the best of your ability
  • Bad commits are ignorable under the "amend the current version" rule

I don't know whether there should be a theme. A theme might help focus the initial work, but I think lacking a theme could have some hilarious results.

Any thoughts? If there is sufficient interest, I could post the initial version sometime soon, perhaps at the weekend (Halloween seems topical). Of course if it has all been done before I will just slink away quietly...

Ohforf sake
Ohforf sake
The "code can't be altered" rule can be circumvented by duplicating the code and using version numbers in the function/variable names. But then again, on the other hand, if a bug is found in some existing piece of code, you want some kind of mechanism to be able to alter it...
TheComet
TheComet

Does commenting out lines count as "adding code"? Theoretically, the lines to gain in character count...

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
SiCrane
SiCrane

Well if the language is ruby, then you can add monkey patch code.

rip-off
rip-off

The "code can't be altered" rule can be circumvented by duplicating the code and using version numbers in the function/variable names.

Good point, but I think the intent here is more the spirit rather than the letter. The rules are just to give some structure.

But then again, on the other hand, if a bug is found in some existing piece of code, you want some kind of mechanism to be able to alter it...

Working around existing bugs is part of it!
rip-off
rip-off

Does commenting out lines count as "adding code"?

I'm not sure if commenting should be allowed or disallowed, or maybe just discouraged.
CombatWombat
CombatWombat

This is the coding equivalent of a Dwarf Fortress Succession game.

Doomed to failure. Bound for hilarious greatness.

I think a theme is a good idea, though.

rip-off
rip-off

Well if the language is ruby, then you can add monkey patch code.

I am open to suggestions on the language and libraries, but I was hoping for something reasonably popular, but not a "framework" like XNA or a full engine like Unity.

I like Ruby, but I don't feel it quite meets the popularity criteria around here.
SiCrane
SiCrane

Pity. Nothing quite a hard to follow as heavily monkey patched ruby. Especially if different versions of the same function get called at different times.

21st Century Moose
21st Century Moose

I'd vote for plain-old ANSI C. It's simple enough, everybody knows it, and it's got huge potential for creating an awful mess.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 
TheComet
TheComet

I'd vote for plain-old ANSI C. It's simple enough, everybody knows it, and it's got huge potential for creating an awful mess.

I second this.

I'm still not sure how the "don't remove code" thing should work, because I can basically screw all of you by doing things like:


#define ( =

I think it should be acceptable to comment out lines that you want to remove.

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
wintertime
wintertime

No need to:


#if 0
#define ( =
#endif

tongue.png

TheComet
TheComet

...I have just been convinced to not use comments. rolleyes.gif

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
froop
froop

#define 0 1

SiCrane
SiCrane

Fortunately, you can only #define identifiers.

Dynamo_Maestro
Dynamo_Maestro




The program will be in a single file only
..
Assets may be attached to your post, they should be free of copyright restrictions

I have never used SDL or SFML, do they not require effect files like DX / OpenGL? or would they be considered as an asset

TheComet
TheComet
I have never used SDL or SFML, do they not require effect files like DX / OpenGL? or would they be considered as an asset

You can inline the effect files as std::string

"I would try to find halo source code by bungie best fps engine ever created, u see why call of duty loses speed due to its detail." -- GettingNifty
Dynamo_Maestro
Dynamo_Maestro
I have never used SDL or SFML, do they not require effect files like DX / OpenGL? or would they be considered as an asset

You can inline the effect files as std::string

But that would make things bloated and difficult to work with, oh wait.. ;)

For the sake of added confusion, I think the use of goto should be encouraged

rip-off
rip-off

I have never used SDL or SFML, do they not require effect files like DX / OpenGL? or would they be considered as an asset

For simplicity, I was thinking the game would be 2D sprites. I was thinking the skeleton program might just be a bouncing ball or something.

I'd vote for plain-old ANSI C. It's simple enough, everybody knows it, and it's got huge potential for creating an awful mess.

I was considering C, but I figured some people would probably end up using C++isms anyway, by accident. Including me, in the skeleton program (whoops!). I think that more people would be comfortable with C++, rather than pure C.

Why don't we use HTML5 and Canvas?

Again, I'm not sure that is quite as popular as C++ here. I think the experiment will live or die on the number of participants it could garner. I'm open to correction here, but I didn't really want to start a formal poll.

Nothing quite a hard to follow as heavily monkey patched ruby.

I'm still not sure how the "don't remove code" thing should work, because I can basically screw all of you by doing things like...

Well, my initial idea was that the code wouldn't be intentionally poor - but instead it would turn out that way over time due to the difficulty extending the game while adhering to that rule.

Now, if people prefer to treat this as a IOCCC entry where the code is intentionally crazy, then sure. In that case, the rule makes less sense, though I think it still has some value to preserve the collaborative nature, i.e. preventing someone replacing the whole program with something completely different.

I think it should be acceptable to comment out lines that you want to remove.

I think that would be OK. Then again:

For the sake of added confusion, I think the use of goto should be encouraged

Why not just jump over the offending code? >=D

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.