Live data from Hacker News

Show HN: Lunar lander-type game with computational fluid dynamics

github.com

51–60 of 130 posts

Re: Show HN: Lunar lander-type game with computational fluid dynamics

#51
post #22
post #16

Genuinely interesting as a game, there's potential for interesting level designs. A hardcore mode would be rotating the ship instead of it always staying upright—like in Atari's version: http://moonlander.seb.ly/

Exactly. This is at the moment nothing more than a nice technical demonstration. Actually my initial code implemented already mechanics for rotations. But then I skipped this feature for this entry. I was afraid the game gets too hard for landing.

It's definitely fun as-is, maybe slightly too easy for long-term playability. I suspect rotation would make it brutally hard and less fun. Nice work!

Re: Show HN: Lunar lander-type game with computational fluid dynamics

#55
post #48

Am I the only one experiencing a game-breaking bug/behavior? The D thrust gets stuck on if you press it once, and randomly the W comes on and gets stuck too. Also, after the first ship, every additional ship starts with W and D thrusts on, permanently.

This happens to me when I use the Internet Explorer. My best guess is, that the problem is, that the game tries to use all the computing power available. The game does use the "setTimeout(Loop, 0)" trick to accomplish this. Usually there is no problem if the event queue is a queue. Then the setTimeout function is the last one in the queue and keypresses are handled first. If the events are handled differently, for example by using a stack, such games are in big trouble.

Re: Show HN: Lunar lander-type game with computational fluid dynamics

#56
post #30

Earlier quoted context omitted.

The problem with higher speeds were instabilities in the numerics. So I reduced the internal time step. Never tried to increase the speed again after solving a few of those problems.

Alright :) so it's back to normal now, right? Thanks for trying!

No I just switched the links. The game on github points to the official entry. The link below points to double speed game.

Re: Show HN: Lunar lander-type game with computational fluid dynamics

#58
post #2

Author here. It started as a technical demonstration for fluid dynamics in the web browser. Then I saw the js13kgames competition and the decision was made to make a game out of it. A game in which the fluid mechanic counts. The decision for the Lunar Lander genre then was quiet easy. Does someone know more games then the two I mentioned in the README (Plasma Pong and Pixeljunk Shooter) with more or less realistic fl…

Spirits can basically be described as Lemmings with fluid mechanics. https://store.steampowered.com/app/210170/Spirits/

Re: Show HN: Lunar lander-type game with computational fluid dynamics

#60

Earlier quoted context omitted.

I suspect 3D fluid dynamics gets a lot slower a lot more quickly

One could get a decent experience with "2.5D" fluid dynamics. Two 2-d planes, one for current and one for wind, and a bit of creative fakery to model sail and keel dynamics. This could play nicely with some tuning.

You could get pretty realistic lift on the sail from simple (potential or vertex panel) methods. But the drag's gonna be a bitch to get right. And you probably have to neglect wave motion. Would be really fun to try though.
Post reply on HN