With recent sessions having veered heavily into nonsense, we decide it’s time to get back to brass tacks. We want the game to have great-feeling weapons, and you can’t have good weapon feel without recoil and knockback.
These are simple to implement on their own, but they represent the first time we’ve added a secondary mechanic that can influence the motion of the player. If multiple things can move the player around, how do you reconcile them? We settle on the following process: send motion events to a central piece of code that can resolve everything at once. Guess what? That’s a physics engine!
Notes/highlights
- Auto chess, not the first self-playing game but certainly among the most successful: https://en.wikipedia.org/wiki/Dota_Auto_Chess
- The urinal minigame from Yakuza Kiwami 2: https://www.youtube.com/watch?v=bDOnhIZUXkM
- There are some advanced (some might say over-engineered) techniques for handling events in a computer program, such as Redux (https://redux.js.org/) and RxJS (https://rxjs.dev/)
- We’re looking for a way to search for selected text in Vim. The conventional solution requires editing a config file, which is a little disappointing: https://vim.fandom.com/wiki/Search_for_visually_selected_text
- Did you know that Modern JavaScript has a “globalThis” object? It’s a context-agnostic equivalent of the browser’s “window” object and Node’s “global” object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
- The in-browser gamepad API: https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API
- A famous appeal from the creator of agar.io for a client/server UDP interface in the browser: https://news.ycombinator.com/item?id=13264952
- A detailed overview on how Halo uses animation cheats to make transient invulnerability (“armor lock”) feel fair for all clients in a multiplayer session: https://youtu.be/h47zZrqjgLc?t=2141
- Jeff keeps threatening to rewrite the game in Rust, but after reading this article he is now threatening to rewrite it in Zig: https://scattered-thoughts.net/writing/assorted-thoughts-on-zig-and-rust/
- Both of us use low-profile Keychron keyboards (K3s and K4s), and we’ve got mixed feelings. TL;DR they are nice keyboards but they have phantom keypress issues: https://www.reddit.com/r/Keychron/comments/lhxfws/keychron_k3_optical_brown/