←back to thread

201 points ehmorris | 3 comments | | HN request time: 0.924s | source

Hey everybody, you might remember my older game, Lander! It made a big splash on Hacker News about 2 years ago. I'm still enjoying writing games with no dependencies. I've been working on Bubbles for about 6 months and would love to see your scores.

If you like it, you can build your own levels with my builder tool: https://ehmorris.com/bubbles/builder/ and share the levels here or via Github.

1. 90s_dev ◴[] No.43356106[source]
Your source is nice and clean[1]. No dependencies is a wonderful goal. Status quo is inherently always against innovation. I like the approach the Go team took of rethinking new solutions from first principles, and I hope you got to experience the joy of that in this project.

[1] https://github.com/ehmorris/bubbles/

replies(1): >>43356134 #
2. ehmorris ◴[] No.43356134[source]
Thanks! Writing the game has been really fun and I’m proud of the codebase. It’s therapeutic to work on it because I get to skip all the frustrating parts of web dev like writing config files.
replies(1): >>43356345 #
3. mjburgess ◴[] No.43356345[source]
I think you'd gain clarity from `export function` and `function` over the anonymous fn + const style -- which seems a little like zig?

And the getter/setter system: I dont see a reason for over `{getHeight: () => height}` over `return {height, weight}` ?

Since canvasManager is mostly just data properties, you could also destructure those inline to funciton parameters, ie., function drawX({ctx, height, width, scale}) etc.