{"action":"opened","issue":{"url":"https://api.github.com/repos/josefnpat/roguecraft-squadron/issues/439","repository_url":"https://api.github.com/repos/josefnpat/roguecraft-squadron","labels_url":"https://api.github.com/repos/josefnpat/roguecraft-squadron/issues/439/labels{/name}","comments_url":"https://api.github.com/repos/josefnpat/roguecraft-squadron/issues/439/comments","events_url":"https://api.github.com/repos/josefnpat/roguecraft-squadron/issues/439/events","html_url":"https://github.com/josefnpat/roguecraft-squadron/issues/439","id":337329552,"node_id":"MDU6SXNzdWUzMzczMjk1NTI=","number":439,"title":"Add chunks and wormholes/jumpgates","user":{"login":"josefnpat","id":646162,"node_id":"MDQ6VXNlcjY0NjE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/646162?v=4","gravatar_id":"","url":"https://api.github.com/users/josefnpat","html_url":"https://github.com/josefnpat","followers_url":"https://api.github.com/users/josefnpat/followers","following_url":"https://api.github.com/users/josefnpat/following{/other_user}","gists_url":"https://api.github.com/users/josefnpat/gists{/gist_id}","starred_url":"https://api.github.com/users/josefnpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josefnpat/subscriptions","organizations_url":"https://api.github.com/users/josefnpat/orgs","repos_url":"https://api.github.com/users/josefnpat/repos","events_url":"https://api.github.com/users/josefnpat/events{/privacy}","received_events_url":"https://api.github.com/users/josefnpat/received_events","type":"User","site_admin":false},"labels":[{"id":565984402,"node_id":"MDU6TGFiZWw1NjU5ODQ0MDI=","url":"https://api.github.com/repos/josefnpat/roguecraft-squadron/labels/feature%20request","name":"feature request","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"josefnpat","id":646162,"node_id":"MDQ6VXNlcjY0NjE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/646162?v=4","gravatar_id":"","url":"https://api.github.com/users/josefnpat","html_url":"https://github.com/josefnpat","followers_url":"https://api.github.com/users/josefnpat/followers","following_url":"https://api.github.com/users/josefnpat/following{/other_user}","gists_url":"https://api.github.com/users/josefnpat/gists{/gist_id}","starred_url":"https://api.github.com/users/josefnpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josefnpat/subscriptions","organizations_url":"https://api.github.com/users/josefnpat/orgs","repos_url":"https://api.github.com/users/josefnpat/repos","events_url":"https://api.github.com/users/josefnpat/events{/privacy}","received_events_url":"https://api.github.com/users/josefnpat/received_events","type":"User","site_admin":false},"assignees":[{"login":"josefnpat","id":646162,"node_id":"MDQ6VXNlcjY0NjE2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/646162?v=4","gravatar_id":"","url":"https://api.github.com/users/josefnpat","html_url":"https://github.com/josefnpat","followers_url":"https://api.github.com/users/josefnpat/followers","following_url":"https://api.github.com/users/josefnpat/following{/other_user}","gists_url":"https://api.github.com/users/josefnpat/gists{/gist_id}","starred_url":"https://api.github.com/users/josefnpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josefnpat/subscriptions","organizations_url":"https://api.github.com/users/josefnpat/orgs","repos_url":"https://api.github.com/users/josefnpat/repos","events_url":"https://api.github.com/users/josefnpat/events{/privacy}","received_events_url":"https://api.github.com/users/josefnpat/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-01T22:50:18Z","updated_at":"2018-07-01T22:50:18Z","closed_at":null,"author_association":"OWNER","body":"System allows for chunks.\r\n\r\nPlayers are presented with a map that would show all chunks they've visited. Clicking on chunks would change the player's view to that chunk. Objects do not interact with other chunks.\r\n\r\nWormholes are pre-generated recursively to account for missions and mission progression / difficulty. Each chunk has a difficulty level. The deeper the chunk, the more difficult it is.\r\n\r\nMaps have wormholes randomly generated. Left clicking on them will switch you to that chunk, and right mouse clicking on them with a unit will have the unit move to that unit.\r\n\r\nPlayers can build jumpgates (that act like wormholes) that will allow players to create more unexplored space. TBD\r\n\r\nChunks will stop updating after a timeout (lack of user input)\r\n\r\nChunks will load and deload from memory via serialization\r\n\r\nThere is a map UI that allows players to look at other chunks.\r\n\r\nExample:\r\n![image](https://user-images.githubusercontent.com/646162/42139569-d9a3a746-7d55-11e8-9123-9f1a00a9748e.png)\r\n\r\n\r\n```lua\r\nfunction love.load()\r\n  love.keypressed()\r\nend\r\n\r\nfunction addPoint(parent,depth)\r\n  depth = depth or 0\r\n  if depth == 4 then return end\r\n  parent.children = {}\r\n  for i = 1,math.random(1,2) do\r\n    local point = {\r\n      x = parent.x + math.random(-32,32)*8,\r\n      y = parent.y + math.random(-32,32)*8,\r\n    }\r\n    table.insert(parent.children,point)\r\n    addPoint(point,depth+1)\r\n  end\r\nend\r\n\r\n\r\n\r\nfunction drawPoint(parent)\r\n  love.graphics.circle(\"line\",parent.x,parent.y,16)\r\n  if parent.children then\r\n    for _,child in pairs(parent.children) do\r\n      love.graphics.line(parent.x,parent.y,child.x,child.y)\r\n      drawPoint(child)\r\n    end\r\n  end\r\nend\r\n\r\nfunction drawSquare(parent)\r\n  local x = math.floor(parent.x/64)\r\n  local y = math.floor(parent.y/64)\r\n  love.graphics.rectangle(\"fill\",x*64+2,y*64+2,64-4,64-4)\r\n  if parent.children then\r\n    for _,child in pairs(parent.children) do\r\n      drawSquare(child)\r\n    end\r\n  end\r\nend\r\n\r\nfunction love.draw()\r\n  love.graphics.setColor(0,255,0)\r\n  drawSquare(start)\r\n  love.graphics.setColor(255,255,255)\r\n  drawPoint(start)\r\nend\r\n\r\nfunction love.keypressed()\r\n  start = {\r\n    x = love.graphics.getWidth()/2,\r\n    y = love.graphics.getHeight()/2,\r\n  }\r\n  addPoint(start)\r\nend\r\n\r\n```"}}
{"actor":{"display_login":"josefnpat"}}