Rumbling game

yep, it’s only that tetris thing again with yet another Jinput feature chucked in.

http://www.adam.com.au/kellyjones/java/JMTRumble/

and lotsa broken stuff. Some Axes don’t work. it worked before. i broke it. will fix it sometime, but it’s a pain for gamepads that pretend to be analog.
pads that have analog sticks and a d-pad will work ok though (except if they call the D-Pad a hat switch)
controllers will rumble even if you use the keyboard.

(if anyone feels like looking at the code for the input and maybe finding what’s wrong… )
http://www.adam.com.au/kellyjones/java/JMTRumble/source/InputManager.java

Rumbles when you clear a line. more lines = more rumbles. My Adaptoid (n64 controller) shakes the table, the PC Usb thing that i got for Xmas barely moves.

if i were to increase the duration of the rumble, the n64 controller would be too annoying to use, so that’s my problem. Anyone else out there with rumbling controllers, try it and let me know… too strong? too soft? an n64 rumble pak has it’s own batteries but most pc rumblers don’t… i played around with intensity on a little test i did and tried all sorts of values. as far as i saw, there are 2 values the controller recognises here: on and off, and the line between them is 10 for the adaptoid and 50 for the usb pad. (approximately).

i don’t really need control over the intensity in this game, but in the test i worked around it by switching it on and off repeatedly with diferent delays.

i suspect that my pc gamepad is either dodgy or broken anyway cause it has 2 rumblers and telling the second one to rumble makes it feel like the motor can’t even tick over fully in that side. Maybe not enough power coming from the laptop… i’ll check that out soon.

went to a lot of trouble to make the menus all AWT-erized, regretting it a lot now (waste of time for something that looks worse).

the joystick and keyboard buttons get saved when you close the game now. (if a joystick isnt plugged in when tetris starts, the game will forget about it and won’t even save it for next time.)

i had a headache writing the part that loads the keyboard and joystick buttons. the old serialize it and forget it trick just didn’t work. (didnt think it would)

anyway that’s my rant. it’s quite incomplete, but it’s all i’m doing for tonight and i wanted to release something at least.

and no, i’m not webstarting it. not till it’s at another stage of completion.

Hmm… it kinda works… hard drop, soft drop, rotate… but left/right doesn’t work.

It’s kinda odd since I’d bound hard drop to down (it was also correctly detected during configuration Y+, Y- …)

???

i think it’s confusing X+ and X- which causes it to stay in one place (ie when one is pressed it thinks the other is too). i’ll look at the older version which works correctly and see what’s diferent.

i think it’s confusing X+ and X-

Yep :slight_smile:

Just bound left to left, down to down and right to a button… that works.

Oh and the key configuration is saved but not loaded (when I start it again) and you have all images twice… inside of the jar (together with a bla.db file wich doesnt belong there) and inside of the images subdirectory.

Oh heh and you shouldnt call it tetris (even if it’s free).

However, it’s a nice game so far… too bad that I don’t have a FF pad (took one w/o FF, because it was 5¤ cheaper).

Hi
A quick note about FF, It should work ok under windows, at least it does with the Logiteck cordless wingman rumblepad I’ve got. Linux isn’t implemented yet, but I do finally have the game pad working under linux with help from Johann Deneux who wrote the kernel drivers for the logitech stuff. Linux Jinput FF is on the list of things to do, but I have other projects to finish first. I’m hoping it won’t take too long though once I start.

Cheers

Endolf

oh yeah, the force feedback works ok on windoze but i dont have linux or a mac handy. this game doesnt work too gr8 on a mac anyway i don’t think… the intensity control doesnt actually seem to do anything except some controllers only rumble at 50+ and some rumble at 10+… it doesnt, however, seem to make a diference to the actual strength of the rumble.

and if i start rumbling and quit b4 stopping it it goes on forever… but that won’t be a problem i don’t think as long as ppl remember to include something like [deviceRumbler].rumble(0) in their exit code.

another thing i discovered is that force feedback devices are far from precise in any way. for consoles it’s a diferent matter but pc hardware’s implementation seems to lack any kind of standardisation.

edit: Onyx, there’s an older version i made in early[er] days of JInput which works just fine. when i get time i’ll compare the code and see where i broke it. you can see it in the thread: A Working Jinput game

Onyx: did you try setting the keys and stuff, (including keyboard) and then quitting and restarting, it should work just fine although the input config will still consider them not set, i just haven’t yet written the code to rename the buttons when the game is loaded.

tetris, blocko’s, bricks. if anyone wants to sue me you’re more than welcome… i have no money anyway. even less in 2 weeks when i quit my job and go back to UNI. at least i’ll have a lot more time. there’s nothing fun about full time 12 hour night shifts (where average income is around $9 an hour. i hate my job. that’s another story.)

Ack! thumbs.db. that annoying little file finds it’s way into everything! thx for pointing that out. the images in the jar is the correct one. the other one i absent-mindedly copied along with the jar. (wondering why it shot up in size so much) i have do not cache thumbnails on but musta looked at it on another computer over the network. Thumbnail cache is one of the stupidist ideas MS came up with to help the kids who like to save wallpaer sized 32-bit .bmp files they scribbled out in paint.

[quote]the intensity control doesnt actually seem to do anything except some controllers only rumble at 50+ and some rumble at 10+… it doesnt, however, seem to make a diference to the actual strength of the rumble.
[/quote]
Hmm, thats wierd, on my wingman rumblepad it does exactly change how hard it rumbles, I don’t have any more devices to test with. If anyone in the Croydon area of london fancies popping over with some other rumblable devices for a play i’m open to that :).

[quote]and if i start rumbling and quit b4 stopping it it goes on forever…
[/quote]
Yeah, this is a problem. The problem is that I have two alternatives, a timed rumble, which means the user has to remeber to restart it if they want to to run longer, or one that runs for ever, which needs explicitly killing before the app exits. I also had problems at the directx level where if the app sets the rumble to 0 and immediatlyquits (ie, next line of code) then it will continue, it seems that it takes a while for the new settings to take effect, and if they arn’t given time it ignores the request, so no, even under windows it’s not perfect, but operational.

[quote]another thing i discovered is that force feedback devices are far from precise in any way. for consoles it’s a diferent matter but pc hardware’s implementation seems to lack any kind of standardisation.
[/quote]
In terms of force applied?, in rumblers yes, but directx has all sorts of call backs for finding the number of newtons force applied to the users hand for effects and axis, never tried them though as I just have that rumblepad :slight_smile:

Cheers

Endolf

[quote]directx has all sorts of call backs for finding the number of newtons force applied to the users hand for effects and axis, never tried them though as I just have that rumblepad
[/quote]
that’s interesting. is there the same level of control in the linux implementation?

i think my pc usb gamepad thingy is broken to be honest. if not, it’s way too underpowered (testing it from both control panel and java). on the other hand, when i was testing the rumble pack in the n64 controller with jinput (thru an adaptoid) started shaking, i was a bit shocked. i’d never seen it shake so hard before, either in the console or the emulator.