Show HN: Mini Metroidvania in 13KB of JavaScript (arineonshark.itch.io)
As part of the annual JS13K games challenge, I've put together a pretty large (but small-in-code) Metroidvania game that fits in just 13KB of compressed Javascript.
The source is available here: https://github.com/arikwex/infernal-sigil
NOTE: the current head of the main branch is at 13.6KB due to quality of life patches. The legit 13KB version is tagged in github.
Useful hacks: - Using Roadroller (https://github.com/lifthrasiir/roadroller) for compression - Compressing the map data as grayscale PNG paired with some code generation. - Using procedural animation for all characters. - Replacing string enum with numeric enums for compression. - Built a small game engine for object lifecycle and rendering. - Single function to generate unique procedural songs for different regions.
82 comments
[ 3.1 ms ] story [ 130 ms ] threadThere's nothing useful about this kind of negative comment.
"Negative comment" my ass. It literally starts with the words "great work". That's a clearly a supportive comment.
Even the atmosphere. It had - dark themes, 'creepy, dungeon' music, Skeletons, Spike traps, Spiders, and the Map screen we've seen since SOTN.
Lastly, you can start a comment however you like that doesn't make the comment that way. I could say, "Great work! For a worthless pile of garbage like yourself" and I don't think anyone could argue that because I started off my saying, 'Great work' that the comment was positive, maybe that it was supportive! (But again, I don't think the comment was negative, no matter how much I disagree with it)
What do you think is missing for it to be called a metroidvania?
I don't mean to come off as a retro-gaming connoisseur, but there's a certain feel and atmosphere to the Metroidvania branding - it's more than a sub-genre - and it shouldn't be taken lightly.
Which other NES or SNES games take place on one continuous map that you backtrack with new abilities to find a way to progress?
Edit: that you wouldn't consider a metroidvania, I mean.
https://es.wikipedia.org/wiki/Rygar -- genre: metroidvania
https://en.wikipedia.org/wiki/Faxanadu -- wiki categories include metroidvania. style: "like castlevania".
The thing you're also missing is that a {castle,metroid}vania is a 2D side-scroller, so Zelda, Metal Gear, and friends are not.
This kind of "umm actually" stuff is boring.
Spanish wikipedia, while English wikipedia says something else. Did you hunt with Google until you found some lone source citing it as "Metroidvania" just to try get a point across?
> This kind of "umm actually" stuff is boring.
Yet you dug deep into it.
Or maybe he's just Spanish
My point is that you create a lot of noise when your "corrections" aren't actually correct. It's basically nerd sniping to be wrong on the internet, especially about games.
Yes, I'm contributing to the noise. But I'm correct, so it's okay according to unwritten HN guidelines.
Non-linearity and ability-acquisition are the only essential elements. There's often platforming, a certain isolation-vibe, and a large single map, but those aren't mandatory to get the label.
One notable difference is that there is rarely benefit to backtracking into previously completed dungeons. Even for 100% it is often possible to get everything with the first pass (without even using glitches or unintended interactions), which is not like most metroidvanias. However, most Zelda games but the games do tend to favor overwold backtracking for optional rewards.
It's all very jumbled: https://imgur.com/a/1PNTW7E
(I recommend browsing through the https://www.dwitter.net/top/year top section to get more example of "demos that fit in a twit".
1: 6502-ish, it was a clone with the BCD instructions disabled.
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.
Impressive stuff indeed.
Just think of the boilerplate needed to set up graphics when you can't simply output to a canvas tag. That's the point being made - JS is an interpreted language, so you can't really compare code size with compiled code.
It actually is comparable in my experience and opinion.
Setting up graphics modes on the SNES was much easier (hardware wise) than e.g. switching VGA (or even CGA) to graphics mode - one did have bios INT 10h to rely on for the PC, but “select and set up graphics mode, colors, etc” in practice was a comparable effort.
And many games implemented tiny virtual machines to simplify and compress code. As another example, ZX Spectrum basic rom (16k of z80 machine code and data) spent a few hundred bytes implementing a floating point stack VM interpreter that compressed relevant math code by approximately 1:5 compared to “native” calls.
*a JS function, utilizing dwitter-specific functions, called in some other dwitter-specific function, included in some specifically designed frame
Wouldn't be surprised if the total JS code required nears the submitted game.
Of course it's apples-to-oranges, but surely we can make such non-serious comparisons in a thread about a metroidvania game written for a fun contest?
Castlevania 1 is not a Metroidvania. Metroid 1 is though.
1. hard to monetize
2. lack of mature tooling (Unreal dropped Web support, Unity pretty much has just 1 FTE maintaining WebGL support, and Godot is still catching up)
3. mobile UX sucks (try playing a game in Safari on iOS)
not to say it isn't possible to make really cool games on the web. and some have been quite successful recently, like FNF. but it's a verrrrry tiny slice of the overall games market, and has been shrinking over time since the death of flash and the rise of mobile
Too many buttons IMO for a keyboard
In seriousness though, this is awesome! I love little metroidvanias. :) And the interactions, like the jump and swipe, feel remarkably satisfying. Great stuff.
Tip: You can use the regular attack to slow your descent when falling.
bones: 499
time: 59.15
deaths: 7
took a few short breaks
- As served it requires 950KB, which compress down to 396KB???
I would prefer to see a key legend that I have to close. "Figure shit out yourself" when I've got a hundred keys to choose from is... not good.
Gameplay was frustrating. I kept taking damage from stupid things like spikes but never found energy pickups. After I made my fourth or fifth movement mistake and took significant penalties for it each time (bones scatter when dying but upon my return they were not there to pick up), I did not want to continue playing.
The keys were obvious from the start, the right hand swipe was one of the first keys i accidentally mashed.
The logic was simple, consistent and worked as expected. The dash and swipe mechanisms were untuitive and clear.
I'm willing to commit more to 'hard things', but this really wasn't even in the 'hard category', my definition of hard begins at games like the soulsborne series. The penalties were obvious, dont jump on spikey things, dont get hit by enemies.
I loved it and wanted to continue playing.
There doesn't seem to be a way to kill yourself and go back to a checkpoint