{"action":"created","issue":{"url":"https://api.github.com/repos/craftyjs/Crafty/issues/903","labels_url":"https://api.github.com/repos/craftyjs/Crafty/issues/903/labels{/name}","comments_url":"https://api.github.com/repos/craftyjs/Crafty/issues/903/comments","events_url":"https://api.github.com/repos/craftyjs/Crafty/issues/903/events","html_url":"https://github.com/craftyjs/Crafty/issues/903","id":75758298,"number":903,"title":"Gravity + Jetpack?","user":{"login":"ashes999","id":18432,"avatar_url":"https://avatars.githubusercontent.com/u/18432?v=3","gravatar_id":"","url":"https://api.github.com/users/ashes999","html_url":"https://github.com/ashes999","followers_url":"https://api.github.com/users/ashes999/followers","following_url":"https://api.github.com/users/ashes999/following{/other_user}","gists_url":"https://api.github.com/users/ashes999/gists{/gist_id}","starred_url":"https://api.github.com/users/ashes999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashes999/subscriptions","organizations_url":"https://api.github.com/users/ashes999/orgs","repos_url":"https://api.github.com/users/ashes999/repos","events_url":"https://api.github.com/users/ashes999/events{/privacy}","received_events_url":"https://api.github.com/users/ashes999/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-12T22:18:11Z","updated_at":"2015-05-13T21:32:06Z","closed_at":"2015-05-13T01:26:47Z","body":"I'm trying to add \"jetpack\"-like functionality to my player. When I add the `Gravity` component, I get the following (desirable) behaviours:\r\n\r\n- Left/right to move left/right\r\n- Up to jump\r\n- Fall until you hit something solid\r\n\r\nWhat I would like to figure out, is how I can press/hold the up button and fly upward. Is it enough to bind the `EnterFrame` event and add to the player's `y` position? Is there a better way to do this?\r\n\r\nNB: if jumping gets disabled in the process, that's cool too."},"comment":{"url":"https://api.github.com/repos/craftyjs/Crafty/issues/comments/101822283","html_url":"https://github.com/craftyjs/Crafty/issues/903#issuecomment-101822283","issue_url":"https://api.github.com/repos/craftyjs/Crafty/issues/903","id":101822283,"user":{"login":"ashes999","id":18432,"avatar_url":"https://avatars.githubusercontent.com/u/18432?v=3","gravatar_id":"","url":"https://api.github.com/users/ashes999","html_url":"https://github.com/ashes999","followers_url":"https://api.github.com/users/ashes999/followers","following_url":"https://api.github.com/users/ashes999/following{/other_user}","gists_url":"https://api.github.com/users/ashes999/gists{/gist_id}","starred_url":"https://api.github.com/users/ashes999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashes999/subscriptions","organizations_url":"https://api.github.com/users/ashes999/orgs","repos_url":"https://api.github.com/users/ashes999/repos","events_url":"https://api.github.com/users/ashes999/events{/privacy}","received_events_url":"https://api.github.com/users/ashes999/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T21:32:06Z","updated_at":"2015-05-13T21:32:06Z","body":"It's not that it doesn't work (although with the new js fiddle, if you hold `w`, you just jump normally) -- it's two things:\r\n\r\n1) I find the pre-existing Crafty components really dense. I can't understand them (especially how to extend them), especially without looking at the source.\r\n2) The source, and examples from you, are usually the latest (dev) versions. I have to download and rebuild the local sources, instead of using the latest production version (0.6.2 as of writing).\r\n\r\nI'm using CraftyJS for prototyping. The perception is (rightly) \"well I can wire up gravity, collision, etc. in a matter of minutes\" -- but changing those behaviours (eg. can't jetpack, can't figure out how to make this work) is really a hassle.\r\n\r\nAs much as you are extremely helpful and provide working examples (something very rare in GitHub culture), I can't expect you to write all my code for me. I don't know where that leaves me, because there's no other tool that gives me this much, this fast.\r\n\r\n(end soapbox)"}}