Previous Thread  Next Thread

chat icon Games and sims need analogue controls

Rebel

Posted: Thu Aug 14, 2003 5:44 am
Joined: 02 Aug 2003
Posts: 42
Hi All,
Games and simulations require analogue controls, and I would like to know if this is on the list of "nice-to-have's" in the new game engine? Maybe Saluk can tell us? Is this a matter of a Python script to read the memory location of where the PC reads the joystick ports, or is this far more complex? I also know that the feed-back type of game devices these days use the USB port.
The path and track system works so well in the IPO section, but does not work in the game engine. Is this a bug, or was this left out for some reason. It is so useful, and I would say that it has more use in the game engine than just for IPO animation. I need a camera to follow an object from a fixed point, in a simulation that I'm doing, and it works great in the IPO's, but not in the game. How do they get this right in the "skategirl" demo?
Anyway, I continue to be totally knocked out with Blender, so please keep up the good work in sorting out the new game engine. Thanx guy's!
Reply with quote


z3r0_d

Posted: Fri Aug 15, 2003 5:31 am
Joined: 16 Oct 2002
Posts: 1520
Rebel wrote:
Is this a matter of a Python script to read the memory location of where the PC reads the joystick ports, or is this far more complex?

If we let python do that (the plugin is more notable) python could do whatever it wanted with a person's system (this is why the plugin was sandboxed).

The major reason I see why blender doesn't have joystick support is two-fold:
1: there is no library or even similar implementations on all blender platforms
2: assuming #1 is solved blender's logic brick system will have to be re-written to allow for analog signals. Are motion actuators going to multiply by the value along a particlar axis? What about the actuators that wouldn't work well with variable input, like say the end object actuator? What would the sound object actator do?

I guess the answer would be to allow actuators to have different inputs, one for digital (on/off/no pulse) another for analog (from -1 to 1, or no pulse)

hrmm, maybe somebody could work screenshots and stuff of a similar proposal (no need to give me credit)

python would have to be able to GameLogic.addActiveActuator(act, 0.5) kind of thing too, it would need to be connnected to the analog input.

controllers could convert from analog to digital, for example, a tolerance, is the input > 0 or less than it. Or more than 0.05 from 0 (kind of a dead zone thing).


Ok, so of the goals for game blender one of them is to make it possible to make a reasonably complex game without programming. I think my idea would work alwright, what do you think.

And if anyone has any ideas about how force feedback should be implemented, let us know too.

Or if they know of a good cross-platform joystick library. Is the one in SDL any good?
Reply with quote


matt_e

Posted: Fri Aug 15, 2003 5:47 am
Joined: 14 Oct 2002
Posts: 897
z3r0_d wrote:
Is the one in SDL any good?
As far as I know, Blender is already using SDL for audio. I don't know much about it, but I wonder if the input device stuff would come free with that or if it's a slimmed down audio-only version that's used.
Reply with quote


Saluk

Posted: Fri Aug 15, 2003 7:46 am
Joined: 16 Oct 2002
Posts: 166
SDL would be my vote. As for controlling the values, you could use it similarly to the mouse movement actuator and have it return how much it changed on each axis, or just some coordinates, -1,-1 would be the joystick all the way in the upper left corner. Then use python to figure out what those values actually control. The mouse sensor already does this so it would be the best quick fix.

Maybe analogue controls could store coordinates into object properties, then a box could be added to motion actuator for a prop to multiply, add, or set the force by.
Reply with quote


Rebel

Posted: Sat Aug 16, 2003 6:12 am
Joined: 02 Aug 2003
Posts: 42
Saluk wrote:
SDL would be my vote. As for controlling the values, you could use it similarly to the mouse movement actuator and have it return how much it changed on each axis, or just some coordinates, -1,-1 would be the joystick all the way in the upper left corner. Then use python to figure out what those values actually control. The mouse sensor already does this so it would be the best quick fix.

Maybe analogue controls could store coordinates into object properties, then a box could be added to motion actuator for a prop to multiply, add, or set the force by.


Thanks Saluk, this sounds like it is possible to do. Will you be including this in the game engine update. Unfortunately, I am not yet able to program this kind of stuff. This would make Blender really kick butt in the game world, I'm sure.

Now, I would still like to know why the path and track system in the IPO's does not work in the game engine. This is so damn useful. Is this a bug, or am I just doing something wrong? I need a camera to track my model plane sim from a fixed point, just like the 3rd camera view in the skate girl demo. How did they do this? Thanks, I really appreciate the work that you guy's are doing!
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group