[PLUGIN] Input System v0.96b (21/03/2011): Keyb+Mouse+Joy

Post and try out addons that are currently in development.

Post » Tue Oct 12, 2010 8:49 pm

Hello all,

What it does:
Manages Keyboard, Mouse and Joystick through DirectX using the Win32 part of OIS ([url:178xb5bj]http://sourceforge.net/projects/wgois/[/url:178xb5bj]).
I've merged "Keyboard & Mouse" plugin actions/conditions/expressions and I've added an "Arm" feature like in the "Custom Controls" plugin by Lucid
There are also many other things to discover :wink:

Force Feedback has been added in v0.92b but it's not fully tested and [u:178xb5bj]may not work properly[/u:178xb5bj].

ToDo:
[list:178xb5bj]
[*:178xb5bj] Create a ForceFeedback testing tool with CGUI[/*:m:178xb5bj]
[*:178xb5bj] Intregrate OIS 1.3: adds XInput (XBox 360 controller)[/*:m:178xb5bj][/list:u:178xb5bj]

How to use it:
See the included examples, everything is in here. If more is needed, I will publish some howtos.

Installation:
Download the zip file and put the Plugin directory with the csx files into Construct's plugins directory.

Download:
[url:178xb5bj]https://sourceforge.net/projects/sglorzscplugs/files/Input%20System/[/url:178xb5bj]

Release note
v0.96b
------
- Update: when presetting nonexistent button, Slider or POV, an empty value will be set when a joystick is selected.

v0.95b
------
- Change license to LGPL

v0.94b
------
- Update:
. New Mouse condition: "On any mouse button down" called on any mouse button pressed.
. New Mouse condition: "On any mouse button release" called on any mouse button released.
. New Keyboard condition: "On any key down" call on any key down.
. New Keyboard condition: "On any key release" called on any key down.
. New Mouse expression: "Get last mouse button down", 0 is left, 1 is right, 2 is middle and 8 is unknown.
. New Mouse expression: "Get last mouse button release", 0 is left, 1 is right, 2 is middle and 8 is unknown.
. New Keyboard expression: "Get last key down", 0 is unknown.
. New Keyboard expression: "Get last key release", 0 is unknown.
- Note: see example 4 (Input System4.cap) for more details.

v0.93b
------
- Bug: crash when presetting nonexistent button, Slider or POV. Now last valid value will be used.

v0.92b
------
- Update:
. New joystick action: "Set POV number of directions" with one parameter directions (4 or 8). In 4 directions mode, joysticks' POV diagonal events (NE, SE, NW, SW) trigger 3 events (e.g. NW will trigger N, W and NW).
. New controls action: "Set control enabled" allows to enable/disable a control for a player.
. New controls condition: "Control is enabled?" checks if a control is enabled for a player.
- Added ForceFeeback (not fully tested, use at your own risk ^_^)

v0.91b
------
- Bug: relative X and Relative Y were the same.
- Bug: SetControlConfigData, previous controls were not deleted
- Update:
. "Set control default component" renamed to "Set control preset", to init control directly and if it's a joystick, it'll take the first one available.
. "Init control default component device" renamed to "Set presets joystick", to set preset's joystick to use and to change the used joystick of previous presets.
. New controls action: "Reload contols preset" to reset controls with already defined presets.
. New controls action: "Clear presets" to delete all presets
. New controls action: "Clear Controls" to delete all controls

v0.9b
-----
First delivered version
B
3
S
1
G
2
Posts: 80
Reputation: 985

Post » Wed Oct 13, 2010 3:10 am

So far so good, and it seems pretty complete.
I do think a little more info like setting controls etc. is needed.
Great job!
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Wed Oct 13, 2010 5:05 am

Many thanks. Look forward to testing this later :)
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Wed Oct 13, 2010 7:19 am

RelativeMouseX is the same as RelativeMouseY :(
B
5
S
1
G
3
Posts: 10
Reputation: 1,447

Post » Wed Oct 13, 2010 7:50 am

[quote="georgethreed":2yin6bey]RelativeMouseX is the same as RelativeMouseY :([/quote:2yin6bey]

Yes, bug spotted, it's a bad cut/paste, my usual :wink:
B
3
S
1
G
2
Posts: 80
Reputation: 985

Post » Wed Oct 13, 2010 8:48 am

WHOA! So fast!

Testing, RIGHT AWAY!
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Oct 13, 2010 9:04 am

Whoa. Just whoa. Tomorrow I'm trying it out with a joystick but... it seems it has everything.
Not everything I need, I mean EVERYTHING. I looked around SDL's control system before and I know what can be done, and I see it's all there. Congratulations, sir :)

I tried the bundled demos and something weird happens when hitting F10. I just now realized it acts just like left-alt :O so I guess we shouldn't use it, as Windows freezes the application and focuses on the window controls.
Everything works perfectly.

Awesome. I can go and code player control logic for my game now :D
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed Oct 13, 2010 10:20 pm

This is awesome news, I can't wait to try this :D
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Oct 14, 2010 2:22 am

I'm having some trouble :(

It works awesomeLY, but for some reason when I try it in my game, it refuses to recognize controls by their name ("on control", etc)

So.... halp? I really don't understand why it won't work here. I deleted everything in my game except for the bare minimum and it still won't work.
[url:2lu6jlv8]http://octavoarte.cl/test.cap[/url:2lu6jlv8]
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Oct 14, 2010 5:19 am

Yeeh, I've got the arm part kinda figured out, and its a good idea, as you might want your players to map their own keys, but presetting controls is somewhat confusing.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Next

Return to Work-in-progress addons

Who is online

Users browsing this forum: No registered users and 1 guest