Live data from Hacker News

Porting my JavaScript game engine to C for no reason

phoboslab.org

21–30 of 139 posts

Re: Porting my JavaScript game engine to C for no reason

#23
post #3

> Many Web games were created with Impact [the game engine from the article] and it even served as the basis for some commercial cross-platform titles like Cross Code, Eliot Quest and my own Nintendo Wii-U game XType Plus. Cross Code is an excellent game. I knew that it used web tech and I was constantly amazed by how performant it was on the Nintendo Switch hardware. I would guess that this engine deserves some cred…

Agreed! While I loath JavaScript it was immensely impressive that a masterpiece like Cross Code came from it.

Re: Porting my JavaScript game engine to C for no reason

#24
post #14

Earlier quoted context omitted.

Why, from C to Zig, from Zig to Rust. Compile the Rust version to WASM to finally make it runnable in the browser.

i'm actually quite curious how it would perform relative to the C version. the article shows 1000x particles, but LittleJS has demos with a couple orders of magnitude more than that at 60fps. e.g. https://killedbyapixel.github.io/LittleJS/examples/stress/

Not looked into the code, the correct way would be to move the particles engine into shader code, and the limit would be as much as the graphics card can take.

It appears that after all these years, not everyone has bought into shader programming mentality, which is quite understable as only proprietary APIs have good debugging tools for them.

Re: Porting my JavaScript game engine to C for no reason

#26
post #3

> Many Web games were created with Impact [the game engine from the article] and it even served as the basis for some commercial cross-platform titles like Cross Code, Eliot Quest and my own Nintendo Wii-U game XType Plus. Cross Code is an excellent game. I knew that it used web tech and I was constantly amazed by how performant it was on the Nintendo Switch hardware. I would guess that this engine deserves some cred…

Thanks for the recommendation. Looks interesting and is currently on sale on steam, so I bought it.

Re: Porting my JavaScript game engine to C for no reason

#28
post #11

Somewhat related. Your QOI lossless file format coupled with 7Zip outperfoms lossless PNG. Amazing work!

BMP coupled with 7Zip would outperform too (probably by a bigger margin). It just boils down to gzip vs gzip-replacement compressor.

I also found that BMP with ZSTD outperforms PNG while developing https://adsb.exposed/ (it streams raw RGBA over HTTP with Content-Encoding: zstd)

Re: Porting my JavaScript game engine to C for no reason

#29
"Thoughts on Flash" may just have saved the Web platform at its hour of greatest need, ie. creeping dominance of a single piece of software.

I believe that somewhere in there was frustration with Adobe who seemed to abandon the MacOS platform support for Windows' much larger user base, eg. Mac versions were always behind Windows versions. Perhaps Jobs also may've felt that there would be no Adobe without Apple as much as the other way around but that's speculative

The game looks slick af btw,

Re: Porting my JavaScript game engine to C for no reason

#30

The history section does not feel quite accurate. From what I recall, what killed Flash wasn't iOS, but rather the acquisition of Macromedia by Adobe.

Flash game sites were still huge and popular after Adobe’s purchase, so clearly it did not kill it. If you mean something like that the acquisition started the death… that’s a hard position to argue against, since it’s subjective. Perhaps you’re right.
Post reply on HN