{"action":"opened","number":109,"pull_request":{"url":"https://api.github.com/repos/crawl/crawl/pulls/109","id":44726938,"html_url":"https://github.com/crawl/crawl/pull/109","diff_url":"https://github.com/crawl/crawl/pull/109.diff","patch_url":"https://github.com/crawl/crawl/pull/109.patch","issue_url":"https://api.github.com/repos/crawl/crawl/issues/109","number":109,"state":"open","locked":false,"title":"Tiles lighting rework","user":{"login":"BodrickLight","id":13234208,"avatar_url":"https://avatars.githubusercontent.com/u/13234208?v=3","gravatar_id":"","url":"https://api.github.com/users/BodrickLight","html_url":"https://github.com/BodrickLight","followers_url":"https://api.github.com/users/BodrickLight/followers","following_url":"https://api.github.com/users/BodrickLight/following{/other_user}","gists_url":"https://api.github.com/users/BodrickLight/gists{/gist_id}","starred_url":"https://api.github.com/users/BodrickLight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BodrickLight/subscriptions","organizations_url":"https://api.github.com/users/BodrickLight/orgs","repos_url":"https://api.github.com/users/BodrickLight/repos","events_url":"https://api.github.com/users/BodrickLight/events{/privacy}","received_events_url":"https://api.github.com/users/BodrickLight/received_events","type":"User","site_admin":false},"body":"Each tile gets a light colour calculated from the distance to the player; whether the tile is currently visible; whether the tile is lit by a halo or umbra; and a few other factors. This colour is then overlaid on the tile, and blended with adjacent tiles to create a smoother transition.\r\n\r\nThe amount of blending can be controlled with the tile_light_blur rcfile option. Setting this to 0 will disable the blending completely, while a value of 16 will blend the entire tile. The default value of 6 was chosen to give a good balance of being able to determine the base colour of the tile (important for being able to tell if a tile is in LOS or not), while retaining some smoothing between adjacent tiles.\r\n\r\nThis method could be expanded further to add coloured lighting based on branch, light spreading further than one tile etc.; but this is a simple implementation for now. It should be easy to change the cell colour calculation algorithm in tileview.cc::_get_colour without changing the rendering process if this is necessary in the future.\r\n\r\nSome examples:\r\nDungeon:\r\n![image](https://cloud.githubusercontent.com/assets/13234208/9801610/0b22f2bc-580c-11e5-8549-9aa6a2accaa5.png)\r\n\r\nShoals:\r\n![image](https://cloud.githubusercontent.com/assets/13234208/9801620/158aaa1a-580c-11e5-9b83-6bd6e59f917c.png)\r\n\r\nVolcano + halo + Dithmenos umbra + orb glow:\r\n![image](https://cloud.githubusercontent.com/assets/13234208/9801625/1dd69aee-580c-11e5-9ceb-08dd1dcdd4ab.png)\r\n\r\nHybrid:\r\n![image](https://cloud.githubusercontent.com/assets/13234208/9801628/253f62f2-580c-11e5-8c1c-380f909e2dd4.png)\r\n","created_at":"2015-09-10T22:22:44Z","updated_at":"2015-09-10T22:22:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crawl/crawl/pulls/109/commits","review_comments_url":"https://api.github.com/repos/crawl/crawl/pulls/109/comments","review_comment_url":"https://api.github.com/repos/crawl/crawl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crawl/crawl/issues/109/comments","statuses_url":"https://api.github.com/repos/crawl/crawl/statuses/d9fa9607deb02343ba23e59eff8fb15576176b01","head":{"label":"BodrickLight:advanced-lighting","ref":"advanced-lighting","sha":"d9fa9607deb02343ba23e59eff8fb15576176b01","user":{"login":"BodrickLight","id":13234208,"avatar_url":"https://avatars.githubusercontent.com/u/13234208?v=3","gravatar_id":"","url":"https://api.github.com/users/BodrickLight","html_url":"https://github.com/BodrickLight","followers_url":"https://api.github.com/users/BodrickLight/followers","following_url":"https://api.github.com/users/BodrickLight/following{/other_user}","gists_url":"https://api.github.com/users/BodrickLight/gists{/gist_id}","starred_url":"https://api.github.com/users/BodrickLight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BodrickLight/subscriptions","organizations_url":"https://api.github.com/users/BodrickLight/orgs","repos_url":"https://api.github.com/users/BodrickLight/repos","events_url":"https://api.github.com/users/BodrickLight/events{/privacy}","received_events_url":"https://api.github.com/users/BodrickLight/received_events","type":"User","site_admin":false},"repo":{"id":40786854,"name":"crawl","full_name":"BodrickLight/crawl","owner":{"login":"BodrickLight","id":13234208,"avatar_url":"https://avatars.githubusercontent.com/u/13234208?v=3","gravatar_id":"","url":"https://api.github.com/users/BodrickLight","html_url":"https://github.com/BodrickLight","followers_url":"https://api.github.com/users/BodrickLight/followers","following_url":"https://api.github.com/users/BodrickLight/following{/other_user}","gists_url":"https://api.github.com/users/BodrickLight/gists{/gist_id}","starred_url":"https://api.github.com/users/BodrickLight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BodrickLight/subscriptions","organizations_url":"https://api.github.com/users/BodrickLight/orgs","repos_url":"https://api.github.com/users/BodrickLight/repos","events_url":"https://api.github.com/users/BodrickLight/events{/privacy}","received_events_url":"https://api.github.com/users/BodrickLight/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BodrickLight/crawl","description":"Dungeon Crawl: Stone Soup official repository","fork":true,"url":"https://api.github.com/repos/BodrickLight/crawl","forks_url":"https://api.github.com/repos/BodrickLight/crawl/forks","keys_url":"https://api.github.com/repos/BodrickLight/crawl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BodrickLight/crawl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BodrickLight/crawl/teams","hooks_url":"https://api.github.com/repos/BodrickLight/crawl/hooks","issue_events_url":"https://api.github.com/repos/BodrickLight/crawl/issues/events{/number}","events_url":"https://api.github.com/repos/BodrickLight/crawl/events","assignees_url":"https://api.github.com/repos/BodrickLight/crawl/assignees{/user}","branches_url":"https://api.github.com/repos/BodrickLight/crawl/branches{/branch}","tags_url":"https://api.github.com/repos/BodrickLight/crawl/tags","blobs_url":"https://api.github.com/repos/BodrickLight/crawl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BodrickLight/crawl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BodrickLight/crawl/git/refs{/sha}","trees_url":"https://api.github.com/repos/BodrickLight/crawl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BodrickLight/crawl/statuses/{sha}","languages_url":"https://api.github.com/repos/BodrickLight/crawl/languages","stargazers_url":"https://api.github.com/repos/BodrickLight/crawl/stargazers","contributors_url":"https://api.github.com/repos/BodrickLight/crawl/contributors","subscribers_url":"https://api.github.com/repos/BodrickLight/crawl/subscribers","subscription_url":"https://api.github.com/repos/BodrickLight/crawl/subscription","commits_url":"https://api.github.com/repos/BodrickLight/crawl/commits{/sha}","git_commits_url":"https://api.github.com/repos/BodrickLight/crawl/git/commits{/sha}","comments_url":"https://api.github.com/repos/BodrickLight/crawl/comments{/number}","issue_comment_url":"https://api.github.com/repos/BodrickLight/crawl/issues/comments{/number}","contents_url":"https://api.github.com/repos/BodrickLight/crawl/contents/{+path}","compare_url":"https://api.github.com/repos/BodrickLight/crawl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BodrickLight/crawl/merges","archive_url":"https://api.github.com/repos/BodrickLight/crawl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BodrickLight/crawl/downloads","issues_url":"https://api.github.com/repos/BodrickLight/crawl/issues{/number}","pulls_url":"https://api.github.com/repos/BodrickLight/crawl/pulls{/number}","milestones_url":"https://api.github.com/repos/BodrickLight/crawl/milestones{/number}","notifications_url":"https://api.github.com/repos/BodrickLight/crawl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BodrickLight/crawl/labels{/name}","releases_url":"https://api.github.com/repos/BodrickLight/crawl/releases{/id}","created_at":"2015-08-15T21:43:18Z","updated_at":"2015-08-15T21:43:30Z","pushed_at":"2015-09-10T22:20:43Z","git_url":"git://github.com/BodrickLight/crawl.git","ssh_url":"git@github.com:BodrickLight/crawl.git","clone_url":"https://github.com/BodrickLight/crawl.git","svn_url":"https://github.com/BodrickLight/crawl","homepage":"http://crawl.develz.org/","size":124568,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"crawl:master","ref":"master","sha":"9847487d1188c35709666d880c543b35661cfb1e","user":{"login":"crawl","id":8470194,"avatar_url":"https://avatars.githubusercontent.com/u/8470194?v=3","gravatar_id":"","url":"https://api.github.com/users/crawl","html_url":"https://github.com/crawl","followers_url":"https://api.github.com/users/crawl/followers","following_url":"https://api.github.com/users/crawl/following{/other_user}","gists_url":"https://api.github.com/users/crawl/gists{/gist_id}","starred_url":"https://api.github.com/users/crawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawl/subscriptions","organizations_url":"https://api.github.com/users/crawl/orgs","repos_url":"https://api.github.com/users/crawl/repos","events_url":"https://api.github.com/users/crawl/events{/privacy}","received_events_url":"https://api.github.com/users/crawl/received_events","type":"Organization","site_admin":false},"repo":{"id":23038334,"name":"crawl","full_name":"crawl/crawl","owner":{"login":"crawl","id":8470194,"avatar_url":"https://avatars.githubusercontent.com/u/8470194?v=3","gravatar_id":"","url":"https://api.github.com/users/crawl","html_url":"https://github.com/crawl","followers_url":"https://api.github.com/users/crawl/followers","following_url":"https://api.github.com/users/crawl/following{/other_user}","gists_url":"https://api.github.com/users/crawl/gists{/gist_id}","starred_url":"https://api.github.com/users/crawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawl/subscriptions","organizations_url":"https://api.github.com/users/crawl/orgs","repos_url":"https://api.github.com/users/crawl/repos","events_url":"https://api.github.com/users/crawl/events{/privacy}","received_events_url":"https://api.github.com/users/crawl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crawl/crawl","description":"Dungeon Crawl: Stone Soup official repository","fork":false,"url":"https://api.github.com/repos/crawl/crawl","forks_url":"https://api.github.com/repos/crawl/crawl/forks","keys_url":"https://api.github.com/repos/crawl/crawl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crawl/crawl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crawl/crawl/teams","hooks_url":"https://api.github.com/repos/crawl/crawl/hooks","issue_events_url":"https://api.github.com/repos/crawl/crawl/issues/events{/number}","events_url":"https://api.github.com/repos/crawl/crawl/events","assignees_url":"https://api.github.com/repos/crawl/crawl/assignees{/user}","branches_url":"https://api.github.com/repos/crawl/crawl/branches{/branch}","tags_url":"https://api.github.com/repos/crawl/crawl/tags","blobs_url":"https://api.github.com/repos/crawl/crawl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crawl/crawl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crawl/crawl/git/refs{/sha}","trees_url":"https://api.github.com/repos/crawl/crawl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crawl/crawl/statuses/{sha}","languages_url":"https://api.github.com/repos/crawl/crawl/languages","stargazers_url":"https://api.github.com/repos/crawl/crawl/stargazers","contributors_url":"https://api.github.com/repos/crawl/crawl/contributors","subscribers_url":"https://api.github.com/repos/crawl/crawl/subscribers","subscription_url":"https://api.github.com/repos/crawl/crawl/subscription","commits_url":"https://api.github.com/repos/crawl/crawl/commits{/sha}","git_commits_url":"https://api.github.com/repos/crawl/crawl/git/commits{/sha}","comments_url":"https://api.github.com/repos/crawl/crawl/comments{/number}","issue_comment_url":"https://api.github.com/repos/crawl/crawl/issues/comments{/number}","contents_url":"https://api.github.com/repos/crawl/crawl/contents/{+path}","compare_url":"https://api.github.com/repos/crawl/crawl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crawl/crawl/merges","archive_url":"https://api.github.com/repos/crawl/crawl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crawl/crawl/downloads","issues_url":"https://api.github.com/repos/crawl/crawl/issues{/number}","pulls_url":"https://api.github.com/repos/crawl/crawl/pulls{/number}","milestones_url":"https://api.github.com/repos/crawl/crawl/milestones{/number}","notifications_url":"https://api.github.com/repos/crawl/crawl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crawl/crawl/labels{/name}","releases_url":"https://api.github.com/repos/crawl/crawl/releases{/id}","created_at":"2014-08-17T10:39:37Z","updated_at":"2015-09-10T20:46:14Z","pushed_at":"2015-09-10T21:59:07Z","git_url":"git://github.com/crawl/crawl.git","ssh_url":"git@github.com:crawl/crawl.git","clone_url":"https://github.com/crawl/crawl.git","svn_url":"https://github.com/crawl/crawl","homepage":"http://crawl.develz.org/","size":253754,"stargazers_count":92,"watchers_count":92,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":7,"forks":57,"open_issues":7,"watchers":92,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crawl/crawl/pulls/109"},"html":{"href":"https://github.com/crawl/crawl/pull/109"},"issue":{"href":"https://api.github.com/repos/crawl/crawl/issues/109"},"comments":{"href":"https://api.github.com/repos/crawl/crawl/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/crawl/crawl/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/crawl/crawl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crawl/crawl/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/crawl/crawl/statuses/d9fa9607deb02343ba23e59eff8fb15576176b01"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":18,"additions":1422,"deletions":524,"changed_files":22}}