2013 - Spring!
Competition rules 2013
All submissions must not be bigger than 1k
That means no linking, no including and so no using of any external resources. You are free to submit your 5 minute intro video or coffeescript interpreter in your submission though, as long as the server permits you to. And no, you may not use another submission in your submission. Your submissions should be able to be put in a single script tag (see the shim) and should work offline from the start.
Deadline is Sunday, March 31st 2013
The submissions automatically close at midnight my time (CET, which is UTC+1)
Only one submission will compete per person
But you are free to submit as many demo's or updates as you want (but try not to make me mad please, I manually check and ok these submissions). Judges can submit but their entries will not compete (they're aware :). The jury will only consider your LAST submitted entry! And you obviously can't submit an entry after the deadline passes.
Anything goes for golfing
Do not worry about Crockford's wrath. Your submission does not need to pass jslint, style guides or anything like that. You may compress your submission in any way you can, as long as the result still runs in the browser. It MUST run in the browser, in the provided shim. That (and the other rules on this page) is pretty much the only restriction.
Your demo must work in three browsers
The target browsers are Firefox, Chrome, and Opera. Your demo must run in any of them, without a problem. Speed is not my concern (but might be of the judges). Internet Explorer and Safari are not included because they require a spefic OS (windows/osx). Specific versions:
- Firefox 18
- Chrome 24
- Opera 12.13
But really, your demo should just work in all browsers. Standardization has come a long way. When push comes to shove the jury can apply browser versions for a verdict. These rules are in place to prevent dirty browser specific hacks. I hope that the result will be a more "pure and generic" js demo. Not just something that works because one browser implemented something nifty (like sharp variables in Firefox).
Your demo must work in the provided shim
And in case it matters, the demo must work when the shim is put in the frameset all demos are running in. The entire submission will be put in the provided shim. All demo's do this so we're all on the same level. The shim provides three variables. The shim is very simple and provides a
canvas element. The
a variable contains a reference to the context (
canvas.getContext('2d')) of this canvas. Var
b contains a reference to
c contains a reference to the
Your demo should just work
- Must not crash in any of these browsers (no syntax or DOM errors)
- Should behave approximately equal in all browsers
- Platform shouldn't really matter (especially since it should work in all browsers)
- Speed is not my concern, but might impact a jury verdict
Other things you should know
- Your demo does not need to be visually appealing (certainly not to be submitted and listed on the site!), but it tends to help... it must do something though, even if it just outputs to console
- Your entire submission will be put in the script tag in the provided shim (the above rules assume this)
- Your script may not mess with the frameset, break out of its frame, read/write anything that's not in its own frame, force a reload of the page or redirect the user to another site
- Your script may not "phone home". That includes saving high scores etc. The exception is a button/link to tweet, if you have room left for it
- Do not submit HTML soup. It will be rejected. Your entire submission should work inside script tags (don't be smart, you cannot use
- Test your minified script result in the (entire!) shim. There's a reason we provide it. Paste your script in the proper position before you do. The
c variables are fixed, so make sure tools like Closure don't change their name.
- Audio and video are in. WebGL is out. Be careful about codecs and target browsers...
- The theme Spring is only a suggestion, it's not a requirement
I have a final say in things
I think I'm reasonable enough but I reserve the right to reject anything. This hasn't happened before and I don't think it will this time, so don't worry :)
Tips & Tricks
document.body will be available when your code executes!
document.body.children is available
- When minifying, beware that the boiler plate variables must remain the same! Make sure you test your submission in the same before actually submitting
- Firefox does NOT support exposing element id's as globals. Please don't assume this again and again.