Mouse flight control in Windowed mode
Moderators: winston, another_commander
Mouse flight control in Windowed mode
Would it be possible to implement mouse flight control in windowed mode? I note that when I played minecraft the game controlled the mouse, but it was simple to press escape to access the mouse for standard window control. Something similar could be done for Oolite, ie., Shift/Shift+Control/+"M", and then if you need to use the mouse pointer, press F5-F8 to throw up a console window, which doesn't need flight control. Returning to F1-F4 brings back mouse flight control.
Sydney2K
Sydney2K
Re: Mouse flight control in Windowed mode
Which OS is this? On my Linux build, 'shift-M' toggles mouse control in windowed mode just the same as in fullscreen. Or have I misunderstood what you're asking for?
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Mouse flight control in Windowed mode
I just tried that with the latest vanilla trunk (Win 7 x64), and 'shift-m' doesn't seem to work in windowed mode (works fine in fullscreen).cim wrote:On my Linux build, 'shift-M' toggles mouse control in windowed mode just the same as in fullscreen.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: Mouse flight control in Windowed mode
Oops, Windows OS, I assumed it was the same for all flavours of ice creamcim wrote:Which OS is this?
Sydney2K
-
- Quite Grand Sub-Admiral
- Posts: 6668
- Joined: Wed Feb 28, 2007 7:54 am
Re: Mouse flight control in Windowed mode
Mouse in windowed mode works in Windows as well, but only for debug builds. For all other build types it is by default enabled only in fullscreen mode. If you want to enable it also for windowed mode, add this line inside .GNUstepDefaults:
Then launch the game and press Shift+M (or Shift+Ctrl+M if you want yaw on the mouse x-axis) while running in a window and it will work just fine.
Code: Select all
"mouse-control-in-windowed-mode" = YES;
Re: Mouse flight control in Windowed mode
DYNO-MITE! <insert .gif>another_commander wrote:Mouse in windowed mode works in Windows as well, but only for debug builds.
Sydney2K
-
- Average
- Posts: 8
- Joined: Mon Aug 10, 2015 6:21 am
Re: Mouse flight control in Windowed mode
That didn't work for me. I could find no such file in which to paste that text. I'm using Win7 btw. I looked everywhere for the .GNUstepDefaults file. None.another_commander wrote:Mouse in windowed mode works in Windows as well, but only for debug builds. For all other build types it is by default enabled only in fullscreen mode. If you want to enable it also for windowed mode, add this line inside .GNUstepDefaults:Then launch the game and press Shift+M (or Shift+Ctrl+M if you want yaw on the mouse x-axis) while running in a window and it will work just fine.Code: Select all
"mouse-control-in-windowed-mode" = YES;
-
- Quite Grand Sub-Admiral
- Posts: 6668
- Joined: Wed Feb 28, 2007 7:54 am
Re: Mouse flight control in Windowed mode
The .GNUstepDefaults file in Windows is located at
<OoliteRootFolder>\oolite.app\GNUstep\Defaults
. It is created by the game the first time it runs.-
- Average
- Posts: 8
- Joined: Mon Aug 10, 2015 6:21 am
Re: Mouse flight control in Windowed mode
I checked again it wasn't there. Reinstalled game, now it's there. Tried adding that line, and made sure to save it. Started the game up, no dice. Checked file after game play. File was as if I never added the code you showed here. Really weird.another_commander wrote:The .GNUstepDefaults file in Windows is located at<OoliteRootFolder>\oolite.app\GNUstep\Defaults
. It is created by the game the first time it runs.
First (and only) line of code in that file says this:
{
NSGlobalDomain = {
};
oolite = {
"Jameson-humbletrash" = "-29624";
"gamma-value" = 1;
window_height = 1058;
window_width = 1920;
};
}
After which, on line two, I added your text exactly as you posted it, quotes and semicolon and all.
"mouse-control-in-windowed-mode" = YES;
Don't know why the file erases it after I run the game. It lets me save it to the file, but then its gone after I start the game.
-
- Quite Grand Sub-Admiral
- Posts: 6668
- Joined: Wed Feb 28, 2007 7:54 am
Re: Mouse flight control in Windowed mode
Where is the game installed? Is it by chance in C:\Program Files? This sounds like an OS file virtualization issue.
If you can post a Latest.log, please do so, it may be of help too.
As a test, I copied the contents of .GNUstepDefaults as they appear in your post into a new .GNUstepDefaults file in my installation. Then run the game, exited, then added the mouse control in window line, again copied from your post above. Run the game again, Shift+M worked fine in the 1920x1058 window. For completeness, I will mention that I added the mouse control line below the gamma value line (for no other reason than alphabetical ordering). All this in Windows 7 64-bit Enterprise.
If you have indeed installed the game in something like C:\Program Files or My Documents, my advice would be to uninstall it and re-install in a non-Program Files folder. This will evade file virtualization issues and is the reason why the installer proposes C:\Oolite by default.
If you can post a Latest.log, please do so, it may be of help too.
As a test, I copied the contents of .GNUstepDefaults as they appear in your post into a new .GNUstepDefaults file in my installation. Then run the game, exited, then added the mouse control in window line, again copied from your post above. Run the game again, Shift+M worked fine in the 1920x1058 window. For completeness, I will mention that I added the mouse control line below the gamma value line (for no other reason than alphabetical ordering). All this in Windows 7 64-bit Enterprise.
If you have indeed installed the game in something like C:\Program Files or My Documents, my advice would be to uninstall it and re-install in a non-Program Files folder. This will evade file virtualization issues and is the reason why the installer proposes C:\Oolite by default.
-
- Average
- Posts: 8
- Joined: Mon Aug 10, 2015 6:21 am
Re: Mouse flight control in Windowed mode
It's installed where it prompted by default, in the C:/ folder. It is on par with Programs, and Programs x86 but it is not in those or any others. It is right under the C:/ directory.
Here's the activity log:
Opening log for Oolite version 1.82 (x86-64) under Windows 6.1.7601 Service Pack 1 64-bit at 2015-08-10 00:12:22 -0700.
8 processors detected.
Build options: OpenAL, new planets.
Note that the contents of the log file can be adjusted by editing logcontrol.plist.
00:12:22.776 [display.mode.list.native]: Windows native resolution detected: 1920 x 1080
00:12:23.282 [joystick.init]: Number of joysticks detected: 0
00:12:23.283 [rendering.opengl.version]: OpenGL renderer version: 3.1.0 ("3.1.0 - Build 8.15.10.2361"). Vendor: "Intel". Renderer: "Intel(R) HD Graphics Family".
00:12:23.283 [rendering.opengl.extensions]: OpenGL extensions (102):
GL_NV_primitive_restart, GL_ARB_texture_env_crossbar, GL_EXT_abgr, GL_ARB_shadow, GL_IBM_texture_mirrored_repeat, GL_EXT_separate_specular_color, GL_EXT_texture_edge_clamp, GL_EXT_blend_minmax, GL_EXT_draw_buffers2, GL_ARB_texture_env_add, GL_ARB_draw_elements_base_vertex, GL_ARB_sampler_objects, GL_EXT_framebuffer_blit, GL_EXT_transform_feedback, GL_ARB_texture_env_dot3, GL_EXT_framebuffer_object, GL_EXT_blend_subtract, GL_3DFX_texture_compression_FXT1, GL_NV_conditional_render, GL_ARB_vertex_array_bgra, GL_EXT_texture_snorm, GL_ARB_multitexture, GL_EXT_stencil_wrap, GL_ARB_texture_border_clamp, GL_ARB_framebuffer_sRGB, GL_ARB_texture_env_combine, GL_EXT_framebuffer_multisample, GL_EXT_texture_env_add, GL_EXT_packed_pixels, GL_SGIS_texture_edge_clamp, GL_ARB_depth_clamp, GL_INTEL_performance_queries, GL_ARB_uniform_buffer_object, GL_ARB_depth_texture, GL_SGIS_texture_lod, GL_ARB_occlusion_query, GL_ARB_transpose_matrix, GL_NV_texgen_reflection, GL_EXT_stencil_two_side, GL_ARB_seamless_cube_map, GL_ARB_shading_language_100, GL_ARB_texture_compression_rgtc, GL_EXT_gpu_program_parameters, GL_EXT_texture_shared_exponent, GL_EXT_rescale_normal, GL_ARB_map_buffer_range, GL_ARB_pixel_buffer_object, GL_EXT_secondary_color, GL_ARB_copy_buffer, GL_ARB_half_float_pixel, GL_EXT_blend_equation_separate, GL_EXT_draw_range_elements, GL_EXT_texture_lod_bias, GL_EXT_texture_filter_anisotropic, GL_ARB_half_float_vertex, GL_EXT_texture_swizzle, GL_SGIS_generate_mipmap, GL_ARB_texture_rectangle, GL_ARB_texture_non_power_of_two, GL_ARB_point_sprite, GL_EXT_packed_depth_stencil, GL_ARB_vertex_shader, GL_EXT_texture_compression_s3tc, GL_EXT_texture_integer, GL_ARB_depth_buffer_float, GL_ARB_sync, GL_ARB_draw_instanced, GL_ARB_vertex_buffer_object, GL_WIN_swap_hint, GL_ARB_color_buffer_float, GL_ARB_shader_objects, GL_EXT_texture_array, GL_ATI_separate_stencil, GL_ARB_framebuffer_object, GL_EXT_packed_float, GL_ARB_compatibility, GL_EXT_texture_rectangle, GL_ARB_texture_rg, GL_ARB_fragment_shader, GL_EXT_fog_coord, GL_EXT_texture3D, GL_ARB_window_pos, GL_ARB_fragment_program, GL_ARB_vertex_program, GL_EXT_texture_env_combine, GL_ARB_point_parameters, GL_ARB_texture_cube_map, GL_EXT_bgra, GL_EXT_compiled_vertex_array, GL_ARB_multisample, GL_ARB_vertex_array_object, GL_ARB_draw_buffers, GL_ARB_texture_compression, GL_EXT_multi_draw_arrays, GL_ARB_fragment_coord_conventions, GL_ARB_texture_float, GL_EXT_blend_func_separate, GL_EXT_texture_sRGB, GL_EXT_shadow_funcs, GL_EXT_clip_volume_hint, GL_EXT_blend_color, GL_NV_blend_square
00:12:23.289 [rendering.opengl.shader.support]: Shaders are supported.
00:12:23.305 [searchPaths.dumpAll]: Resource paths:
Resources
../AddOns
00:12:23.467 [shipData.load.begin]: Loading ship data.
00:12:23.981 [startup.complete]: ========== Loading complete in 1.27 seconds. ==========
00:12:26.972 [shipData.load.begin]: Loading ship data.
00:12:27.473 [script.load.world.listAll]: Loaded 16 world scripts:
Oolite Equipment Control 1.82
Oolite Ship Library 1.82
oolite-cloaking-device 1.82
oolite-constrictor-hunt 1.82
oolite-contracts-cargo 1.82
oolite-contracts-helpers 1.82
oolite-contracts-parcels 1.82
oolite-contracts-passengers 1.82
oolite-libPriorityAI 1.82
oolite-nova 1.82
oolite-populator 1.82
oolite-primable-equipment-register 1.82
oolite-registership 1.82
oolite-thargoid-plans 1.82
oolite-trumbles 1.82
oolite-tutorial 1.82
00:12:52.712 [gnustep]: 2015-08-10 00:12:52.712 oolite[4548] File NSDictionary.m: 625. In -[NSDictionary initWithContentsOfFile:] Contents of file 'C:\Oolite/oolite.app/GNUstep/Defaults/.GNUstepDefaults' does not contain a dictionary
00:12:56.281 [exit.context]: Exiting: SDL_QUIT event received.
00:12:56.281 [gameController.exitApp]: .GNUstepDefaults synchronized.
Closing log at 2015-08-10 00:12:56 -0700.
Here's the activity log:
Opening log for Oolite version 1.82 (x86-64) under Windows 6.1.7601 Service Pack 1 64-bit at 2015-08-10 00:12:22 -0700.
8 processors detected.
Build options: OpenAL, new planets.
Note that the contents of the log file can be adjusted by editing logcontrol.plist.
00:12:22.776 [display.mode.list.native]: Windows native resolution detected: 1920 x 1080
00:12:23.282 [joystick.init]: Number of joysticks detected: 0
00:12:23.283 [rendering.opengl.version]: OpenGL renderer version: 3.1.0 ("3.1.0 - Build 8.15.10.2361"). Vendor: "Intel". Renderer: "Intel(R) HD Graphics Family".
00:12:23.283 [rendering.opengl.extensions]: OpenGL extensions (102):
GL_NV_primitive_restart, GL_ARB_texture_env_crossbar, GL_EXT_abgr, GL_ARB_shadow, GL_IBM_texture_mirrored_repeat, GL_EXT_separate_specular_color, GL_EXT_texture_edge_clamp, GL_EXT_blend_minmax, GL_EXT_draw_buffers2, GL_ARB_texture_env_add, GL_ARB_draw_elements_base_vertex, GL_ARB_sampler_objects, GL_EXT_framebuffer_blit, GL_EXT_transform_feedback, GL_ARB_texture_env_dot3, GL_EXT_framebuffer_object, GL_EXT_blend_subtract, GL_3DFX_texture_compression_FXT1, GL_NV_conditional_render, GL_ARB_vertex_array_bgra, GL_EXT_texture_snorm, GL_ARB_multitexture, GL_EXT_stencil_wrap, GL_ARB_texture_border_clamp, GL_ARB_framebuffer_sRGB, GL_ARB_texture_env_combine, GL_EXT_framebuffer_multisample, GL_EXT_texture_env_add, GL_EXT_packed_pixels, GL_SGIS_texture_edge_clamp, GL_ARB_depth_clamp, GL_INTEL_performance_queries, GL_ARB_uniform_buffer_object, GL_ARB_depth_texture, GL_SGIS_texture_lod, GL_ARB_occlusion_query, GL_ARB_transpose_matrix, GL_NV_texgen_reflection, GL_EXT_stencil_two_side, GL_ARB_seamless_cube_map, GL_ARB_shading_language_100, GL_ARB_texture_compression_rgtc, GL_EXT_gpu_program_parameters, GL_EXT_texture_shared_exponent, GL_EXT_rescale_normal, GL_ARB_map_buffer_range, GL_ARB_pixel_buffer_object, GL_EXT_secondary_color, GL_ARB_copy_buffer, GL_ARB_half_float_pixel, GL_EXT_blend_equation_separate, GL_EXT_draw_range_elements, GL_EXT_texture_lod_bias, GL_EXT_texture_filter_anisotropic, GL_ARB_half_float_vertex, GL_EXT_texture_swizzle, GL_SGIS_generate_mipmap, GL_ARB_texture_rectangle, GL_ARB_texture_non_power_of_two, GL_ARB_point_sprite, GL_EXT_packed_depth_stencil, GL_ARB_vertex_shader, GL_EXT_texture_compression_s3tc, GL_EXT_texture_integer, GL_ARB_depth_buffer_float, GL_ARB_sync, GL_ARB_draw_instanced, GL_ARB_vertex_buffer_object, GL_WIN_swap_hint, GL_ARB_color_buffer_float, GL_ARB_shader_objects, GL_EXT_texture_array, GL_ATI_separate_stencil, GL_ARB_framebuffer_object, GL_EXT_packed_float, GL_ARB_compatibility, GL_EXT_texture_rectangle, GL_ARB_texture_rg, GL_ARB_fragment_shader, GL_EXT_fog_coord, GL_EXT_texture3D, GL_ARB_window_pos, GL_ARB_fragment_program, GL_ARB_vertex_program, GL_EXT_texture_env_combine, GL_ARB_point_parameters, GL_ARB_texture_cube_map, GL_EXT_bgra, GL_EXT_compiled_vertex_array, GL_ARB_multisample, GL_ARB_vertex_array_object, GL_ARB_draw_buffers, GL_ARB_texture_compression, GL_EXT_multi_draw_arrays, GL_ARB_fragment_coord_conventions, GL_ARB_texture_float, GL_EXT_blend_func_separate, GL_EXT_texture_sRGB, GL_EXT_shadow_funcs, GL_EXT_clip_volume_hint, GL_EXT_blend_color, GL_NV_blend_square
00:12:23.289 [rendering.opengl.shader.support]: Shaders are supported.
00:12:23.305 [searchPaths.dumpAll]: Resource paths:
Resources
../AddOns
00:12:23.467 [shipData.load.begin]: Loading ship data.
00:12:23.981 [startup.complete]: ========== Loading complete in 1.27 seconds. ==========
00:12:26.972 [shipData.load.begin]: Loading ship data.
00:12:27.473 [script.load.world.listAll]: Loaded 16 world scripts:
Oolite Equipment Control 1.82
Oolite Ship Library 1.82
oolite-cloaking-device 1.82
oolite-constrictor-hunt 1.82
oolite-contracts-cargo 1.82
oolite-contracts-helpers 1.82
oolite-contracts-parcels 1.82
oolite-contracts-passengers 1.82
oolite-libPriorityAI 1.82
oolite-nova 1.82
oolite-populator 1.82
oolite-primable-equipment-register 1.82
oolite-registership 1.82
oolite-thargoid-plans 1.82
oolite-trumbles 1.82
oolite-tutorial 1.82
00:12:52.712 [gnustep]: 2015-08-10 00:12:52.712 oolite[4548] File NSDictionary.m: 625. In -[NSDictionary initWithContentsOfFile:] Contents of file 'C:\Oolite/oolite.app/GNUstep/Defaults/.GNUstepDefaults' does not contain a dictionary
00:12:56.281 [exit.context]: Exiting: SDL_QUIT event received.
00:12:56.281 [gameController.exitApp]: .GNUstepDefaults synchronized.
Closing log at 2015-08-10 00:12:56 -0700.
-
- Quite Grand Sub-Admiral
- Posts: 6668
- Joined: Wed Feb 28, 2007 7:54 am
Re: Mouse flight control in Windowed mode
00:12:52.712 [gnustep]: 2015-08-10 00:12:52.712 oolite[4548] File NSDictionary.m: 625. In -[NSDictionary initWithContentsOfFile:] Contents of file 'C:\Oolite/oolite.app/GNUstep/Defaults/.GNUstepDefaults' does not contain a dictionary
Here is a problem. The contents of your .GNUstepDefaults are not a proper dictionary and this is probably because of a partial or accidental copy/paste, or possibly because of using Notepad as a text editor. When Oolite finds a non-readable .GNUstepDefaults, it will re-create a minimum working version of it so it can restart successfully next time. In doing so, it erases your changes. What you need to do is add the line
"mouse-control-in-windowed-mode" = YES;
in the defaults file, without changing anything else; just add a new line below the gamma value line and paste. Do not use Notepad; Wordpad or any other text editor is fine.If you have done it correctly, your log should be without any message about .GNUstepDefaults not being valid and you should be able to use the mouse in a window.
-
- Quite Grand Sub-Admiral
- Posts: 6668
- Joined: Wed Feb 28, 2007 7:54 am
Re: Mouse flight control in Windowed mode
OK, it's a bit tricky because it seems there were multiple installations going on earlier and third party uninstallers involved, but if all fails, try this:
I have copied and pasted a guaranteed, working on my system .GNUstepDefaults, based on your own one. Delete or rename any previous .GNUstepDefaults in your game. Then copy everything inside the text box (including the begining and ending curly brackets) and paste it in an empty file. Use Wordpad for that. Save the file as ".GNUstepDefaults" (including the double quotes so that Wordpad doesn't try to be clever and append the .txt or any other extension) in the folder where Oolite normally creates the file. Then run the game. Mouse control is already enabled in this .GNUstepDefaults.
I have copied and pasted a guaranteed, working on my system .GNUstepDefaults, based on your own one. Delete or rename any previous .GNUstepDefaults in your game. Then copy everything inside the text box (including the begining and ending curly brackets) and paste it in an empty file. Use Wordpad for that. Save the file as ".GNUstepDefaults" (including the double quotes so that Wordpad doesn't try to be clever and append the .txt or any other extension) in the folder where Oolite normally creates the file. Then run the game. Mouse control is already enabled in this .GNUstepDefaults.
Code: Select all
{
NSGlobalDomain = {
};
oolite = {
"Jameson-humbletrash" = "-29624";
"debug-settings-override" = {
};
"gamma-value" = 1;
"mouse-control-in-windowed-mode" = YES;
window_height = 1058;
window_width = 1920;
};
}
-
- Average
- Posts: 8
- Joined: Mon Aug 10, 2015 6:21 am
Re: Mouse flight control in Windowed mode
RIGHT ON. THAT WORKED!!!!
I made a copy of the file, using Wordpad I opened it and pasted your code here directly over what was there. I put this copy in the folder with the other one set aside (just in case), and it worked like a CHARM!!!
Now if only we could reverse the y-axis... :O
I made a copy of the file, using Wordpad I opened it and pasted your code here directly over what was there. I put this copy in the folder with the other one set aside (just in case), and it worked like a CHARM!!!
Now if only we could reverse the y-axis... :O
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Mouse flight control in Windowed mode
Welcome Entelechus!
[wiki]ReverseControl[/wiki] do the same but in the aft view. If you want it in the forward view instead then find and install ReverseControl OXP in the Manage Expansion Packs main menu item under the Mechanics category and replace all "VIEW_AFT" to "VIEW_FORWARD" in Scripts\reversecontrol.js within C:\Oolite\oolite.app\GNUstep\Library\ApplicationSupport\Oolite\ManagedAddOns\oolite.oxp.Norby.ReverseControl.oxz which is a renamed zip file.Entelechus wrote:we could reverse the y-axis... :O