JS1k: The JavaScript code golfing competition

2015 - The JS1k hype train is real!

Home   Rules   Demos   Submit Mailing list  |  Update demo meta data  |  The /r/js1k subreddit JS1k, the yearly JS code golfing competition

Competition rules 2015

  1. Size limit is 1024

    That is 1024 bytes, not characters. The server will enforce this.
  2. No externals

    So, to clear up some confusion here are some do's and don'ts:

    1. Network resources are strictly forbidden.
    2. Local file upload is out.
    3. No "copy/paste the contents of this pastebin into this field and press go" shenanigans.
    4. Allowed APIs: WebGL, Local File (for dynamic files/blobs), WebWorkers (dynamic), Fullscreen, (Mouse) Pointer Lock API, AudioContext
    5. Also allowed but your demo may not depend on: Webcam and Microphone (getUserMedia), Geolocation, Orientation
    6. Disallowed APIs: WebRTC / OpenRTC, WebSockets, Local Storage, cookies, etc, Ajax, Vibration, Battery, Shared Worker, Service Worker
    7. ES6 is out. Probably allowed next year.
    8. WebVR API demos do not compete :( But you may submit them, if they are feasible in 1k.
  3. Must show something on its own

    Your submission must at least have a visual cue (not console/library only) and should be capable of running on its own content. No white screen of death. Additionally it may ask additional input to change some input parameters. Consider this; we want to prevent an image processing demo that shows a nearly blank screen unless you allow webcam access. It should reasonably act the same way when different input is given. If your demo effectively does nothing I will reject it. Judges are instructed to judge in a similar way.

    Good examples: 1, 2, 3.

    Bad examples: noop library, missing default, requires copy/paste.

    Allowed: needs mouse hover (even though that won't work on mobile...)
  4. Must work as is in the provided shim

    There is one shim for all demos. It feats the following. ("optional" means you can configure it when submitting your demo)

    1. the body tag exposed in a global var
    2. a fullscreen canvas element, tag and context exposed in a global var (optional)
    3. WebGL shim (same as last year) and 3d context (optional)
    4. demo restart function (top.reload()), it's the same as pressing the button and will restart your demo.
    5. normalization of vendor prefixed API's (please notify me if something needs unprefixing/normalization)
  5. May not escape the iframe

    Don't touch top or parent. Exception: top.reload(). You're allowed to adjust the url hash as long as you don't reload the page.
  6. Must be received before it is March 15th in CET

    Form submission automatically closes February 28th March 14th 2015, midnight CET (Central European Time, that's GMT+1). The deadline has been extended by 2 weeks! When in doubt remember this; if I'm in March 15th, you'll be too late ;)
  7. Must work in at least two common desktop browsers

    1. And at least one of them must work under Linux
    2. Opera counts as Chrome (they are identical under the hood)
    3. In general your demo should just work across the board
    4. Must not need additional installations of plugins (so it should work "out of the box")
    5. Mobile support is not a requirement but it would be nice, no? Mobile only demo's are out.
    6. ES6 is out for this year, stick to ES5.
    7. If an HTML5 API needs un-prefixing tell me so I can add it to the shim
    8. Current browser versions: CH39, FX35, IE11, SF7, O27
  8. Theme is optional

    It is only a suggestion for inspiration. If you don't like the theme or had something else in mind by all means go for it.
  9. One entry per person competes for a prize

    You can submit multiple demos but only the last entry you submit can compete for prizes. The judges will not consider on older submissions. If you're submitting as a group please use a separate email and let me know about it (in the DM). The judges and myself may submit a demo but it will not compete for prizes.
  10. When in doubt: I decide

    And if it concerns an interpretation of the rules I will consult the judges on a verdict.