FPS Mouselook Control Issues with Standalone Player

Hey Guys.

I tried a few Mouselook scripts out there from the wild and all suffer from the same issue.

http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Game_Engine/FPS_Mouselook
http://www.cgmasters.net/free-tutorials/fps-mouselook-script-plus-real-text/

At first they seem to run fine. In the embeded Player it runs nicely. Trying them in the standalone player is erratic.
It barely to never works.

The goal is to have the standalone run “fullscreen” “desktop”
But also keeping it windowed, or setting a full screen resolution doesn’t work properly.

Now for the specifics, the mouselook is laggy. It stutters, sometimes hangs and often enough you’re locked to look straight upwards.

Tried it on 3 Machines with 2 Blender versions so far and I am lost to what the issue could be.

I just recently decided to delve into the BGE again. So is this a bug in the BGE, an issue with the scripts? Anyone got an idea?

I dont have that issue with forceLean.py
I hear the new mouselook actuator is to be much
smoother in 2.74

have you tried forcelean.py?
I have it bundled with packages,
look up wrectified easy mouse in resources,
or if you will be using vehicles, or changing actors,
master control mouse is nice.

There is an inbuilt mouselook now.

In the latest blender i’ve also had some erratics with my own custom mouselook script, with the camera sometimes locking drifting down. I dug throuh the code and I believe it seems to be that the mouse position doesn’t update correctly (ie mouse in different place to where bge thinks it is). No idea why.

the built in mouselook in 2.73 is “chunky” (it skips around rather then smooth movement)

I just tried my own mouselook and it works fine,
Do you reset the mouse cursor position every frame?

Just tried the mouse actuator… well. Even worse than any .py
In the embeded player it’s chunky, laggy and erratic.
In the standalone its barely working at all…

or am I doing it wrong? :smiley:
http://www.pasteall.org/blend/34310

no, it is not smooth at all, but apparently there is already a patch for that in 2.74

For what I read in the bugtracker there was a bug with resolutions not multiples of 2 and it should be patched in 2.73 already?
Or are there more issues?

No wonder people use Unity/UDK even for small projects if the BGE struggles with simple things like mouselook :frowning:

Did you try Kevins mouselook for wrectified?

it exposes the x and y as a property, so you can set it to 0, or multiply it by .9 etc, and it changes the angles.

Master contol mouse is a little more refined, as it uses a euler and sets orientation, rather then apply rotation. I can make a very simple version without the remote contol tonight.

Attachments

ControllerRecieverTemplate.blend (547 KB)

Thanks BPR, but your script has exactly the same issues. Works smoothly in embeded player, as soon as I go to fullscreen/desktop standalone player it’s all choppy and laggy.
Might indeed be a bug with the standalone Player?

The fix is already summitted in master and it will be available for 2.74.
Anyway, if you want to test it now you can download a dayly buid from https://builder.blender.org/download/ and give a try

I’ve already seen that when Anti Aliasing (AA sample in render panel) was activated. Is it the case?

Was the first thing i tried ystd when I read about the submitted patch.
Ystds. nightly has the same stuttering and on top of that the default mouselook.py that’s around and which i use is not working anmore lol.

Suspected that too at first, tried it with and without AA… no luck.
:confused:

I just test the blend that you provide with the dayly build in two different computers and it works well in both (as in embeded player as in fullscreen/desktop standalone player). Please, could additional people to check the file that arexma uploaded and say me if it works for them?

works fine for me.

I have to check it again then.
It might be an issue with multiple screen or multiple input devices.

Not working for me with todays nightly and the file I posted.

I am using my displays native resolution of 1920x1200.
No matter if I letterbox, scale or fit, turn on/off AA, windowed or fullscreen, resolution set fixed or using desktop checkbox.

The mouselook is unusable when using the standalone player. Embeded runs.
Only if I use 640x480 and windowed the mouselook works properly when running the embeded player.

And naturally if I export to a binary runtime, it doesn’t work either.

Yet another thing, as I wanted to try my old mouselook.py in the nightly.
It can’t import bge anymore?

Console spits errors from all my scripts that ‘bge’ is undefined?

Do you have/use multiple screens? it didn’t take that into account in the mouse implementation.
If yes, I will have to find how to get the resolution of the screen that your are playing the standalone player.

Yes, multiple screens. And to make matters worse, one is rotated 90°CCW :slight_smile:

In the evening I could test it on a single screen system to make sure.
But the patch has to work on multi screen systems as well, obviously, else you ship a binary of your BGE project and if anyone has multiple screens controls go haywire.

Just disconnecting the second screen doesn’t seem to help. Controls feel slightly better but not really.