Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Rumbling game  (Read 1819 times)
0 Members and 1 Guest are viewing this topic.
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Posted 2004-01-20 10:45:01 »

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.
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #1 - Posted 2004-01-20 11:51:54 »

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- ...)

Huh

弾幕 ☆ @mahonnaiseblog
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #2 - Posted 2004-01-20 20:54:33 »

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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #3 - Posted 2004-01-20 21:14:27 »

> i think it's confusing X+ and X-

Yep Smiley

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).

弾幕 ☆ @mahonnaiseblog
Offline endolf

JGO Knight


Medals: 7
Projects: 1


Current project release date: sometime in 3003


« Reply #4 - Posted 2004-01-20 23:08:47 »

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

Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #5 - Posted 2004-01-21 11:13:17 »

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
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #6 - Posted 2004-01-21 11:24:30 »

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.
Offline endolf

JGO Knight


Medals: 7
Projects: 1


Current project release date: sometime in 3003


« Reply #7 - Posted 2004-01-21 11:36:30 »

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.

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 Smiley.

Quote
and if i start rumbling and quit b4 stopping it it goes on forever...

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 *immediatly*quits (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.

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 Smiley

Cheers

Endolf

Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #8 - Posted 2004-01-21 11:48:57 »

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


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.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (55 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!