Session 49

Four Seasons Immutable Entities

Forgive some audio issues at the beginning of the stream! OBS gonna OBS.

In this session, we started sending mouse position in our multiplayer events to allow players to see where other players are aiming in realtime. We started playing the game together, and at a buttery smooth almost-60 FPS. Our hiding system got an upgrade to hide tanks from other players as well as enemy turrets.

For the second half, we dug into our twin implementations of immutability. Jeff presented a clever Immutable type that uses a recursive type alias (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#more-recursive-type-aliases) to prevent unexpected modifications to our game objects. Armed with this fresh knowledge, we started updating our code with a new entity container class .

  • We discuss HDR and the difference between HDR photography versus HDR TVs versus what-our-eyes-actually-see. Turns out, our eyes perceive a much wider range of colors than a camera sensor! TV HDR is an altogether different concept, where HDR TVs are capable of displaying different area an image with different brightness values to produce a more realistic looking image.
  • For political purposes, we delved into the Dungeons and Dragons alignment chart system. Our ultimate determination was that Mitch McConnell is “lawful evil”.
  • Rian Johnson is a director we both love, and apparently Dom needs to watch The Brothers Bloom ASAP
  • Hindley-Milner type inference is a system that figures out the type of a variable based on how it’s used, that Jeff had some experience from OCAML. https://en.wikipedia.org/wiki/Hindley–Milner_type_system
  • Our immutable iterator uses a Javascript Generator object, which is a convenient shorthand for building out iterables/iterators https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator
  • “yinz” is a classic bit of Pittsburghese, but there’s a whole lot more at https://en.wikipedia.org/wiki/Western_Pennsylvania_English