User input
-
Dan Forever
- Gnoblar
- Posts: 3
- Joined: Thu Jul 07, 2005 9:05 pm
- Contact:
User input
I'm new to ogre, and looking through the tutorials, it mentions that Ogre is intended to only be a graphics engine, nothing more, if thats the case, is it a better or worse to write your own code for getting input via a keyboard/mouse then using what ogre already has, assuming you know what you're doing and could make it well?
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
- jacmoe
- OGRE Retired Moderator

- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: User input
Definately.Dan Forever wrote: is it a better or worse to write your own code for getting input via a keyboard/mouse then using what ogre already has, assuming you know what you're doing and could make it well?
Whilst the Ogre input works well, it is limited to mouse and keyboard.
It doesn't support joysticks, gamepads, etc. Hasn't got action mapping, force feedback, etc.
If you know what you are doing - and you are doing it well - writing your own input module is better!
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
-
Dan Forever
- Gnoblar
- Posts: 3
- Joined: Thu Jul 07, 2005 9:05 pm
- Contact:
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
-
CrimsonShadow
- Gnoblar
- Posts: 23
- Joined: Sat May 28, 2005 7:40 pm
One of the things I find isn't great about Ogre's input system is there doesn't seem to be a way to release the mouse. (ie. If I want to let the mouse go outside the rendering window in windowed mode.) I haven't found a way to do this and it seems like it was never intended to.
If I'm wrong please let me know as that is one of the main reasons I'm trying to find another cross-platform input system and if it's easy to get around this limitation I'll probably stick with the Ogre system until I need joystick support.
-CrimsonShadow
If I'm wrong please let me know as that is one of the main reasons I'm trying to find another cross-platform input system and if it's easy to get around this limitation I'll probably stick with the Ogre system until I need joystick support.
-CrimsonShadow
-
Dan Forever
- Gnoblar
- Posts: 3
- Joined: Thu Jul 07, 2005 9:05 pm
- Contact:
-
CrimsonShadow
- Gnoblar
- Posts: 23
- Joined: Sat May 28, 2005 7:40 pm
Well in full-screen mode then of course you want to capture the mouse and if your game/application wants the ability for the user to just keep moving the mouse in a direction without leaving the window then that makes sense too but there are cases where you don't want this. A good example of what I'd like to do for mouse input is the way Star Wars Galaxies handled it.
They basically had a key that would toggle the mouse between two modes. In one mode the mouse could only move within a certain rectangle in the middle of the screen (user preferences) and then it would start moving the view. In the other mode the mouse was a mouse cursor that moved around the screen. If you were in the mouse cursor mode and were running windowed then (I believe it's been a while now..
) that you could move your mouse outside the window of the game and back in.
I think in any interface where the mouse is being used for menu-type interactions like in a 2D application then it would be nice if it left the application in windowed mode. Of course in full screen mode or when the mouse is being used to rotate the view then it doesn't make sense for it to leave the application. In some interfaces the mouse only rotates the view when a certain key/mouse button is held down.
Just my $0.02,
-CrimsonShadow
They basically had a key that would toggle the mouse between two modes. In one mode the mouse could only move within a certain rectangle in the middle of the screen (user preferences) and then it would start moving the view. In the other mode the mouse was a mouse cursor that moved around the screen. If you were in the mouse cursor mode and were running windowed then (I believe it's been a while now..
I think in any interface where the mouse is being used for menu-type interactions like in a 2D application then it would be nice if it left the application in windowed mode. Of course in full screen mode or when the mouse is being used to rotate the view then it doesn't make sense for it to leave the application. In some interfaces the mouse only rotates the view when a certain key/mouse button is held down.
Just my $0.02,
-CrimsonShadow
- Praetor
- OGRE Retired Team Member

- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
As sinbad has said, the input system is meant to be used for demos, and was never meant as a "production system." That said, it works alright for most things. I quickly abandoned it and made my own system from the ground up (built on DirectInput) with my own custom "action mapping" type of system. Right now mouse and keyboard are supported. Well, just to toot my own horn I think it is my engine's greatest strength thus far in development (yeah, not very far yet...)
Input is the type of thing that can be as complex or as easy as you need it to be. At the same time, it probably is one of the easier systems to set up. So, for something simple you can use ogre's built in one, but if you had to go custom it isn't going to be too bad.
Input is the type of thing that can be as complex or as easy as you need it to be. At the same time, it probably is one of the easier systems to set up. So, for something simple you can use ogre's built in one, but if you had to go custom it isn't going to be too bad.