Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Cannot reach maximum pitch under mouse control.

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Cannot reach maximum pitch under mouse control.

Post by Capt. Murphy »

Hi,

Whilst attempting to force misjump I've noted that it's not possible to reach maximum pitch under mouse control. I'd estimate from the HUD that it gets to about 90-95% of the value under keyboard control. No problem getting to maximum roll.

Windows XP - 1.75.4.4621
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Cannot reach maximum pitch under mouse control.

Post by Smivs »

Yes, it's the same with my joystick. You have to use the up/down arrows on the keyboard.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Cannot reach maximum pitch under mouse control.

Post by Gimi »

This is a common problem. My game controller and mouse can't do max pitch, my joystick and keyboard can, and I do believe I have the same joystick as Smivs (Logitech Attach 3). Something we have to live with I'm afraid.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: Cannot reach maximum pitch under mouse control.

Post by JazHaz »

I seem to remember that the original Elite on the BBC Micro, used the BBC's analogue sticks. Unlike today's digital ones, these gave much finer control than todays sticks.

The above link says that docking with these sticks on BBC Elite was much harder though than with a digital stick.
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Cannot reach maximum pitch under mouse control.

Post by Gimi »

JazHaz wrote:
I seem to remember that the original Elite on the BBC Micro, used the BBC's analogue sticks. Unlike today's digital ones, these gave much finer control than todays sticks.

The above link says that docking with these sticks on BBC Elite was much harder though than with a digital stick.
Hmm. I thought it was the other way around. At least on the C64 it was. The joystick for the c64 was digital (or it was switch based to be more precise). Thus you had to nudge it all the time when docking, much like using the keys today. Most joysticks today are analogue (they use potentiometers for better control)
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8512
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Cannot reach maximum pitch under mouse control.

Post by DaddyHoggy »

Gimi wrote:
JazHaz wrote:
I seem to remember that the original Elite on the BBC Micro, used the BBC's analogue sticks. Unlike today's digital ones, these gave much finer control than todays sticks.

The above link says that docking with these sticks on BBC Elite was much harder though than with a digital stick.
Hmm. I thought it was the other way around. At least on the C64 it was. The joystick for the c64 was digital (or it was switch based to be more precise). Thus you had to nudge it all the time when docking, much like using the keys today. Most joysticks today are analogue (they use potentiometers for better control)
Docking on the C64 was indeed a pig - I had an Atari 2600 stick (because I could spin it round and shoot from view port) and I remember in the end I just learned to fly basically flat out when the rotation was at a certain angle - knowing I'd go almost straight in. Which is why I smile a rueful/knowing smile with all the pilots now who say docking is too hard (dons Monty Python flat cap)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
CommonSenseOTB
---- E L I T E ----
---- E L I T E ----
Posts: 1397
Joined: Wed May 04, 2011 10:42 am
Location: Saskatchewan, Canada

Re: Cannot reach maximum pitch under mouse control.

Post by CommonSenseOTB »

Both on the C64 and the Amiga I used a quickshot atari type joystick with a fire button on the base and a thumb button on the top of the stick. The suction cups built in to the base kept it glued next to the computer during hard maneuvers. Boy that brings back memories... :D
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.


CommonSense 'Outside-the-Box' Design Studios Ltd.
WIKI+OXPs
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Cannot reach maximum pitch under mouse control.

Post by Capt. Murphy »

Gimi wrote:
Something we have to live with I'm afraid.
Really? I think it's a bug worth trying to fix...

Anyway I think I know what's going on. There is a variable in the Source Code #define MOUSE_VIRTSTICKSENSITIVITY 930.0f.

I think this is the number of pixels needed either horizontally or vertically to hit maximum roll/pitch using mouse control. My native resolution (used by oolite in fullscreen mode) is 1280 x 800. So there is more than enough horizontal pixels to achieve maximum roll (and if playing in a maximised window at this resolution with mouse control full roll is achieved before the mouse pointer gets to the sides of the window). But there aren't enough vertical pixels to achieve max pitch.

I managed to force my PC to use a resolution of 1280 x 1024. This is bigger than than the monitor can handle so the desktop is bigger than the monitor and either the top or bottom of a maximised window can't be seen. But crucially I can achieve max pitch under mouse control playing in a maximised window at this resolution.

There is a comment elsewhere in the code indicating an intention to make the virtual stick sensitivity configurable. Please do, or at least vary it depending on the detected full screen native resolution and/or window size.

Code: Select all

case SDL_MOUSEMOTION:
                        {
                                // Delta mode is set when the game is in 'flight' mode.
                                // In this mode, the mouse movement delta is used rather
                                // than absolute position. This is because if the user
                                // clicks the right button to recentre the virtual joystick,
                                // if we are using absolute joystick positioning, as soon
                                // as the player touches the mouse again, the virtual joystick
                                // will snap back to the absolute position (which can be
                                // annoyingly fatal in battle).
                                if(mouseInDeltaMode)
                                {
                                        // possible TODO - make virtual stick sensitivity configurable
                                        SDL_GetRelativeMouseState(&mxdelta, &mydelta);
                                        double mxd=(double)mxdelta / MOUSE_VIRTSTICKSENSITIVITY;
                                        double myd=(double)mydelta / MOUSE_VIRTSTICKSENSITIVITY;
                                       
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Cannot reach maximum pitch under mouse control.

Post by Eric Walch »

Capt. Murphy wrote:
Gimi wrote:
Something we have to live with I'm afraid.
Really? I think it's a bug worth trying to fix...

Anyway I think I know what's going on. There is a variable in the Source Code #define MOUSE_VIRTSTICKSENSITIVITY 930.0f.
Sound as if the MOUSE_VIRTSTICKSENSITIVITY should not be a constant but a variable that also looks at the screen resolution. :wink:

Anyhow, good find. I think this is already the biggest step to the solution. But when I search for the constant MOUSE_VIRTSTICKSENSITIVITY, I get zero finds. So it must be in the windows-only part of the code.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Cannot reach maximum pitch under mouse control.

Post by Capt. Murphy »

[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Cannot reach maximum pitch under mouse control.

Post by Gimi »

This issue has been touched upon before, and I think the conclusion was that this is related to the drivers and calibration software in Windows and not to the Oolite code. For some joysticks the maximum flex will change with calibration and wear and tear of the potentiometers. I play Oolite at full HD (1920-1080 on desktop) or (1920-1200 on laptop) and I still see this problem on my mouse and game controller. Anyway, if it can be fixed, nothing is better.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Re: Cannot reach maximum pitch under mouse control.

Post by Micha »

Can't reproduce on my desktop or laptop. The laptop has a native res of 1366x768, and on the desktop I tried various resolutions down to 640x480. In all cases I could get full pitch using the mouse and cause a witchspace malfunction.

PS. This is on Linux - sorry didn't see the new posts mentioning it might be a Windows-only issue.
The glass is twice as big as it needs to be.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Cannot reach maximum pitch under mouse control.

Post by Capt. Murphy »

I think it must be windows only - playing in a maximised window at 800x600 I can't get max roll or pitch via mouse.

I was going to try to build from source with some different values for MOUSE_VIRTSTICKSENSITIVITY but terrastorage.ath.cx seems to be down at the moment so I can't get a copy of the Oolite Development Environment - Light Edition.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Cannot reach maximum pitch under mouse control.

Post by Smivs »

I have this problem as stated above...my joystick (Attack 3) won't pitch enough, and I use Linux.
Commander Smivs, the friendliest Gourd this side of Riedquat.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6572
Joined: Wed Feb 28, 2007 7:54 am

Re: Cannot reach maximum pitch under mouse control.

Post by another_commander »

I think it's a problem with the Oolite code actually and it looks like Capt. Murphy has nailed it nicely (thanks for that Captain, good work). I am about to commit a fix, which is essentially making the sensitivity dependent on the game view's resolution. It now works for me on Windows in both windowed and full screen mode. Once committed, I would really appreciate some testing both from other Windows users and our Linux people, to be sure that nothing is broken (in which case will revert immediately).
Post Reply