Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
4k Clojure Demo Competition
Clojure Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
resources/META-INF
src
test
.gitignore
README.md
build
project.clj

README.md

4k Clojure Demo Competition

Me and Martin were discussing the feasibility of this and quickly ended up in a debate about the rules, which he won. More or less, your demo has to be a 4k stripped Clojure jar, that can be run like this:

java -cp clojure-1.4.0.jar:target/four.jar four

$ ls -l target/four.jar
-rw-rw-r-- 1 hraberg hraberg 1957 2012-08-22 12:00 target/four.jar

$ unzip -l target/four.jar
Archive:  target/four.jar
PACK200
  Length      Date    Time    Name
---------  ---------- -----   ----
       41  2012-08-22 12:00   META-INF/MANIFEST.MF
     1670  2012-08-22 12:00   four.class
     1570  2012-08-22 12:00   four.clj
---------                     -------
     3340                     3 files

Rules

Fork and go. The bash script build will produce (and run) a jar that satisfies the limitations. Dependencies and resources are allowed, but obviously need to fit the size limit. PACK200 is allowed, as is ProGuard, which the build script uses. Pulling resources from the network or local drive is not. We're planning to support OpenGL, see below.

Example

four.clj is an experiment that sets up a few seqs / fns for rendering over a timeline in Graphics2D. The animation itself is just a flickering of colors, but will obviously soon evolve into a magnificent real time path tracer.

OpenGL

nehe-lesson-02.clj is Nehe's classic "Your First Polygon" lesson using JOGL and a minimal GL wrapper, minigl.clj (optional - it counts towards the bytes!). The build doesn't properly take OpenGL into account yet, but this can be run using:

lein run -m nehe-lesson-2

Music

I've started working on a very rudimentary software synthesizer, vlead.clj in pure Clojure using javax.sound.sampled for output. This one isn't optimized for size as it needs to work first.

References

Java4k Game Rules

scene.org Best 4k Intro (2011)

Assembly 4k Archive

Notch's Left 4k Dead (Persson, 2009)

The Art of Demomaking (Champandard, 1999) over at flipcode which just (Aug 22, 2012) relanched!

4k intros and tutorials (Quilez, 1994-2012) 4k winner at [Breakpoint](http://en.wikipedia.org/wiki/Breakpoint_(demo_party\)) 2009-2009.

Something went wrong with that request. Please try again.