April 1 is Source Code Amnesty Day (it happened!)

Would it not make sense to share the “best” part of your game as opposed to the whole thing? Or perhaps, create a library (after the fact) of really good game mechanisms and categorize them by platform/solution.
For example, all good inventory systems could go into an inventory system library, sorted by platform or development language.

Then we’d have a very concise library of very good snippets to reuse in our preferred code base.

1 Like

Wow, very cool that folks are into this! I’ve updated the thread title accordingly. Couple thoughts/responses:

That makes sense – I was figuring it’d make sense to have each year’s Amnesty Day largely apply to the previous year’s released games (why yes, I’m already assuming there’ll be Amnesty Day 2024).

Ha, that’s much more rational! I wonder if the difference is because the source code for some systems is hidden by default – it’s inevitable that there’ll be typos when we write email but we just kind of assume that’s the case (and see everybody else’s), for example, whereas having to make a decision on whether to release the source code activates critical faculties that otherwise lay dormant?

It may be against the spirit of the day, but I would love to take you up on this at least as to Eleusinian Miseries – I have a perverse hope my cack-handedness will overcome your positive thinking and you won’t be able to find even one thing to praise :slight_smile:

This is actually a profound and encouraging point – I actually do take a fair bit of pride at being able to whip up 80%-correct solutions without too much trouble at this point, and that’s usually good enough (except when it isn’t…)

Having tested some of your game and seen how sophisticated and smooth it is now, I’m amazed by this! But yeah, my first game has some commented-out stuff that’s pretty much copy-and-pasted from the first couple of examples in the Inform docs :slight_smile:

OK well I’m not sure zarf got the whole “flood the zone with awful code” part of the idea, but this would be amazing!

Oh, good point, I forgot the IF Archive lag – I’ll try to get mine in early too.

Oh, this is very cool, thanks for linking! The one for Copyright of Silence is especially interesting, since that’s an odd duck in gameplay terms too.

At least as to my code, I think you are radically overestimating the amount of organization and modularity I can typically achieve :slight_smile:

9 Likes

No, the point is to get it all out there. If you sit around agonizing about “what’s my really good code”, you’ll post one cleaned-up example and then give up.

11 Likes

Having the source code to my hypertext games out there has meant several people submitting typographic or spelling fixes, and one full-blown translation into Portuguese. I suppose I could’ve found the former embarrassing but I just think of it as preventing future embarrassment!

11 Likes

Happy to join in on this! I plan to upload the final release versions of my Inform 7 source code for Border Reivers and Napier’s Cache. I’ll upload the source code to IF archive but also link to it from IFDB. It does help that it’s all some years in the past for me. I’m pretty much past caring how the code looks! And this is a great initiative. Also thanks to @zarf for the heads up on his blog. I might have missed this thread otherwise.

4 Likes

Just FYI. I already released the ScottKit source code for my game, The Golden Goose here. Permission granted if you want to archive it to IF site wherever…

There are some good suggestions for improvement. Alas, I neglected to implement them. :sweat_smile:

8 Likes

I’ve been thinking of making my source code available for quite a while, but there always seems to be something more urgent that needs to be done first. This initiative gives me a reason and a target date to aim for.

6 Likes

I will release some extensions on 4/1. It’s still source code. :grinning:

4 Likes

Well I’ve just started early, uploading the source code for my two released games to the IF Archive. Just a copy and paste, simple original code, no additional commentary. I will link it from the IFDB pages when it gets to the right bit of the archive. This allows some time for that and I’ll hopefully be done by 1st April! I considered adding extra commentary, but that was a deterrent and more effort. So I’ve just splurged the code as is. Saved as .txt files with “-Inform7” added in the file name. This feels remarkably freeing! Thanks for the encouragement :stuck_out_tongue_winking_eye:

6 Likes

I recommend checking out the released source code to my games, if this is what is holding you back. :smiley: (In that archive, I even release source of unfinished and misconceived games. I recommend it! ‘Everything’ is the easiest selection criterion.)

7 Likes

For Inform 7 games, what is the recommended practice? Extract the .ni file from the .inform and bundle it with the .materials folder?

3 Likes

I’ll aim for next year, since I’ll want to do a post-festival release unless my game is a humiliating bomb. I don’t have any comments yet, either–it’s been busy busy just trying to have things ready for ST.

I’ll put a reminder in my calendar!

6 Likes

That’s what I’d do if the .materials folder had significant content (images, etc).

Extensions are important for recreating a project. But if all the extensions are findable versions, you could skip them and just include the list of extension names with (exact) version numbers.

Skip materials/Release – that can all be recreated.

3 Likes

For those of us who have never done such a thing before, can someone give step-by-step instructions (as to a small child) for how and where to do this?

7 Likes

The simplest way, for an Inform 7 project, is to say “Release along with source code.” at the top of your file and then click Release. This will make a website that presents the source code nicely (and also lets it be downloaded as plain text).

6 Likes

I agree with all the methods listed above. For my personal interest, I’ve found it most useful when reading source code to see it presented as a single text file, so when I release mine, I just copy my whole file into a .txt and share that, since then you can click on it on mobile, for instance.

But that doesn’t work well for some things.

9 Likes

Like, automatically? I don’t need to upload it anywhere?

Where? On IFDB? And doesn’t the txt file do weird things with formatting? Does that matter?

5 Likes

Either the site (which is a set of html files) or the text file would still need to be uploaded somewhere – I’m planning on just using the IF Archive per usual. There’s a “source” directory that’s probably the best fit:

https://ifarchive.org/indexes/if-archive/games/source/

Then once it’s uploaded, you can just link it from the game’s IFDB page!

6 Likes

Yeah, Mike is right. And I haven’t had trouble with formatting yet; here’s an example for my game Ether:

https://ifarchive.org/if-archive/games/source/inform/EtherSource.txt

I’m pretty sure it compiles by just copying and pasting it.

5 Likes

To be more specific: you will usually want to archive the released web site as a .zip file. On MacOS, you’d open the project.materials directory, right-click on the “Release” folder, and select “Compress Release”. This creates a “Release.zip” file when you can then upload at IF Archive File Upload .

On Windows, you’d do the same thing by right-clicking on “Release” and selecting “Send To > Compressed (zipped) folder”.

(I know that earlier I said “omit the Release directory.” In that message I was thinking of people who are comfortable working with individual files. If you’re new to this whole process, it’s easier to use the “Release along with source code” directive, hit the Release button, and then wrap up and upload the project.materials/Release directory.)

5 Likes