ehmorris / lunar-lander

A web-based lunar lander game written in plain JavaScript, HTML, and CSS with no dependencies
https://ehmorris.com/lander/
156 stars 20 forks source link

Add Autopilot #7

Closed szhu closed 1 year ago

szhu commented 1 year ago

Hi! Thanks for making this game -- it's so fun! I've spent way too long playing it the past few days.

I think I figured out a good strategy for the game, and implemented an autopilot so that everyone can experience what it's like to win big :D

See the README in the fork for more info: https://github.com/szhu/lunar-lander-autopilot

Demo:

https://user-images.githubusercontent.com/1570168/224213713-fb3ae806-d568-4df3-b837-66c66634d9a6.mov


btw, posted this on HN too! https://news.ycombinator.com/show

Note: I marked this PR as a draft because it's a little hacky -- I used global variables to expose stats to the autopilot code. I'm also not sure if you'd actually want to put a cheatbot into the game for everyone to use… maybe it can be an easter egg?

ehmorris commented 1 year ago

This is SO cool, I am going to take a close look this weekend

ehmorris commented 1 year ago

Merged this into a branch where I'll make some changes to data passing, CSS, and the stats

szhu commented 1 year ago

Thanks!

(Also, never have I felt so appropriate reacting a comment with 🚀!)

ehmorris commented 1 year ago

Now that I've released the daily challenge feature I'll take a closer look at this

szhu commented 1 year ago

Oh awesome! Let me open a PR that contains my newer changes.