Hacker News new | past | comments | ask | show | jobs | submit login

OP here (of this blog post, not the original game). The naive way is what I expected too, and described as the Euler method in the post.

In terms of physical accuracy, especially when you get near the surface, the mass does change significantly if you have a high rate of fuel burn. But in terms of how challenging/fun it would be, and what strategies you use as a player, I doubt it would make much difference. In fact, there are other lunar lander simulations in the BASIC computer games book, I think one of them does use the naive approach.

If 10 seconds is too long, you could still leave that as the turn in the UI, but internally break each turn into a bunch of smaller time steps, e.g. 10 time steps of 1 second each. Actually, the existing game does that in certain places, which is why his physics simulation takes in an arbitrary time S rather than always the full 10 seconds.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: