4 ms·
Bouncing Beholder, my winning JS1K entry (2012)
- jitl 2y agoThis person is also the author of CodeMirror and ProseMirror, the best choices in my opinion for plain text editing and rich text editing respectively for the web platform
- degun 2y agoAlso, the author of "Eloquent JavaScript", the book from which I learned the language. Endless respect for Marijn.
- KingOfCoders 2y agoI wrote boot sector stuff (1k) on the Amiga (68k assembler). Today I wonder if I could have written a game (tech wise and skill wise).
- ASalazarMX 2y agoDefinitely. For example, a boot sector Space Invaders in 512 bytes. https://github.com/nanochess/Invaders https://github.com/nanochess/Invaders
- KingOfCoders 2y agoIt depends on your video memory and how it is structured. Also as I've said, skills ;-)
- ASalazarMX 2y agoNo need for graphics. In the 80s, when MS-DOS was popular but graphic cards were expensive, ASCII games were very popular and pretty fun. Not having bitmaps greatly reduces binary size. https://www.dosgames.com/tag/ascii https://www.dosgames.com/tag/ascii
- rob74 2y agoSee also: https://en.wikipedia.org/wiki/Beholder_(Dungeons_%26_Dragons) https://en.wikipedia.org/wiki/Beholder_(Dungeons_%26_Dragons...
- mohsen1 2y agoI did a JS1K back in the day [1] such a fun concept! I wonder these days if anyone is using multi-character emoji (don't know what do you call those exactly) to compress more data in 1024 "bytes"? Since HackerNews does not allow emojis, here is a demo of what I mean: https://output.jsbin.com/nebemihuhe https://output.jsbin.com/nebemihuhe [1] https://js1k.com/2013-spring/demo/1426 https://js1k.com/2013-spring/demo/1426
- gorkish 2y ago“Bytes” is not an arbitrary definition in the contest. Any use of an emoji takes 4 bytes. Some of these new combined ones can be 25+ bytes when accounting for zero width joiners, variant selectors, and modifiers. Technically you can pack nearly as much data as you like into a single legal Unicode glyph (think infinite zalgo text) if you just want to have the thought experiment. Unicode is a nightmare, but I’m glad everyone agrees to share the same nightmare.
- mohsen1 2y agoThat explains it!
- lifthrasiir 2y agoFor the record, JS1024 [1] is a de-facto spiritual successor to JS1K nowadays. [1] https://js1024.fun/ https://js1024.fun/
- wonger_ 2y agoAnd sorta similar: https://js13kgames.com/ https://js13kgames.com/
- leptons 2y agoGo have a look at https://beta.dwitter.net https://beta.dwitter.net - many of the examples there use this technique to fit more than 140 bytes into the "dweet" (many are also less than 140 characters, so don't need to use this compression technique). There is a convenient "compressed" switch to "decompress" the code. The rule on dwitter.net is no more than 140 characters (not 140 bytes).
- calibas 2y ago> I've heard people wax poetic about programming old, limited-memory machines. I wouldn't know anything about those---at the time they were current, I was writing rudimentary number-guessing games in BASIC. But doing this competition entry gave me a taste of what they might be talking about. One rather big difference here though, the limitation is on the size of the code, not the compiled binary. Most of the "optimizations" here have little to no effect on the code after it's compiled. With older computers, instead of removing line breaks from the code, you're doing things like tweaking compiler flags to shrink the size.
- TazeTSchnitzel 2y agoWith older computers you're handwriting assembly generally if you actually want to get the most out of them.
- ASalazarMX 2y agoI think he meant for competitions that judge binary size. Handwritten assembly could even increase the size (like unfolding loops) and it wouldn't matter if the speed was improved.
- kookamamie 2y agoTo those it was not obvious - the result of the entry is the top banner, a keyboard-controllable "game".
- madflame991 2y agoI can't recommend "return true to win" (https://alf.nu/ReturnTrue https://alf.nu/ReturnTrue) enough to learn how to golf JS. I think it's more accessible to learn one 10-20 char snippet at a time than a big project like a 1k submission.
- 66yatman 2y agoMarijn wants to eat all the money . Love you bro.