Live data from Hacker News

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

github.com

121–130 of 130 posts

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

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

Had the same issue with Windows 10 and Chrome, but no problems with Firefox

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

#122
post #80

Earlier quoted context omitted.

Added! Nice to hear that, BTW. For this game - any idea to expand it? I finished 8 levels in one go, and it seems that there is a lot of potential for even more challenging currents, whirlpools, floating pieces, etc. (Side note: mechanic-wise this game reminds me of UGH!: https://classicreload.com/ugh.html )

I definitely have too many projects to tell you for sure. Just look at the two sites [1] [2] and you know what I mean. I have as many projects in the backlog as you can see on these 2 pages. And actually I don't want to concentrate on one. The motivation changes about every month, because I do this in my spare time. And from time to time a project has a status where I can publish it. So at the moment my motivation fo…

I see (and emphatize with!) too many projects and ideas.

As a side note, I am learning Vue.js right now (my motivation: brining deep learning to the browser, with nice, modular interfaces: https://inbrowser.ai/).

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

#123
post #26
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…

I increased the timestep by a factor of two. Have fun https://simulationcorner.net/js13kgame/

Somehow I beat it first try on the faster version, but couldn't on the original.

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

#124
post #99

Earlier quoted context omitted.

This is cool! However, you know space is ... empty, right? ;-) It also seems like the physics is off. Like you're flying through molasses. There's just a lot of damping. Finally, I think it would be more fun if the rotated the ship for thrust vector control, instead of triggering lateral thrusters with no torque.

Yes I know. The simulation of the ship is not accurate. I had code written for more advanced physics but I skipped it for the js13kentry. Time was running short and I was afraid the game gets too hard. Actually you land on planets with an atmosphere. So you have some "dampening" from the atmosphere.

Jupiter's atmosphere would get molasses-y.

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

#125

This is great - especially the pixel-perfect collision detection. But honestly, these colonists don't really deserve mail service if they insist on building their cities in such difficult environments.

You should see mail delivery in Aleppo.

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

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

Lavalanche: http://www.pouet.net/prod.php?which=59596

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

#127
post #20
post #12

Very nice. Has anyone made fluid dynamics sailing game yet? You would need only two controls, trim and rudder (direction instead rudder might be easier to comprehend). Wrong trim and point of sail could broache or even capsize the boat. Oh, and you could add not just the winds but the sea currents and waves also. Now I'm salivating.

That is exactly what I am asking. So far I haven't seen such a game. But I think it is easy doable with a few changes. I will remember it as a possible idea for a game entry next year.

The boundary between air and water makes the simulation much more difficult. While you can neglect the effects of air on the water, not having a well defined boundary for where the water simulation ends means that CFD 101 level techniques aren't enough anymore.

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

#128
post #80
post #15

Earlier quoted context omitted.

Thanks stared. I forked the repository and will make a pull request. Also I have seen your quantum game project.

Added! Nice to hear that, BTW. For this game - any idea to expand it? I finished 8 levels in one go, and it seems that there is a lot of potential for even more challenging currents, whirlpools, floating pieces, etc. (Side note: mechanic-wise this game reminds me of UGH!: https://classicreload.com/ugh.html )

oooooh, the memories... thank you very much for this 45 (!) minutes of great nostalgia :)

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

#129
post #94

Awesome! Couldn't win yet, but I'll keep trying :) On a more technical note, I wonder if you could use a Lattice-Boltzman-based flow simulation instead of classical CFD. Could be faster depending on "grid" size. Great, great job!

Not sure. Can you point me to a basic implementation in Javascript, C or Fortran?

From a quick search, there are quite a few on Github. Can't point to a specific one, though. I implemented a very basic 2D version on one of my MSc classes, and although we used MATLAB, it was quite fast depending on grid size/fluid properties.

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

#130
post #92

Earlier quoted context omitted.

I also had problem with the last level - on the several attempts I had left, after about 10 seconds the sim would seem to bug out and it looked like there was a very, very strong wind along the bottom, which looked like it was friction-pulling the rest of the play area so that everything was blowing fast to the left, leaving it (apparently) unplayable. Good fun, otherwise.

Damn. I thought I have solved this issue. But why does it work for most other players?

I ran into this as well. Here's a video: https://youtu.be/SomX22VGHHc

It doesn't always happen for me. Here, I had to play through the game several times before I could get the bug to trigger.

Post reply on HN