Re:Show HN: Mini Metroidvania in 13KB of JavaScript
by peanut_worm on Tuesday September 13, 2022 @05:19PM
(#32830318)
So since you can abuse eval() in a wacky way, that means JS should be compared to compiled code? I don’t understand your point.
[ Parent
| on HN ]
Re:Show HN: Mini Metroidvania in 13KB of JavaScript
by beagle3 on Wednesday September 14, 2022 @02:46AM
(#32834008)
My point is that code density is code density regardless of underlying CPU, programming language, and libraries - up to a constant (bounded above by size of an emulator and said libraries). That’s actually very rigorously defined for those who care - and has a lot of implication. The rabbit hole starts with “algorithmic complexity” also known as “Kolmogorov complexity”.
The constants matter. It may be harder to get an impressive dwitter style output from bare NES or C64, but there a 32, 64, 128 and 256 byte demo “micro scene” for c64 and DOS that pumps out very impressive stuff for the size - some that would even be impressive on dwitter.
Most NES code is tight (due to constraints). Most JS code is not (there are essentially no constraints) but that’s not inherent, as is shown with demos and proven by kolmogorov solomonoff and chaitin.
Re:Show HN: Mini Metroidvania in 13KB of JavaScript
by aricz on Wednesday September 14, 2022 @07:39AM
(#32835771)
Speaking of 256 byte demos, I have to push these out http://www.youtube.com/watch?v=f1joQfp78Yo (tube by 3SC) and https://www.youtube.com/watch?v=QdaMbGPEXV8 (A Mind is Born by lft).
Impressive stuff indeed.
Re:Show HN: Mini Metroidvania in 13KB of JavaScript
by aidenn0 on Tuesday September 13, 2022 @06:51PM
(#32831181)
While we are being pedantic I seriously doubt either Metroid or Castlevania was compiled, given that most NES games were written in 6502[1] assembly.
1: 6502-ish, it was a clone with the BCD instructions disabled.