• Create Account

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

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

65 replies to this topic

### #1rip-off  Moderators

Posted 23 October 2013 - 06:16 AM

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

//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...

Edited by rip-off, 01 December 2013 - 02:59 PM.

### #2Ohforf sake  Members

Posted 23 October 2013 - 06:33 AM

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...

### #3TheComet  Members

Posted 23 October 2013 - 06:51 AM

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

### #4SiCrane  Moderators

Posted 23 October 2013 - 06:52 AM

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

### #5rip-off  Moderators

Posted 23 October 2013 - 06:54 AM

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!

Edited by rip-off, 23 October 2013 - 06:55 AM.

### #6rip-off  Moderators

Posted 23 October 2013 - 06:57 AM

Does commenting out lines count as "adding code"?

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

### #7CombatWombat  Members

Posted 23 October 2013 - 07:10 AM

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.

### #8rip-off  Moderators

Posted 23 October 2013 - 07:26 AM

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.

### #9SiCrane  Moderators

Posted 23 October 2013 - 07:55 AM

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.

### #10mhagain  Members

Posted 23 October 2013 - 08:12 AM

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.

Edited by mhagain, 23 October 2013 - 08:12 AM.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.

### #11TheComet  Members

Posted 23 October 2013 - 08:30 AM

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

### #12wintertime  Members

Posted 23 October 2013 - 08:41 AM

No need to:

#if 0
#define ( =
#endif



### #13TheComet  Members

Posted 23 October 2013 - 09:16 AM

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

Edited by TheComet, 23 October 2013 - 09:16 AM.

"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

### #14froop  Members

Posted 23 October 2013 - 09:31 AM

#define 0 1

### #15SiCrane  Moderators

Posted 23 October 2013 - 09:38 AM

Fortunately, you can only #define identifiers.

### #16Memories are Better  Prime Members

Posted 23 October 2013 - 09:40 AM

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

### #17Alpheus  GDNet+

Posted 23 October 2013 - 09:48 AM

Why don't we use HTML5 and Canvas?

External Articulation of Concepts Materializes Innate Knowledge of One's Craft and Science

Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley

If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts

Spoiler

### #18TheComet  Members

Posted 23 October 2013 - 10:05 AM

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

### #19Memories are Better  Prime Members

Posted 23 October 2013 - 10:20 AM

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

### #20rip-off  Moderators

Posted 23 October 2013 - 11:43 AM

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

Edited by rip-off, 23 October 2013 - 11:44 AM.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.