4 ms·
Snake Game in 56 Bytes
- comboy 2y agoThis is ridiculous. So many clever tricks.
- pezel1 2y ago[flagged]
- kristopolous 2y agoThat's wild. Whats going on here?
- efilife 2y agospamming
- kristopolous 2y ago4 year old account, 1 comment? Is this maybe from those blocks of accounts you can buy on the black market?
- saefstroem 2y ago[dead]
- gnabgib 2y ago57 bytes (36 days ago): https://news.ycombinator.com/item?id=42348294 https://news.ycombinator.com/item?id=42348294 61 bytes (2024): https://news.ycombinator.com/item?id=38962792 https://news.ycombinator.com/item?id=38962792 67 bytes (2023): https://news.ycombinator.com/item?id=38060165 https://news.ycombinator.com/item?id=38060165 85 bytes (2023 - Popular, 134 points, 24 comments): https://news.ycombinator.com/item?id=36999463 https://news.ycombinator.com/item?id=36999463 89 bytes (2023): https://news.ycombinator.com/item?id=36940010 https://news.ycombinator.com/item?id=36940010 100 bytes (2023): https://news.ycombinator.com/item?id=36933804 https://news.ycombinator.com/item?id=36933804 134 bytes (2023): https://news.ycombinator.com/item?id=36733256 https://news.ycombinator.com/item?id=36733256
- wkjagt 2y agoVery cool that these are all iterations on the same idea by the same person, over a span of a year and a half. The one that had one byte more than today's version was 36 days ago. I really admire their persistence.
- boguscoder 2y agoRepo has 400+ commits, granted a lot of them are for web demo etc, but this just highlights that sometimes doing really small amount of anything (world limit on peer reviews, anyone?) is often a lot of work
- laurentlb 2y agoFor example, this commit seemed like a lot of work to save a single byte: https://github.com/donno2048/snake/commit/bd6bcb1a1477f281305066c737ed02af4ab466ca https://github.com/donno2048/snake/commit/bd6bcb1a1477f28130...
- lifthrasiir 2y agoI think it's actually a modest change, the diff looks much longer because registers have been renamed and swapped all over the place.
- deleted 2y ago[deleted]
- trollbridge 2y agoHas anyone gotten this to work on an actual PC? It runs way too fast, even on an original XT (I'm guessing the keyboard controller isn't the same as js-dos).
- gaogao 2y agoAdding in a 100k iteration or so busyloop to the beginning of the food segment should do the trick and only add a few bytes. You could do something fancy with the clock interrupt, which is a bit more portable and stable, but might cost a few more bytes.
- rep_lodsb 2y agoCould add a single byte 'hlt' instruction, assuming interrupts are enabled. This would delay until the next timer tick (55ms) or key press/release.