All Games related discussion. 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
HID drivers maybe?
Posted by: stackocakes (IP Logged)
Date: August 08, 2007 09:42AM

Is there any way to make additional drivers (or a program) to use the Falcon as a Human interface device so i dont have to constantly switch from my mouse and the falcon? this would also add very quick support for some games.

If this is done it might also require less coding for games to take advantage of this for FPS games.

Limiting this controller to just games is a big downer

Re: HID drivers maybe?
Posted by: Phineas (IP Logged)
Date: August 08, 2007 02:51PM

I saw Novint post a reply to something like this saying that they had to remove mouse functionality because it was too buggy and that they were working on fixing the issue, or something along those lines, so I assume that sooner or later this will be implemented. How long exactly we'll just have to see.

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: August 11, 2007 03:24AM

Yes, we are planning on incorporating mouse support. We need to finalize some development and QA on it, and need to prioritize that work with respect to all the game work we are doing. Not exactly sure when it will be out, but it is a planned feature for the future. Right now, there is a lot of bang for our buck on incorporating touch into games, and have a number of games coming out soon, so that is the current priority.

Re: HID drivers maybe?
Posted by: stackocakes (IP Logged)
Date: August 12, 2007 02:28AM

Just a question about how adjustable the HID drivers will or may become, but will there be and if not, could there be:
An option of making it feel like your moving against a screen or something hard? It makes it so much easier to control whenever you have something to stop the forward motion of your hands because you can become "lost" with the mouse while nagivating a menu... or least i did with the HL2 menu.

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: August 15, 2007 06:28PM

good idea. thanks for the thought

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 27, 2007 11:38AM

I have made a program for emulating mouse/keyboard/joystick/midi input using the Falcon.

Actually it is the same program that most people use for using the Nintendo Wii remote to play games or control programs on the PC. I just added Novint Falcon support.

It is scriptable, like this:

pie.framerate = 200Hz
mouse.LeftButton = falcon.button1
mouse.RightButton = falcon.button2
mouse.x = MapRange(falcon.x, -2 inches, 2 inches, 0, 1)
mouse.y = MapRange(falcon.y, 2 inches, -2 inches, 0, 1)
if falcon.z > 0 cm then
falcon.TotalForceZ = 1 Newton
else
falcon.TotalForceZ = 0 Newtons
end if

I don't know if that is the correct way to make a solid wall, but you can script it how you want.

You can also make it emulate the joystick or keyboard, so you can play whatever games you want with it, using whatever controls you want.

I haven't released it yet, but I can send it to you to test now if you want.

I will release it soon, I just have to fix lots of bugs, and write lots of documentation, and sort out the sample scripts, and add some other features I am working on.

Are there any specific features you would like to see?

Re: HID drivers maybe?
Posted by: stackocakes (IP Logged)
Date: August 27, 2007 08:58PM

I would love to test it out. I remember seeing the software people use to get the wiimote to emulate but i cant remember the program, if you can just post a link to any programs I might need. (dont really want to give out email if u know what i mean.)

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 28, 2007 09:18AM

In that case you can wait until I release it, because I don't want everyone trying a buggy version. It shouldn't be too long.

By the way, are there any specific features you want?

Re: HID drivers maybe?
Posted by: pimpinjuice (IP Logged)
Date: August 28, 2007 12:18PM

CarlKenner: On an off-topic note, I really really like the Some.dll.Function feature.

Re: HID drivers maybe?
Posted by: stackocakes (IP Logged)
Date: August 28, 2007 06:16PM

The only 2 features i would like to see is the option to move it vertically or horizontally to be able to control the mouse. and to make it feel like your moving against something hard (like i explained earlier) so you dont feel lost in space with the thing.

Thanks and I cant wait to see what you come up with grinning smiley

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 30, 2007 11:20AM

Well that should certainly be doable.
I uploaded it to RapidShare here: [rapidshare.com]

It is not finished yet, and this doesn't include any scripts to show you how to do things. Although it has some dated documentation that explains how it works, but doesn't explicitly document the falcon stuff I added.

You need to write scripts like this:

debug = falcon.x+','+falcon.y+','+falcon.z+','+falcon.button1

Mouse.x = MapRange(Falcon.x, -2 inches,2 inches, 0, 1)
Mouse.y = MapRange(Falcon.y, 2 inches,-2 inches, 0, 1)
Mouse.LeftButton = Falcon.button1
Mouse.RightButton = Falcon.button2
key.Enter = Falcon.button3
if falcon.button4 then
falcon.TotalForceY = 1 Newton
else
falcon.TotalForceY = 0
end if

Re: HID drivers maybe?
Posted by: stackocakes (IP Logged)
Date: August 30, 2007 06:12PM

Thanks, I love the program and i got my falcon working VERY well now.

Heres the script I made and If anyone can come up with interesting force interactions that'd be very cool. I tried using the forces, but im still very new at understand how they affect the controller.

My mouse script seems flawless for me at the moment.


debug = "Mouse Position: X:"+(var.gmousex)+', Y:'+(var.gmousey)+', Z:'+(var.gmousez)
var.gMousex = MapRange(-(Falcon.x), 0.04 metres, -0.04 metres, 0, 1)
var.gMousey = MapRange(Falcon.y, 0.02 metres , -0.02 metres, 0, 1)
var.gMousez = MapRange(Falcon.z, 0.05 metres, -0.02 metres, 0, 1)

If var.gMousex > 1.00 then var.gMousex = 1.00
If var.gMousex < 0 then var.gMousex = 0
If var.gMousey > 1.00 then var.gMousey = 1.00
If var.gMousey < 0 then var.gMousey = 0
If var.gMousez > 1.00 then var.gMousez = 1.00
If var.gMousez < 0 then var.gMousez = 0

mouse.CursorPosX=var.gmousex*screen.Width
mouse.CursorPosY=var.gmousey*screen.Height

Mouse.LeftButton = Falcon.button1
Mouse.RightButton = Falcon.button2
falcon.Force = 0


EDIT!!:

I've also created one where you can turn it off at anytime while running the program, This particular one you use button 4 (which is the right one to turn it on at off.) While it is in the off position it will use force to return to the center and stay there while it is unused. I'm not use but a developer would have to answer the question of durability of keeping constant force on the mouse. When you reactivate the mouse the force is lost and you are able to move around with no force holding you back.

Also to note: That program is VERY bad with FPS's (First person shooters) as it has a refresh rate of only 40/sec. And it will go down slightly while ingame. works great for other programs tho. I had some scripting to make it work with FPS which it did perfectly, but was very jumpy... *shrug*

Anyway here is my second one:




if var.falconon = null then var.falconon = false
if var.waitforb4 = null then var.waitforb4 = false
debug = "Mouse Position: X:"+(var.gmousex)+', Y:'+(var.gmousey)+', Z:'+(var.gmousez)+', off/on:'+var.falconon+' button4:'+falcon.button4
//debug = "Mouse Position: X:"+(falcon.x)+', Y:'+(falcon.y)+', Z:'+(falcon.z)



var.gMousex = MapRange(-(Falcon.x), 0.04 metres, -0.04 metres, 0, 1)
var.gMousey = MapRange(Falcon.y, 0.02 metres , -0.02 metres, 0, 1)
var.gMousez = MapRange(Falcon.z, 0.05 metres, -0.02 metres, 0, 1)

If var.gMousex > 1.00 then var.gMousex = 1.00
If var.gMousex < 0 then var.gMousex = 0
If var.gMousey > 1.00 then var.gMousey = 1.00
If var.gMousey < 0 then var.gMousey = 0
If var.gMousez > 1.00 then var.gMousez = 1.00
If var.gMousez < 0 then var.gMousez = 0

if var.waitforb4 = false then
if falcon.button4 = true then
var.falconon = not var.falconon
var.waitforb4 = true
end if
else
if falcon.button4 = false then var.waitforb4 = false
end if


if var.falconon = true then
mouse.CursorPosX=var.gmousex*screen.Width
mouse.CursorPosY=var.gmousey*screen.Height
falcon.ForceX = 0 pounds
falcon.ForceY = 0 pounds
falcon.ForceZ = 0 pounds
else
falcon.ForceX = 0 pounds
falcon.ForceY = .25 pounds
falcon.ForceZ = 1.25 pounds
end if

Mouse.LeftButton = Falcon.button1
Mouse.RightButton = Falcon.button2



Edited 2 time(s). Last edit at 08/30/2007 08:32PM by stackocakes.

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 31, 2007 01:51PM

Oops. Sorry.
Add a line like this at the top of your script:

PIE.FrameRate = 500Hz

It defaults to 42Hz, which is the frame rate of the P5 Glove it was originally created for.

I have no idea whether my program can actually run at 500Hz or not on your computer. But try playing around with the frame rate. The maximum frame rate it can theoretically do is 1000Hz, but it may not be able to manage that with any decent length script.

Forces will be very poor quality at 40Hz, but you can experiment with forces better if you increase the frame rate.

By the way, you can specify the force in units of force (Newtons, aka kilogram metres per second per second) or in units of weight (kilograms, grams, pounds, ounces). It can automatically convert units.

But be careful, large sudden forces may be dangerous.

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 31, 2007 02:04PM

Oh, by the way, there are a couple of other functions you might want...

If you use MapEnsureRange (aka EnsureMapRange) it will map from one range to another, while ensuring that values outside the range are clipped to that range. So you don't need to check for below 0 or above 1.

MapRange maps values outside the original range to values outside the new range.

value = EnsureRange(value, min, max) will not do any mapping, but it will clip values outside the range to the edges of the range.

In case anyone is wondering, the debug window only displays values to 2 decimal points, but the values are actually stored and calculated with much higher precision. You can display values in cm instead if you write:

debug = (falcon.x in cm) + ', '+(falcon.y in cm)+', '+(falcon.z in cm)

Re: HID drivers maybe?
Posted by: stackocakes (IP Logged)
Date: August 31, 2007 02:24PM

Thanks for those extra commands. smiling smiley

Mind if I ask if you enjoy being able to turn it on and off with the press of the button?

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 31, 2007 02:45PM

Oh, and if you want to emulate a joystick, you will need to download a program called PPJoy (do a web search), and install it. You will then need to go into the PPJoy control panel (you can access important control panels from my program's CP-Settings menu if you are lazy). From the PPJoy control panel you need to add a virtual joystick. For the port choose virtual joystick. For the controller number, choose 1. You can edit the mapping to choose how many axes and buttons it should have. Don't use any continuous (analog) hat switches. 8 axes and 16 buttons and 1 digital hat switch is easiest. 8 axes, 32 buttons and 2 digital hat switches is best, but you have to reassign all the digital numbers for buttons 17-32, and for the two hat switches, so it takes longer to set up. For lazy people, the defaults should be fine. Once you have set up the virtual joystick, and windows has found the drivers for it, you can then use it in GlovePIE.

The analogs represent axes (unless you bravely added continuous hat switches, in which case some of the analogs represent hat switches), and range from -1 to 1. Analog0 is the x axis (unless you set it strangely in PPJoy). Analog1 is the joystick's y axis. The other analogs represent various other axes, different games may interpret them differently. You can emulate a joystick with up to 8 axes.

eg.
ppjoy1.analog0 = MapRange(falcon.x, -2 inches, 2 inches, -1, 1)
ppjoy1.analog1 = MapRange(falcon.y, -2 inches, 2 inches, 1, -1)
ppjoy1.analog2 = MapRange(falcon.z, -2 inches, 2 inches, -1, 1)

The joystick buttons are controlled by digital0 to digital31, or from digital0 to digital15. The hat switches are controlled by whatever digitals you set them to in PPJoy.

eg.
ppjoy.digital0 = falcon.button1
ppjoy.digital1 = falcon.button2
ppjoy.digital2 = falcon.button3
ppjoy.digital3 = falcon.button4

Unfortunately PPJoy can't emulate a force feedback joystick yet. This is not the fault of my program, it is just something the person who made PPJoy didn't add yet. I'm planning on writing another program to add force feedback support to ppjoy, but I haven't done it yet.

This script allows you to use all the falcon's controls in a game that supports a 3-axis joystick, but it is kind of boring.

You may wish to add a spring force (based on its position) to keep it centred.

But if it was me, I would add some sort of gestures to trigger buttons, like swinging a (miniature) sword to swing a sword in the game. You may be able to measure speed like this:

var.xSpeed = delta(falcon.x)/pie.frametime

or you may need to use the smooth function to average several frames:

var.xSpeed = smooth(delta(falcon.x)/pie.frametime, 30) // average over 30 frames

then you can check the absolute value of the speed to detect sword swings:

var.SwingSideways = abs(var.xSpeed) > 1 metre per second

you can also write it like this if you are a mathematician:

var.SwingSideways = |var.xSpeed| > 1 metre per second

Then you can set it to a button, like this:

ppjoy.analog4 = var.SwingSideways

or if you want it to hold down the button for longer than the actual sword swing:

ppjoy.analog4 = keepdown(var.SwingSideways, 200ms)

I have no idea what speeds or gestures or forces actually make sense on the falcon, so experiment. And let other people know what works well.

Re: HID drivers maybe?
Posted by: CarlKenner (IP Logged)
Date: August 31, 2007 02:48PM

You can ask somebody else. But you can't ask me because I don't have a Falcon.

:-(

But I enjoy the fact that you made it turn on and off. I thought that was impressive. Especially since I didn't supply much in the way of documentation.

Re: HID drivers maybe?
Posted by: udi (IP Logged)
Date: October 14, 2007 02:34PM

Carl, NovInt should give you one for free, since you are doing a lot of the work for them!

Here is a little stwist on the original script, so that the front button turns the interface on and off, and the other three buttons are like the 3 buttons on the mouse (just that the middle button on the Falcon is the left button on the mouse, which makes it easier to handle).
The script also extends the arm forward when ready to work, so that it is easier to control. I also made a shortcut and stuck it in the Startup group, so that it is ready to work when windows comes up. it reads:

"C:\Program Files\GlovePIE\PIE.exe" "-falcon_mouse.PIE" "/tray"

where 'falcon_mouse.PIE' is the following script file:

PIE.FrameRate = 500Hz
if var.falconon = null then var.falconon = false
if var.waitforb3 = null then var.waitforb3 = false
var.gMousex = MapRange(-(Falcon.x), 0.04 metres, -0.04 metres, 0, 1)
var.gMousey = MapRange(Falcon.y, 0.02 metres , -0.02 metres, 0, 1)
var.gMousez = MapRange(Falcon.z, 0.05 metres, -0.02 metres, 0, 1)
If var.gMousex > 1.00 then var.gMousex = 1.00
If var.gMousex < 0 then var.gMousex = 0
If var.gMousey > 1.00 then var.gMousey = 1.00
If var.gMousey < 0 then var.gMousey = 0
If var.gMousez > 1.00 then var.gMousez = 1.00
If var.gMousez < 0 then var.gMousez = 0
if var.waitforb3 = false then
if falcon.button3 = true then
var.falconon = not var.falconon
var.waitforb3 = true
end if
else
if falcon.button3 = false then var.waitforb3 = false
end if
if var.falconon = true then
mouse.CursorPosX=var.gmousex*(screen1.Width+screen2.Width)
mouse.CursorPosY=var.gmousey*(screen1.Height+screen2.Height)
falcon.ForceX = 0 pounds
falcon.ForceY = .3 pounds
falcon.ForceZ = -.7 pounds
else
falcon.ForceX = 0 pounds
falcon.ForceY = 0 pounds
falcon.ForceZ = .8 pounds
end if
Mouse.LeftButton = falcon.button1
Mouse.RightButton = falcon.button4
Mouse.MiddleButton = falcon.button2


Thanks for everything (Carl & Stack),

Udi

Re: HID drivers maybe?
Posted by: udi (IP Logged)
Date: October 14, 2007 02:37PM

I forgot to mention that I have 2 screens on my PC, but if you have only 1 screen, you will need to change these lines:

mouse.CursorPosX=var.gmousex*(screen1.Width+screen2.Width)
mouse.CursorPosY=var.gmousey*(screen1.Height+screen2.Height)

To these:

mouse.CursorPosX=var.gmousex*screen.Width
mouse.CursorPosY=var.gmousey*screen.Height


Sorry,

Udi

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: October 15, 2007 02:15PM

thanks for your work on the Falcon Udi. Keep us posted on things that you come up with.

Re: HID drivers maybe?
Posted by: Yoweigh (IP Logged)
Date: December 05, 2007 02:08PM

I just got my Falcon today and will be giving this driver a try. Has there been any recent activity or has the project gone stagnant?

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: December 06, 2007 12:14AM

Glad to hear you picked up a Falcon. Novint is still planning on increasing our level of mouse support. We are close to releasing a version of N VeNT that is run completely with the Falcon, and should have more general mouse support in 2008. Thx

Re: HID drivers maybe?
Posted by: Phineas (IP Logged)
Date: December 06, 2007 01:22PM

Any idea when in 2008 tom? It's really annoying having to switch between a trackball and the Falcon all the time. Obviously I don't want it rushed, but the sooner the better.

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: December 08, 2007 04:47PM

We'll probably have initial support in N VeNT in January at the latest. That will be much of what one would need. Thx

Re: HID drivers maybe?
Posted by: vr nra (IP Logged)
Date: December 27, 2008 01:08PM

I think the Falcon needs to have built in support software like many other controllers from Logitech, Nostromo etc. Separate from the n_vent interface which is more like steam than a configuration program, I believe that the game being developed for the Wii called The Conduit shows exactly what is needed as a standard for FPS control. Even if a game is not fully Falcon friendly, yet, it could still be played with native support with generic feedback on button presses.

I'm glad I got a falcon but the games I want to play with it are pretty much shooters so at least fear, crysis and HL2 are working but to have to wait to use all the others to someday get supported is what will keep the Falcon from reaching it's potential. This also really kills the ability to just jump in any game online using the Falcon since the server also has to run the modded version of the game. I have not had any luck playing with the Falcon online. This is a severe limitation of running specific hardware that needs specific game versions to run. I did find and run a glove pie script I found online that does the mouse thing great but it needs the bounding box thing to make it useful. If there is no spin zone bounding box edge you are constantly stuck with one direction as your point of reference in the game world.

The drivers and software that would most closely match this device would be the Microsoft Dual strike controller. It was the best controller to combine controller with mouse, yet was maybe introduced too early and then killed...it would have been the perfect console controller now days I think with a little update in button layout. Tom, if you read this I think this is the controller hid device model with software interface that you really need to make for the Falcon to give your hardware a greater chance being accepted by the masses. $200+ is a lot of coin for the average gamer to plunk down on a gaming gadget. No matter how cool it is. I, however, am one of those that has made the investment but having things like the Falcon as the norm rather than the novelty would obviously be better for all of us. Keep up the getting more games supported but really look into my idea about the Dual Strike driver/software.

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: December 28, 2008 05:24PM

vr nra, good comments. I agree with what you wrote, and we're already working on it. Should be out shortly

We are planning generic mouse/joystick drivers that will work with every game as a mouse or joystick. We'll continue to add full 3D haptic support into specific games as well.

what did you specifically like about the Dual Strike controller, that you would want to see in the Falcon drivers?

For online play, we'll soon support Team Fortress 2, Battlefield 2, Counter Strike: Source, Left 4 Dead, and Battlefield 2142. All of these games will be playable against the existing mouse based communities.

thanks, tomnovint

Re: HID drivers maybe?
Posted by: vr nra (IP Logged)
Date: December 29, 2008 08:39AM

Well Tom it's been a long time since I was actually able to use the thing...they stopped supporting it for xp. So much for my logitech FFB mouse too...that was the closest to the Falcon in terms of real-time feedback and resistance so you may want to fire up a windows 98 rig with both of these devices if you haven't already to get some more ideas with configuration/interface software.

I think I played all of Max Payne (1) with the dual strike. Probably not as "twitch" anchored accurate/easy as a mouse but very very close and much more fun. See if you can dig up the demo/promo video of how to set the spin zones and also for it to function as a traditional hand held mouse. If I remember correctly the logitech FFB mouse offered the same type of springy wall spin zone at the edges also since you could not pick it up to re-center.

The death of the FFB mouse was due to the traditional mouse gamer holding a familiar mouse shaped device. The big problem occurred when the gamers could not use it the exact same familiar way and pick it up to recenter since it was attached to it's base which had a specific range for x and y.

I think the Falcon offers a truly different ergonomic feel in hand especially with the pistol grip because it is not the same movement as a traditional mouse and more of a natural movement in real space in conjunction with the game world. So that should be the end of that controller crossover problem for you guys.

Anyway, to answer your question, what I did like about it was the ability to customize the zones and spin speed. Since the dual strike's main feature was a rotational x y axis pivot connecting the two grips, the "pick up the mouse" to recenter was obviously out so good spin control at the stops was a must with the software/drivers. I think the pause reset option was there as well but is terrible for FPS.

For the Falcon,
1) the default Drivers/software will need to map the range of motion of the Falcon to the users screen dimension like it pretty much does with n-vent running.

2) allow the bounding box to be set by cursor/pixel coordinates so that crossing the plane of that box will simulate/function as a real mouse by either;
a) moving at a user determined continuous speed and duration
b) moving at a user determined ramp up speed based on distance outside of
the bounding box ending at its fastest speed when the falcon is at its
own physical boarders of movement.
A PC FPS/SIM game to look at would be Armed Assault as it has this type of aim control as a feature of the game which the player can adjust, only for side to side though. I still say the developers of the soon to be out WII game called the Conduit have the perfect bounding box model to follow. There is a tech demo vid on youtube from them that lays it all out.

I have bought just about all of the innovative consumer controllers every made so if you need a beta tester for anything feel free to let me know. I think I have a sold feel for how it should work...I just don't know how to program to make all of my ideas happen, I already talked to your tech guys about an even better pistol grip idea which I may just try to mod up. The hardware chop cut rebuild is my thing as long as it's just a little fab work like plastic shell melt and re-shape and simple parts and wires soldering.

BTW, of all the controllers I have picked up, my one brother in particular who was an avid PC gamer (former BF2 match player) has taken very well to the Falcon with Crysis. He is very critical with these "new" style devices and basically told me of all the stuff I have ever bought that this is the first one he actually enjoys gaming with. He mentioned that it was a much more satisfying feel while aiming and shooting with the pistol grip as opposed to a regular mouse or rumble gampad for that matter. Ergonomics and comfort were great once I switched to a good office chair with arms for an elbow rest.

While My brother was completing his degree at SCAD, his PC gaming hardware budget was severely limited to the point of moving over to the 360 console. This forced him back to the pad style controller which he adopted pretty well but to this day still prefers mouse and keyboard for its ease and accuracy. My last question would be that once the PC stuff we are talking about is all sorted out do you think you would try to get the Falcon in with the 360 or PS3? For me, I could never go to console based on the fact I hate the limited controller interface...Wii not included(sort of) So I think the PC will always be a higher priced and superior toy but it would be cool to have more, innovative controller options available for the consoles as well. It does in fact seem that there is more money over in console game land as well as more main stream marketing campaigns. So with that it may be a profitable market but then again the console crowd is fickle with what's cool and accepted and what's not.

Re: HID drivers maybe?
Posted by: tomnovint (IP Logged)
Date: December 29, 2008 04:19PM

thx vr nra. That all sounds good on the control scheme and options. That general idea is what I have envisioned, so I think we're on the same page. Would love to get your feedback on it beta testing and other games. If you'd like to do so please send a note to customersupport@novint.com and let them know that I recommeneded you do so. Thanks for sharing stories on your brother too.

In terms of consoles, the plan is to get on the consoles. I think one of the advantages there will be that people will be able to play PC style gaming on the consoles which is an exciting prospect in my view.

thx, tomnovint



This forum is currently read only. This is a temporary situation. Please check back later.
This forum powered by Phorum.