Live data from Hacker News

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

github.com

31–40 of 130 posts

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

#31
post #19

https://i.imgur.com/EksA6Rw.png Woo! +1 to the comment about larger levels. Though I'm only getting about 20fps on my laptop as is. Multi-core? GPU? Awesome little game, in any case!

Finished with 6128 points here with only 1 ship left. That was a close one.

Great demo. I'd love to see this fleshed out. I think a lot of the older games had seriously good playability and deserve to be revisited.

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

#32

This is brilliant. One of my favourite games growing up was Thrust on the BBC Model B. Had directional velocity and towing mechanics, which was pretty good for the time. https://www.youtube.com/watch?v=Dt44PEIWBRg

I played this game too. And I was close trying to implement such a game. But then my fluid grid would be much much larger and the game much slower. I thought about adaptive grids. Fine on the viewing screen and coarse outside. But to implement this would have taken me too long for this game entry.

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

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

> Does someone know more games […] with more or less realistic fluid dynamics?

There’s always the classic Liquid War:

https://www.gnu.org/software/liquidwar6/

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

#35
It would be nice to have a vertical speed indication in the ship or nearby. Perhaps some semaphore like lights in the bottom of the ship. It's difficult to look simultaneously at the ship position and the speed indicator.

Also, sometimes adding an official name for each map somehow make the game look better. Nice game, I must try again because I lost all my ships in the "volcano" level.

Edit:

Putting the light to show the vertical speed in the landing pad may make more sense in universe.

Also, the buildings look very similar to the old gorilla.bas game :).

It would be nice to be able to disable the simulation in the introduction and final screen, so I can keep the page open to play later, without using too much battery.

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

#36
Beautiful! Great job.

Lander used to be the first game I would program when I got a new computer as a kid. I remember writing it for the TI-99/4A, Commodore 64, and the Amiga 500 (in Modula 2). Your game brings fond memories of those simpler times.

Amazing what you can do these days with the tremendous speed of computation available on modern hardware, even with the js13k constraints.

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

#37
post #34
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…

> Does someone know more games […] with more or less realistic fluid dynamics? There’s always the classic Liquid War : https://www.gnu.org/software/liquidwar6/

I watched the video. It doesn't look like liquid but something else. Some strange particle effects. But maybe I am wrong.

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

#38

It would be nice to have a vertical speed indication in the ship or nearby. Perhaps some semaphore like lights in the bottom of the ship. It's difficult to look simultaneously at the ship position and the speed indicator. Also, sometimes adding an official name for each map somehow make the game look better. Nice game, I must try again because I lost all my ships in the "volcano" level. Edit: Putting the light to sho…

Thanks for the tips. There are always ways to improve the gameplay. I had still 2-3kB left at the end.

When I designed the buildings I thought actually about "Save New York" on the C64.

https://www.youtube.com/watch?v=ZMUvi6UIV3w

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

#39
post #30
post #24

Earlier quoted context omitted.

On my computer the game runs at 40 FPS. So there is still room and I can increase the timestep if you want. This game simulates the Navier-Stokes equation on a grid of the size 256x128. Four times the size would already reduce the game to 10FPS or even more. Of course you can try to rewrite it to run on the GPU. An alternative would be to use so called Smoothed Particle Hydrodynamics. This is particle and not grid ba…

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!

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

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

It's really fun. Well done!
Post reply on HN