Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  
  Input in Xith  (Read 1323 times)
0 Members and 1 Guest are viewing this topic.
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Posted 2006-03-25 16:39:38 »

Which input method should I use ?

First I tried pure AWT, with a class that extended AWTEventListener. That was not bad, but the problem is I had to maintain variables like button1Pressed or keyUpPressed.
Then I made a little library : OEM (Open Event Manager) that had a Vector of AWTEventS. It's pretty convenient, cause you can treat the input when you do want. You just have a swap() method to call each time you run through the event list. It's a kind of "double-buffering".

But I see I won't be able to handle LWJGL renderer with this approach. HIAL permits to do that, so I looked at this alternative.. maybe I can do an HIAL-based OEM version..

And I see there's JInput, too, that can handle controllers (joysticks, joypads...).

So really I don't know what is the best..

Sure I don't need controller support but it's always "a nice thing to have" and, who knows, maybe I'll implement it one day for one of my games..

What's your opinion ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2006-03-25 18:49:13 »

Hi

Elias and co have just done some brilliant work on jinput to add an event queue style interface as well as the old way. I've only found 2 bugs so for, and considering that is in the linux force feedback code thats not surprising, I did the original code and I know how much of a pain it is Smiley.

Endolf

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #2 - Posted 2006-03-26 02:39:07 »

I find HIAL works nicely with Xith3D.  Being an abstraction layer, you can add support for other API's.  It would be nice to have an abstract controller interface.

Will.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #3 - Posted 2006-03-27 16:32:30 »

Elias and co have just done some brilliant work on jinput to add an event queue style interface
Where can I found this work ? Seems interesting.

...you can add support for other API's.  It would be nice to have an abstract controller interface.
You mean, add support for JInput in HIAL ? (BTW, is HIAL a java.net project yet ?)

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #4 - Posted 2006-03-27 20:01:37 »

Elias and co have just done some brilliant work on jinput to add an event queue style interface
Where can I found this work ? Seems interesting.

See Elias first 2 posts in this thread.

HTH

Endolf

Offline hawkwind

Junior Devvie




Java games rock!


« Reply #5 - Posted 2006-03-28 02:32:27 »

hial works just grand for me Smiley
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #6 - Posted 2006-03-28 09:48:28 »

OK, I'll see what I can do.
Probably I'll make a JInput driver for HIAL, and then an event-queue system for HIAL. That'd be the more generic solution, IMHO.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
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.

PocketCrafter7 (11 views)
2014-11-28 16:25:35

PocketCrafter7 (6 views)
2014-11-28 16:25:09

PocketCrafter7 (6 views)
2014-11-28 16:24:29

toopeicgaming1999 (73 views)
2014-11-26 15:22:04

toopeicgaming1999 (63 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!