{"action":"created","issue":{"url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/issues/979","repository_url":"https://api.github.com/repos/Maescool/Catacomb-Snatch","labels_url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/issues/979/labels{/name}","comments_url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/issues/979/comments","events_url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/issues/979/events","html_url":"https://github.com/Maescool/Catacomb-Snatch/issues/979","id":6385648,"number":979,"title":"Slick2D implementation [Discussion]","user":{"login":"kylecbrodie","id":1078909,"avatar_url":"https://avatars.githubusercontent.com/u/1078909?v=3","gravatar_id":"","url":"https://api.github.com/users/kylecbrodie","html_url":"https://github.com/kylecbrodie","followers_url":"https://api.github.com/users/kylecbrodie/followers","following_url":"https://api.github.com/users/kylecbrodie/following{/other_user}","gists_url":"https://api.github.com/users/kylecbrodie/gists{/gist_id}","starred_url":"https://api.github.com/users/kylecbrodie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylecbrodie/subscriptions","organizations_url":"https://api.github.com/users/kylecbrodie/orgs","repos_url":"https://api.github.com/users/kylecbrodie/repos","events_url":"https://api.github.com/users/kylecbrodie/events{/privacy}","received_events_url":"https://api.github.com/users/kylecbrodie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/labels/Discussion","name":"Discussion","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2012-08-22T18:55:37Z","updated_at":"2016-03-11T23:06:11Z","closed_at":"2016-03-11T23:06:11Z","body":"I am currently working on implementing Catacomb Snatch in Slick2D so we can get accelerated graphics (see my [slick](https://github.com/KyleBrodie/Catacomb-Snatch/tree/slick) branch). But there is one thing that I want your opinion on.\nSo in Slick2D the game updates happen in a `void update(int delta);` method that provides the milliseconds that have passed since the last update. So I was wondering, should I accumulate that delta and then run the tick() for every 16ms, or should we add an `update(int delta);` method to all classes?\n\nI am leaning more towards using just `update(int delta);` but I want to find out what you guys think. here are the pros and cons I thought of.\n\n## Running `tick()` in `update(int delta);`\n### Pros\n* no need to rewrite the game logic (BIG pro)\n\n### Cons\n* the game doesn't know what platform it is on; (will have to provide all the same methods as the old version; duplicate & possibly inefficient code)\n* may be less efficient than `update`; (builds up an \"update\" stack multiple time because of the multiple invocations of `tick`)\n* forces 60 updates a second\n\n## just using `update(int delta);`\n### Pros\n* allows for Slick to selectively slow down or speed up the logic updates (min: 30 max: 60 updates a second)\n* works on one \"update\" stack (may be more efficient)\n* lets the game know it is working with a different implementation (allows us to use methods and classes that have been rewritten to be more idiomatic Slick/more efficient)\n\n### Cons\n* requires a rewrite of the game logic to work on time deltas. (though a lot will copied and pasted)\n* duplicate code (until we completely ditch the old code)\n\nAlso just to make sure you know this; this won't affect the rendering process as there will be two render methods. One for software based and one for Slick2D (OpenGL). So that we can provide the option to the player to use either. (I guess if their computer doesn't support OpenGL? or if Slick2D/OpenGL is acting up? those are only two reason I can think of for keeping the software based renderer)."},"comment":{"url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/issues/comments/195596543","html_url":"https://github.com/Maescool/Catacomb-Snatch/issues/979#issuecomment-195596543","issue_url":"https://api.github.com/repos/Maescool/Catacomb-Snatch/issues/979","id":195596543,"user":{"login":"Maescool","id":197110,"avatar_url":"https://avatars.githubusercontent.com/u/197110?v=3","gravatar_id":"","url":"https://api.github.com/users/Maescool","html_url":"https://github.com/Maescool","followers_url":"https://api.github.com/users/Maescool/followers","following_url":"https://api.github.com/users/Maescool/following{/other_user}","gists_url":"https://api.github.com/users/Maescool/gists{/gist_id}","starred_url":"https://api.github.com/users/Maescool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maescool/subscriptions","organizations_url":"https://api.github.com/users/Maescool/orgs","repos_url":"https://api.github.com/users/Maescool/repos","events_url":"https://api.github.com/users/Maescool/events{/privacy}","received_events_url":"https://api.github.com/users/Maescool/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T23:06:11Z","updated_at":"2016-03-11T23:06:11Z","body":"Closing this, this branch is LWJGL and the https://github.com/Catacomb-Snatch/Catacomb-Snatch is the LibGDX version"}}