IOCCC19 Billiards
A failed attempt at taking part in 19th IOCCC.
There’s a new “One Game A Month” project which has just started at January, with aim for developers to make game each month for a year (or more). Although it’s February already, there’s still time to start and submit for January as well, the first month being a special case where you can submit late entries.
I didn’t do anything new for the January and thought about skipping that month already, but then I decided I could just add some older thing for the January entry, and here it is…
For the 1GaM I’m submitting my original try for taking part in the 19th IOCCC. The game is called IOCCC19 Billiards. The source code was too big for the rules set in the IOCCC contest (6 years ago!). Even in obfuscated and minified version, which is why it never took part in it. But now it gets to be in the One Game a Month. And since the C code is included, both in somewhat original and obfuscated form, maybe somebody will get a bit of joy out of it, even if the game itself isn’t much to show.
Click to download (Executable for Windows, source code included)
Note that I actually have mentioned an early iteration of this thing already in this Google+ post. That post links to the 1st iteration, made with Processing, if you want to check that version out and compare. The C version is better since it has a hole in the middle where you can drop the balls into. :)
Update early 2019: Since Google+ is shutting down, I’m adding here the content of the blog post originally referred to in the above paragraph, for archival purposes.
Dec 23, 2011
IOCCC is being held again for the 20th time. There’s still time to take part! http://www.ioccc.org/
I’m probably not going to make an entry, but I thought I could write a bit about my unfinished try for the previous one. I wrote a little skeleton of a “billiards” game, with balls implemented as simple particles having a radius, moved with Verlet integration as described in the famous character physics paper by Jakobsen. So, nothing special there.
My approach was that I first wrote a little proto with Processing. After I got that working, I rewrote the thing in C (using SDL and OpenGL), and then made an obfuscated version. In the C version I also added a hole in middle of the playing field where balls could drop, which is missing from the prototype version. Unfortunately I couldn’t squeeze the final version to fit in the size limit of 4096 bytes (or 2048 excluding whitespace), not even if I cut some features. So I just forgot about the thing.
Now, a few years later, there is WebGL and Processing.js, and just so happens that I was able to do some minor modifications to my original prototype version and just easily export it to run in WebGL-capable browsers. The processing sketch source is included.
http://iki.fi/jetro/sketches/ioccc19_ballphysics/
If I get requests, I might release the C version as well, but I think I keep it under wraps at least until the IOCCC #20 deadline passes by. ;)