randomwalk
|
Posted: December 02, 2009 05:04 by randomwalk
|
|
I finished typing in the tutorial. When I run it, I get a bit of stuttering movement in response to the left arrow key, then it dies down to a fitful pixel or two every several seconds. It says at top left that it is drawing 1950+ FPS. Right arrow gives a few pitiful lurches like the left arrow. I'm on a MacBook Pro 2.4 GHz, 4G, Leopard 10.5.8. The game is running at 100.2% CPU so it is basically using one core. When I brought the window forward in the midst of writing this, it was moderately responsive to the right key for about a second, giving a couple of inches of movement, then a stutter, then back into a response coma. Should I switch from the gem to the repo? |
Barely responsive to left and right keys
Replies: 5 - Last Post: December 10, 2009 05:02
by: jaymcgavren
by: jaymcgavren
showing 1 - 6 of 6
Logan Barnett
|
Posted: December 02, 2009 15:27 by Logan Barnett
|
|
I'm curious what if there's a difference for you with the gem and the repo. You can just switch out the jemini.jar that gets generated for a project to see its effects. If the problem continues, you might increase the movement rate. I'm not entirely sure why your movement rate appears to change over time. It could be that the VM is still warming up at that point. |
randomwalk
|
Posted: December 08, 2009 05:52 by randomwalk
|
|
Got back to it a bit tonight, still using the gem version. Tried a few experiments. One that helped, I added a couple of puts statements, and strangely enough, it made it much more responsive. When I pulled them out again, it was less so again, seemed like it queued up a lot of key messages then and slowly and intermittently played them out even after I had let up on the key. With the puts it was sometimes almost entirely responsive and sometimes deaf to holding the key until I let it up and clicked down again a time or a few times or waited a few seconds, but once it was recognized, it would keep moving until I let up. Also tried different keys, in case it was a keyboard problem. Having the puts statement made it clear that when the "hero" box didn't move, it was not executing the handle_event, since it didn't output positions until it started moving again. def load self.image = :hero handle_event :move_left do | message | position.x -= MOVEMENT_RATE * message.delta puts position.x.to_s end handle_event :move_right do | message | position.x += MOVEMENT_RATE * message.delta puts position.x.to_s end end |
jaymcgavren
|
Posted: December 08, 2009 08:35 by jaymcgavren
|
|
Hrmmm, so slowing things down makes it more responsive? Seems like something's interfering with the input message queue. I'm not able to look at this in depth tonight, but if you want to try with the repo version, the commands should be something like this: git clone ssh://jaymcgavren@git.kenai.com/jemini~mainline jemini cd jemini jruby -S rake rawr:jar cp pkg/jar/jemini.jar ../myproject/lib/java/jemini.jar |
Logan Barnett
|
Posted: December 08, 2009 16:21 by Logan Barnett
|
|
You'll need to put in your own username instead of Jay's of course (: |
jaymcgavren
|
Posted: December 10, 2009 05:02 by jaymcgavren
|
Indeed, your own username would work much better there. ![]() randomwalk, I wasn't able to reproduce this (on a 2.4 Ghz Intel dual core, gem version 2009.11.22). Let us know how the repo version works. If you're having trouble with the repo, let us know and we'll hustle with a gem release. |
showing 1 - 6 of 6
Replies: 5 - Last Post: December 10, 2009 05:02
by: jaymcgavren
by: jaymcgavren









