{"action":"created","comment":{"url":"https://api.github.com/repos/getcarina/getcarina.com/pulls/comments/54631215","id":54631215,"diff_hunk":"@@ -0,0 +1,634 @@\n+---\n+title: \"Let's build a multiplayer Fallout 4 map using RxJS!\"\n+date: 2015-03-02 08:00\n+comments: true\n+author: Kyle Kelley <kyle.kelley@rackspace.com>\n+published: true\n+excerpt: >\n+  Let's build a multiplayer Fallout 4 map using RxJS! (Part I)\n+categories:\n+ - nodejs\n+ - RxJS\n+ - Webpack\n+ - Fallout 4\n+authorIsRacker: true\n+---\n+\n+![](https://cloud.githubusercontent.com/assets/836375/11960060/5b49ac9c-a896-11e5-8e50-da9ce4330e1d.gif)\n+\n+We've done [Pip-Boy discovery and relay]({{site.baseurl}}/blog/fallout-4-service-discovery-and-relay/) and\n+[created new libraries]({{site.baseurl}}/blog/decoding-the-pipboy-database-with-vault-community/). Now let's put them to good use. The first half of this tutorial does *not* require having\n+a copy of Fallout 4, since we'll start by simulating data.\n+\n+Things we'll cover:\n+\n+* Simulating data\n+* Observables and RxJS\n+* Drawing on canvas\n+\n+## Generating Random Players\n+\n+Go ahead and setup a new project for this, by creating a new directory, changing to that directory, and running `npm init`. You can accept the defaults if you like, or mix it up.\n+\n+```bash\n+mkdir multi-pip-fun\n+cd multi-pip-fun\n+npm init\n+```\n+\n+We're here to make a map of players, so let's start off by generating some\n+random players. We're going to get the list of player names that codsworth can\n+speak from.\n+\n+For this tutorial, I'll use the package `clean-codsworth-names`. You can install\n+it too:\n+\n+```bash\n+npm install --save clean-codsworth-names\n+```\n+\n+You can also use the raw list, which has plenty of words to make the juvenile in\n+us giggle.\n+\n+```bash\n+npm install --save codsworth-names\n+```\n+\n+We can go ahead and create `fakes.js` now, setting up new players and where they\n+are on the map.\n+\n+```javascript\n+const codsworthNames = require('clean-codsworth-names')","path":"_posts/2016-03-02-lets-build-a-reactive-map.md","position":70,"original_position":61,"commit_id":"eeb68c5f10704202163db8b41fc4754d2194c892","original_commit_id":"0e3e6210f32d87bdd0f5dab0567c46eecc5e88db","user":{"login":"rgbkrk","id":836375,"avatar_url":"https://avatars.githubusercontent.com/u/836375?v=3","gravatar_id":"","url":"https://api.github.com/users/rgbkrk","html_url":"https://github.com/rgbkrk","followers_url":"https://api.github.com/users/rgbkrk/followers","following_url":"https://api.github.com/users/rgbkrk/following{/other_user}","gists_url":"https://api.github.com/users/rgbkrk/gists{/gist_id}","starred_url":"https://api.github.com/users/rgbkrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgbkrk/subscriptions","organizations_url":"https://api.github.com/users/rgbkrk/orgs","repos_url":"https://api.github.com/users/rgbkrk/repos","events_url":"https://api.github.com/users/rgbkrk/events{/privacy}","received_events_url":"https://api.github.com/users/rgbkrk/received_events","type":"User","site_admin":false},"body":"Ok, I'll swap back and test this out with node 4.\r\n\r\nBy the way I made a [repo for the in-progress version of this tutorially blog](https://github.com/rgbkrk/lets-rxjs5) as well as the \"final\" version of the multiplayer map in [multipipboy](https://github.com/rgbkrk/multipipboy). Should I include either one somewhere here?","created_at":"2016-03-01T20:36:32Z","updated_at":"2016-03-01T20:36:32Z","html_url":"https://github.com/getcarina/getcarina.com/pull/636#discussion_r54631215","pull_request_url":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636","_links":{"self":{"href":"https://api.github.com/repos/getcarina/getcarina.com/pulls/comments/54631215"},"html":{"href":"https://github.com/getcarina/getcarina.com/pull/636#discussion_r54631215"},"pull_request":{"href":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636"}}},"pull_request":{"url":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636","id":56565638,"html_url":"https://github.com/getcarina/getcarina.com/pull/636","diff_url":"https://github.com/getcarina/getcarina.com/pull/636.diff","patch_url":"https://github.com/getcarina/getcarina.com/pull/636.patch","issue_url":"https://api.github.com/repos/getcarina/getcarina.com/issues/636","number":636,"state":"open","locked":false,"title":"[Blog] Lets build a multiplayer map","user":{"login":"rgbkrk","id":836375,"avatar_url":"https://avatars.githubusercontent.com/u/836375?v=3","gravatar_id":"","url":"https://api.github.com/users/rgbkrk","html_url":"https://github.com/rgbkrk","followers_url":"https://api.github.com/users/rgbkrk/followers","following_url":"https://api.github.com/users/rgbkrk/following{/other_user}","gists_url":"https://api.github.com/users/rgbkrk/gists{/gist_id}","starred_url":"https://api.github.com/users/rgbkrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgbkrk/subscriptions","organizations_url":"https://api.github.com/users/rgbkrk/orgs","repos_url":"https://api.github.com/users/rgbkrk/repos","events_url":"https://api.github.com/users/rgbkrk/events{/privacy}","received_events_url":"https://api.github.com/users/rgbkrk/received_events","type":"User","site_admin":false},"body":"Fixes #572 \r\n\r\nIt's about time I at least put up my intention to get this blog post out. I've also crafted software for this, though I'm re-working some of it while I finish the tutorial (mostly for flow).\r\n\r\nTopics to cover:\r\n\r\n* [x] simulating data\r\n* [x] Observables and RxJS\r\n* [x] Drawing on canvas\r\n\r\nIn the end, readers will build and deploy a multiplayer map like this:\r\n\r\n![woooooo dots](https://cloud.githubusercontent.com/assets/836375/11960060/5b49ac9c-a896-11e5-8e50-da9ce4330e1d.gif)\r\n\r\nComplete with interactive tooltips and their own API:\r\n\r\n![](https://cloud.githubusercontent.com/assets/836375/11988048/309d67c6-a9af-11e5-9b70-420ad7667c80.png)","created_at":"2016-01-20T05:26:40Z","updated_at":"2016-03-01T20:36:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e43b43d02c1f7992c05dd1f729803a84819bdbd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636/commits","review_comments_url":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636/comments","review_comment_url":"https://api.github.com/repos/getcarina/getcarina.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getcarina/getcarina.com/issues/636/comments","statuses_url":"https://api.github.com/repos/getcarina/getcarina.com/statuses/eeb68c5f10704202163db8b41fc4754d2194c892","head":{"label":"rgbkrk:lets-build-multiplayer","ref":"lets-build-multiplayer","sha":"eeb68c5f10704202163db8b41fc4754d2194c892","user":{"login":"rgbkrk","id":836375,"avatar_url":"https://avatars.githubusercontent.com/u/836375?v=3","gravatar_id":"","url":"https://api.github.com/users/rgbkrk","html_url":"https://github.com/rgbkrk","followers_url":"https://api.github.com/users/rgbkrk/followers","following_url":"https://api.github.com/users/rgbkrk/following{/other_user}","gists_url":"https://api.github.com/users/rgbkrk/gists{/gist_id}","starred_url":"https://api.github.com/users/rgbkrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgbkrk/subscriptions","organizations_url":"https://api.github.com/users/rgbkrk/orgs","repos_url":"https://api.github.com/users/rgbkrk/repos","events_url":"https://api.github.com/users/rgbkrk/events{/privacy}","received_events_url":"https://api.github.com/users/rgbkrk/received_events","type":"User","site_admin":false},"repo":{"id":44407124,"name":"getcarina.com","full_name":"rgbkrk/getcarina.com","owner":{"login":"rgbkrk","id":836375,"avatar_url":"https://avatars.githubusercontent.com/u/836375?v=3","gravatar_id":"","url":"https://api.github.com/users/rgbkrk","html_url":"https://github.com/rgbkrk","followers_url":"https://api.github.com/users/rgbkrk/followers","following_url":"https://api.github.com/users/rgbkrk/following{/other_user}","gists_url":"https://api.github.com/users/rgbkrk/gists{/gist_id}","starred_url":"https://api.github.com/users/rgbkrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgbkrk/subscriptions","organizations_url":"https://api.github.com/users/rgbkrk/orgs","repos_url":"https://api.github.com/users/rgbkrk/repos","events_url":"https://api.github.com/users/rgbkrk/events{/privacy}","received_events_url":"https://api.github.com/users/rgbkrk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rgbkrk/getcarina.com","description":"The Carina website","fork":true,"url":"https://api.github.com/repos/rgbkrk/getcarina.com","forks_url":"https://api.github.com/repos/rgbkrk/getcarina.com/forks","keys_url":"https://api.github.com/repos/rgbkrk/getcarina.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rgbkrk/getcarina.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rgbkrk/getcarina.com/teams","hooks_url":"https://api.github.com/repos/rgbkrk/getcarina.com/hooks","issue_events_url":"https://api.github.com/repos/rgbkrk/getcarina.com/issues/events{/number}","events_url":"https://api.github.com/repos/rgbkrk/getcarina.com/events","assignees_url":"https://api.github.com/repos/rgbkrk/getcarina.com/assignees{/user}","branches_url":"https://api.github.com/repos/rgbkrk/getcarina.com/branches{/branch}","tags_url":"https://api.github.com/repos/rgbkrk/getcarina.com/tags","blobs_url":"https://api.github.com/repos/rgbkrk/getcarina.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rgbkrk/getcarina.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rgbkrk/getcarina.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/rgbkrk/getcarina.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rgbkrk/getcarina.com/statuses/{sha}","languages_url":"https://api.github.com/repos/rgbkrk/getcarina.com/languages","stargazers_url":"https://api.github.com/repos/rgbkrk/getcarina.com/stargazers","contributors_url":"https://api.github.com/repos/rgbkrk/getcarina.com/contributors","subscribers_url":"https://api.github.com/repos/rgbkrk/getcarina.com/subscribers","subscription_url":"https://api.github.com/repos/rgbkrk/getcarina.com/subscription","commits_url":"https://api.github.com/repos/rgbkrk/getcarina.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/rgbkrk/getcarina.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/rgbkrk/getcarina.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/rgbkrk/getcarina.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/rgbkrk/getcarina.com/contents/{+path}","compare_url":"https://api.github.com/repos/rgbkrk/getcarina.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rgbkrk/getcarina.com/merges","archive_url":"https://api.github.com/repos/rgbkrk/getcarina.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rgbkrk/getcarina.com/downloads","issues_url":"https://api.github.com/repos/rgbkrk/getcarina.com/issues{/number}","pulls_url":"https://api.github.com/repos/rgbkrk/getcarina.com/pulls{/number}","milestones_url":"https://api.github.com/repos/rgbkrk/getcarina.com/milestones{/number}","notifications_url":"https://api.github.com/repos/rgbkrk/getcarina.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rgbkrk/getcarina.com/labels{/name}","releases_url":"https://api.github.com/repos/rgbkrk/getcarina.com/releases{/id}","deployments_url":"https://api.github.com/repos/rgbkrk/getcarina.com/deployments","created_at":"2015-10-16T19:47:44Z","updated_at":"2015-11-13T17:31:46Z","pushed_at":"2016-03-01T20:31:36Z","git_url":"git://github.com/rgbkrk/getcarina.com.git","ssh_url":"git@github.com:rgbkrk/getcarina.com.git","clone_url":"https://github.com/rgbkrk/getcarina.com.git","svn_url":"https://github.com/rgbkrk/getcarina.com","homepage":"https://getcarina.com","size":16628,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"getcarina:master","ref":"master","sha":"caf65ab1c794f67478c0e515b0d7679da81e3995","user":{"login":"getcarina","id":15111063,"avatar_url":"https://avatars.githubusercontent.com/u/15111063?v=3","gravatar_id":"","url":"https://api.github.com/users/getcarina","html_url":"https://github.com/getcarina","followers_url":"https://api.github.com/users/getcarina/followers","following_url":"https://api.github.com/users/getcarina/following{/other_user}","gists_url":"https://api.github.com/users/getcarina/gists{/gist_id}","starred_url":"https://api.github.com/users/getcarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getcarina/subscriptions","organizations_url":"https://api.github.com/users/getcarina/orgs","repos_url":"https://api.github.com/users/getcarina/repos","events_url":"https://api.github.com/users/getcarina/events{/privacy}","received_events_url":"https://api.github.com/users/getcarina/received_events","type":"Organization","site_admin":false},"repo":{"id":41817203,"name":"getcarina.com","full_name":"getcarina/getcarina.com","owner":{"login":"getcarina","id":15111063,"avatar_url":"https://avatars.githubusercontent.com/u/15111063?v=3","gravatar_id":"","url":"https://api.github.com/users/getcarina","html_url":"https://github.com/getcarina","followers_url":"https://api.github.com/users/getcarina/followers","following_url":"https://api.github.com/users/getcarina/following{/other_user}","gists_url":"https://api.github.com/users/getcarina/gists{/gist_id}","starred_url":"https://api.github.com/users/getcarina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getcarina/subscriptions","organizations_url":"https://api.github.com/users/getcarina/orgs","repos_url":"https://api.github.com/users/getcarina/repos","events_url":"https://api.github.com/users/getcarina/events{/privacy}","received_events_url":"https://api.github.com/users/getcarina/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getcarina/getcarina.com","description":"The Carina website","fork":false,"url":"https://api.github.com/repos/getcarina/getcarina.com","forks_url":"https://api.github.com/repos/getcarina/getcarina.com/forks","keys_url":"https://api.github.com/repos/getcarina/getcarina.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getcarina/getcarina.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getcarina/getcarina.com/teams","hooks_url":"https://api.github.com/repos/getcarina/getcarina.com/hooks","issue_events_url":"https://api.github.com/repos/getcarina/getcarina.com/issues/events{/number}","events_url":"https://api.github.com/repos/getcarina/getcarina.com/events","assignees_url":"https://api.github.com/repos/getcarina/getcarina.com/assignees{/user}","branches_url":"https://api.github.com/repos/getcarina/getcarina.com/branches{/branch}","tags_url":"https://api.github.com/repos/getcarina/getcarina.com/tags","blobs_url":"https://api.github.com/repos/getcarina/getcarina.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getcarina/getcarina.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getcarina/getcarina.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/getcarina/getcarina.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getcarina/getcarina.com/statuses/{sha}","languages_url":"https://api.github.com/repos/getcarina/getcarina.com/languages","stargazers_url":"https://api.github.com/repos/getcarina/getcarina.com/stargazers","contributors_url":"https://api.github.com/repos/getcarina/getcarina.com/contributors","subscribers_url":"https://api.github.com/repos/getcarina/getcarina.com/subscribers","subscription_url":"https://api.github.com/repos/getcarina/getcarina.com/subscription","commits_url":"https://api.github.com/repos/getcarina/getcarina.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/getcarina/getcarina.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/getcarina/getcarina.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/getcarina/getcarina.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/getcarina/getcarina.com/contents/{+path}","compare_url":"https://api.github.com/repos/getcarina/getcarina.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getcarina/getcarina.com/merges","archive_url":"https://api.github.com/repos/getcarina/getcarina.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getcarina/getcarina.com/downloads","issues_url":"https://api.github.com/repos/getcarina/getcarina.com/issues{/number}","pulls_url":"https://api.github.com/repos/getcarina/getcarina.com/pulls{/number}","milestones_url":"https://api.github.com/repos/getcarina/getcarina.com/milestones{/number}","notifications_url":"https://api.github.com/repos/getcarina/getcarina.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getcarina/getcarina.com/labels{/name}","releases_url":"https://api.github.com/repos/getcarina/getcarina.com/releases{/id}","deployments_url":"https://api.github.com/repos/getcarina/getcarina.com/deployments","created_at":"2015-09-02T17:53:02Z","updated_at":"2016-02-28T11:21:04Z","pushed_at":"2016-03-01T20:31:36Z","git_url":"git://github.com/getcarina/getcarina.com.git","ssh_url":"git@github.com:getcarina/getcarina.com.git","clone_url":"https://github.com/getcarina/getcarina.com.git","svn_url":"https://github.com/getcarina/getcarina.com","homepage":"https://getcarina.com/","size":21725,"stargazers_count":12,"watchers_count":12,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":88,"forks":32,"open_issues":88,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636"},"html":{"href":"https://github.com/getcarina/getcarina.com/pull/636"},"issue":{"href":"https://api.github.com/repos/getcarina/getcarina.com/issues/636"},"comments":{"href":"https://api.github.com/repos/getcarina/getcarina.com/issues/636/comments"},"review_comments":{"href":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636/comments"},"review_comment":{"href":"https://api.github.com/repos/getcarina/getcarina.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getcarina/getcarina.com/pulls/636/commits"},"statuses":{"href":"https://api.github.com/repos/getcarina/getcarina.com/statuses/eeb68c5f10704202163db8b41fc4754d2194c892"}}}}