In an ongoing effort to make this chain as valuable as possible to myself (and possibly others), I perform a weekly retrospective of how the past week went (notes from last week). I do this on Tuesdays to avoid conflicts with B'more on Rails, which usually holds events then.
This week (like the week before), I continue working on my (fab) game—a game inspired by the fab.js framework that I am writing for my kids.
WHAT WENT WELL
- I played tag with my son in my (fab) game. I was quite excited to have gotten the game to this point already.
- Figured out how to broadcast to many fab.js clients
- Started playing with raphaël.js
- Very nice / easy to pick up framework.
- Needed to reach under the API covers (to stop animation). That's something of a not-so-well, but the Raphaël code is so well organized that it was easy to accomplish what I wanted.
- Refactored a fab.js unary into a binary with relative ease, using that to support a backend player list. The code was prettier as well!
OBSTACLES / THINGS THAT WENT NOT SO WELL
- Had not separated my
Playerconcerns as well as I hoped. Switching from
<canvas>to Raphaël forced changes such that the
Room, which had been watching the
Playermove, now moves the
Playerand informs the
Playerwhere it is. This required a fair number of changes in my code. I wonder if it possible to have coded this such that fewer changes were required—less coupling between the two would be a good thing.
- I struggled with setting the comet iframe's src more than I should have. I was sure that I needed to muck with the window.location inside the iframe. It took me much longer than it should have to figure out that I could simply set the
WHAT I'LL TRY NEXT WEEK
- I am not sure if it is possible to detect disconnecting clients in fab.js. Worth some time to investigate.
- Regardless of the answer to the above, I ought to be able to add client heartbeats to passively remove players from the room.