Closed Nokia64 closed 2 years ago
Well, I'm not getting slowdown, though it does seem to have a bit of delay releasing keys. That is, if I press down for a second or so, it takes a second or so to stop after I release the key. Is that the issue you're talking about?
Yes, that is it. The weirdest part, is that it is the whole FreeJ2ME what "lags", not only the game. Try, in example, using the [+] [-] scaling hotkeys while the movement quirks occur.
Took a look at the byte-code for this and found that there is heavy use of various kinds of synchronization (synchronized (foo)
, Object.wait()
, Vector
which is always synchronized, and Canvas.callSerially()
). There are multiple threads involved and lots of the event handling methods are locking monitors as part of their event handling (which is always a bad idea).
@XerTheSquirrel could you check Bounce Tales too (regarding lag)? https://github.com/hex007/freej2me/issues/52
@XerTheSquirrel could you check Bounce Tales too (regarding lag)?
52
I would need the JAR to check it out.
Sent you an email.
This might be worth checking again after @Nokia64's last commit.
Good catch, these quite solved this issue indeed! Sounds like all the threading and locking involved as @ XerTheSquirrel described wasn't playing nicely with all the unexpected keyPressed events Thank y'all!
Neat RPG from Korea. Popular for it's deep mechanics / gameplay, and amazing pixel-esque graphics, PC/Console RPG alike.
On FreeJ2ME, the games suffers from severe lag issues while moving around, on every JAR release I tried. Input gets nested, and last many frames longer than expected. In fact, it's the whole FreeJ2ME what lags, as features such as screenshotting lag behind too.