Return to “Suggestions”

Post

Re-center mouse when return to steering?

#1
Ok, here's a suggestion that seems like it could be pretty easy:

When you just get back to steering in space, whether it's because you've undocked, returned from the esc/main menu, or you've just left the space bar menu, how about centering the mouse in the middle of the screen (Or the window if player is in windowed mode)?

This way, it lets the player start control from a stable point; they will consistently just know where they are moving to. (Or they don't start moving in some direction determined by the mouse location of their last menu command.)


coder1000
Post

Re: Re-center mouse when return to steering?

#3
Also, some of us don't see so well and hey, I have to fire sometimes to know where my mouse is. A player could also use double-space or double-escape to re-center their steering, could be handy.

..Or some might think that the game is steering strangely, not realizing it was just where they last placed their mouse...

I don't know the APIs Josh is using but in some environments I've seen, there's actually a method that centers the mouse in the window (or the screen). You might not even have to calculate anything.
Post

Re: Re-center mouse when return to steering?

#4
coder1000 wrote:I don't know the APIs Josh is using but in some environments I've seen, there's actually a method that centers the mouse in the window (or the screen). You might not even have to calculate anything.
Josh uses sfml for his context creation which doesn't provide a method for finding the screen center but that's because it's completely trivial to make one.

Code: Select all

onDisplayResize()
{
    Vec2 screenCenter(screenWidth/2, screenHeight/2);//calculate the screen center once on display change
}
Using this you could do something like:

Code: Select all

onUpdate()
{
    Vec2 mouseDelta = Mouse.getPosition() - screenCenter; //get the change in mouse positon since last update
    Mouse.setPosition(screenCenter); //Recenter mouse
    /* Use mouseDelta for userinput related things */
}
This isn't how josh does it, he probably takes a normalized value of the current mouse position vs screen center without resetting it to center. It's just an example of trivial methods.
woops, my bad, everything & anything actually means specific and conformed
Post

Re: Re-center mouse when return to steering?

#5
Right ok then this would seem fairly straightforward to do.

So I would modify my original suggestion to being implemented as you describe Katawa, but I would say there could be a variety of reasons that you'd want to re-center the mouse.

Ok, maybe not go overboard on it but I think there's an point to be made here about things at least seeming to be a little more stable if the mouse can be centered after some of these items, so the player's ship doesn't start moving in a way the player might find a little unpredictable.
Post

Re: Re-center mouse when return to steering?

#6
I wasn't really addressing your centering idea, just your api comment. I'll do that now though.
I don't have the prototype so I can't comment on how it works now but in general I think centering your mouse when undocking is a pretty good idea, and probably just as important in other UI-to-flying cases.
woops, my bad, everything & anything actually means specific and conformed

Online Now

Users browsing this forum: No registered users and 0 guests

cron