Mojo Render Lagging

About Monkey 2 Forums Monkey 2 Programming Help Mojo Render Lagging

This topic contains 21 replies, has 9 voices, and was last updated by  peterigz 2 years, 5 months ago.

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #5901

    peterigz
    Participant

    To hide the mouse:

    #5902

    Richard Betson
    Participant

    Hi,

    I have included an image of cursor movement within my Monkey 2 application. In view are both a system (OS) cursor and a local application cursor (the larger one) that is drawn using Mouse.x/y. Here I am capturing the screen while moving the cursor from right to left (moderate/slow movement). As you can see the locally drawn cursor is some distance from the actual system cursors position. This lag or delay in reporting position is noticeable. Whether it is a Linux, SDL or Monkey 2 issue it is a thing and noticeable.

    It makes me also wonder why I get smooth mouse position data in my monkey 2 application but applications like Ted2 or Ted2GO seem to have wild positioning/scaling issues with console and treeview, at least on Linux. Why is it that the mouse position in my application is reported fine but seems out of control in some others? If I recall Mark linked the Ted2 issue to an SDL issue, but why does that same issue not extend to my application?

    Attachments:
    #5904

    Jesse
    Participant
    [/crayon]

    Peter beat me to it.

    #5913

    nerobot
    Participant

    deleted.

    #5917

    arpie
    Participant

    Does anybody know if it is possible to get the mouse coordinates when the pointer is outside the app window?

    #6387

    arpie
    Participant

    There is something lagging, somewhere.  I tried to ignore it but it kept bugging me so I decided to try bypassing mojo and used a direct SDL call to get the mouse coordinates and… they are one frame ahead of mojo’s.  Or at least, they are here, anyway.  Attached is the code I used to test this and a screenshot of how it looks here.  Can anybody else test this?  Is it just my hardware or is it a mojo bug (I suspect the mojo bug atm).

    Attachments:
    #6412

    peterigz
    Participant

    Does it as well here. The “fix”, and I use that word loosely because there could be a reason why Mark did it like this, is to change the order the mouse.Update is called in the UpdateEvents() method of app.monkey2

    The original version looks like this:

    So move the Mouse.Update() after SDL_PollEvent (I moved keyboard and touch after as well):

    If that’s an ok fix then maybe Mark can update or I can do a pull request. I just tried it with the game I’ve been doing and everything still works fine.

Viewing 7 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic.