It seems similar to this BYOND bug.
I'm working on a sidescroller and it has a small HUD, maybe 10-15 objects. The presence of the HUD causes the game to be a little bit choppy. The screen objects aren't being updated, just moving around while having them on the screen makes movement choppier. I could believe that a complex HUD might cause this, but this is only a few objects.
I haven't had time to narrow down the problem. Though, unlike the BYOND bug I linked to, I don't think that the client's pixel offset is being set multiple times per tick here. I do seem to notice the lag more when the player is moving in the x and y directions, maybe updating client.pixel_x then client.pixel_y is causing the same problem that was observed when updating client.pixel_y twice.
Is there anything about the handling of screen objects that I should know to help figure out what the problem is? I'd rather not waste time making a lot of uneducated guesses.
Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
|
|
Expected Results:
Actual Results:
Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
When does the problem NOT occur?
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Workarounds:
Use images and attach them to invisible objects that move every time the player's display moves.
The player can move up to 32 pixels from the center of the view before the camera will scroll to follow the player. This means there's a little space you can walk back and forth in that won't cause the camera to move. When moving back and forth in this space the framerate is good. As soon as I move outside the space and the camera needs to scroll, the framerate drops significantly.
Initially I figured there was just something inefficient about how screen objects are drawn that can't cause detectable problems with a lower framerate. But because it only happens when the screen moves, I'm not sure what the problem could be.