Live data from Hacker News

Porting my JavaScript game engine to C for no reason

phoboslab.org

41–50 of 139 posts

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

#41
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…

The switch port required heroic levels of efforts though I recall.

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

#42
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…

To be fair, they modified Impact _a lot_. In some of their development streams[1] you can see a heavily extended Weltmeister (Impact's level editor). Imho, that's fantastic! I love to see devs being able to adapt the engine for their particular game. Likewise, high_impact shouldn't be seen as a “feature-complete” game engine, but rather as a convenient starting point. [1] https://youtu.be/4lZfnM9Ubeo?t=3215

> To be fair, they modified Impact _a lot_.

You can't polish a turd. There would've been no point in modifying the engine a bunch if you hadn't given them a useful base to work with.

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

#43
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/

JS engines like V8 are very good at JIT and optimization based on actual profiling. If we talk about pure CPU modeling, I suspect a good JIT will soon enough produce machine code on par with best AOT compilers. (BTW the same should apply to JVM and CLR languages, and maybe even to LuaJIT to some extent.)

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

#44
post #42

Earlier quoted context omitted.

To be fair, they modified Impact _a lot_. In some of their development streams[1] you can see a heavily extended Weltmeister (Impact's level editor). Imho, that's fantastic! I love to see devs being able to adapt the engine for their particular game. Likewise, high_impact shouldn't be seen as a “feature-complete” game engine, but rather as a convenient starting point. [1] https://youtu.be/4lZfnM9Ubeo?t=3215

> To be fair, they modified Impact _a lot_. You can't polish a turd. There would've been no point in modifying the engine a bunch if you hadn't given them a useful base to work with.

In game development this isn't true for better or worse. There is a lot of sunken cost mindset in games that we just go with what we have because we have already invested the time in it and we'll make it work by any means.

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

#45
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.

Doesn't Zig compile to WASM too?

Yes, but the point of the joke was to make the loop longer, while keeping it somehow logical. I wish I managed to insert Purescript, Elixir, Pony and ATS somehow.

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

#47
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…

The switch port required heroic levels of efforts though I recall.

Huh. Never would have guessed. I am sure there were many “fancy” effects in the game, but during my playthrough, it all felt like it would have been achievable on a SNES.

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

#48

"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 muc…

Even PSP had Flash, and it was fairly decent. I wonder how much effort and money Sony put into that.

Flash had numerous issues. The processing power available (especially on a PSP) is more than enough to be “good”, the problem with flash _performance_ is the power usage while achieving that perf. Even on laptops flash was a significant battery life drain whenever it was running, having it on all websites would kill battery life while browsing on a phone.

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

#50
post #42

Earlier quoted context omitted.

To be fair, they modified Impact _a lot_. In some of their development streams[1] you can see a heavily extended Weltmeister (Impact's level editor). Imho, that's fantastic! I love to see devs being able to adapt the engine for their particular game. Likewise, high_impact shouldn't be seen as a “feature-complete” game engine, but rather as a convenient starting point. [1] https://youtu.be/4lZfnM9Ubeo?t=3215

> To be fair, they modified Impact _a lot_. You can't polish a turd. There would've been no point in modifying the engine a bunch if you hadn't given them a useful base to work with.

https://en.m.wikipedia.org/wiki/Dorodango
Post reply on HN