{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/118","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/118/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/118/events","html_url":"https://github.com/chrsmith/bwapi/issues/118","id":59188919,"number":118,"title":"Did not look at API","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-27T04:43:42Z","updated_at":"2015-02-27T04:43:43Z","closed_at":"2015-02-27T04:43:43Z","body":"```\nI'm considering writing micro-management AI but I can't get the data i need\nfrom the API to control unit movement properly.  I don't know if it's\ninsufficient documentation or the functions just don't exist in the ai.  I\nneed to know:\n\n* movement options - are units limited to a number of directions (4 n,s,e,w\nor 8 nw,n,ne,e,se,...) or do they move in any possible direction?\n* there are \"walk tiles\" for mobility, yet \"pixels\" for unit position, can\nunits only stop on walk tiles or can they stop at any pixel coordinate?\n* how do i get info on whether a paticualr walk tile is passable or not\n(i.e. what is the isPassable(location) function)?  and on that, how do i\ntell if its a permanent obstacle, or one done by a building or a unit?\n* how do i get the spatial size of a unit (in pixels or walk tiles)?\n* how do i get how many pixels per frame a unit moves?  there is a \"max\nspeed\" parameter, but there are no units on them, so it's effectively\nworthless.  I NEED ALL UNITS IN FRAMES AND PIXELS.\n* i need attack range in pixels\n\n\n\n\n```\n\nOriginal issue reported on code.google.com by `happyjac...@gmail.com` on 18 Nov 2009 at 8:47"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/76330340","html_url":"https://github.com/chrsmith/bwapi/issues/118#issuecomment-76330340","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/118","id":76330340,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T04:43:43Z","updated_at":"2015-02-27T04:43:43Z","body":"```\nBWAPI doesn't have movement option information, but I think I can answer most \nof your\nother questions:\n\nStatic walkability data:\nBroodwar->walkable(x,y); //x and y in walk tile coordinates\n\nThe current set of accessible units on a build tile can be obtained via:\nBroodwar->unitsOnTile(x,y); //x and y in build tile coordinates\n\nInformation on different types of units (size, speed, attack range) can be \nfound via\nthe UnitType class at http://code.google.com/p/bwapi/wiki/UnitType\n\nUnit dimensions in pixels:\nunit->getType().dimensionLeft()\nunit->getType().dimensionUp()\nunit->getType().dimensionRight()\nunit->getType().dimensionDown()\n\nUnit dimensions in build tiles\nunit->getType().tileWidth()\nunit->getType().tileHeight()\n\nUnit speed:\nunit->getType().topSpeed()\n\nAttack range in pixels:\nunit->getType().groundWeapon()->maxRange()\nunit->getType().airWeapon()->maxRange()\n```\n\nOriginal comment by `lowerlo...@gmail.com` on 18 Nov 2009 at 8:59"}}