Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  
  I'm breaking it  (Read 2658 times)
0 Members and 1 Guest are viewing this topic.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Posted 2004-08-27 06:49:04 »

Core API changes for Axis.Identifier are looking like they will be going in to CVS soon, that means the work breaks if you are on OSX (any OSX devs out there?? Smiley). Linux and DX plugins should be done, so you will need to get all of them. I'll post back when i'm about to commit, and again when I do commit.

See this thread.

Endolf

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #1 - Posted 2004-08-27 08:30:23 »

Summary of changes

Axis is renamed Component.

Component.Identifier should not be extended unless you have specific devices you are writting for, and then it would be better to update the core one. There are identifiers listed for buttons, axis and keys, please use them rather than your own Smiley. It means that all the plugins will be consistant. There are lots more buttons especially defined now.

Endolf

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #2 - Posted 2004-08-30 00:02:08 »

I'm against the change.  Axis is a proper term for buttons (including keyboard keys), and analog controls.  Component is already overused in the JRE.  This rename isn't useful and in fact makes things worse.

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

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #3 - Posted 2004-09-01 06:11:16 »

Quote
Axis is a proper term for buttons (including keyboard keys), and analog controls.


How so?, a keyboard has no axis, it has keys. A mouse has 2,3 or 4 (I've not seen any more) axis, it also has a number of buttons. I don't think calling a button an axis is correct.

Quote
 Component is already overused in the JRE.  This rename isn't useful and in fact makes things worse.


It's a component of the controller. It seemed better than 'bit', 'thing', 'whatsit' or 'ingredient'. The HID standards were mentioned to name it Control, but a controller with controlls *would* have been confusing, as you pointed out. I'd be happy to rename it if something better was suggested. I'm not sure how it makes things worse. Purley because there is already a Component class defined in AWT?. I'm trying to see the issue here, but I can't seem to get what you are saying.

Endolf

Offline TheBohemian

Junior Member




Java will rule them all!


« Reply #4 - Posted 2004-09-01 20:05:50 »

Quote


How so?, a keyboard has no axis, it has keys. A mouse has 2,3 or 4 (I've not seen any more) axis, it also has a number of buttons. I don't think calling a button an axis is correct.

Good thing - as already said: I found documenting complicated with 'axis', 'axes' and 'Axis'.

cya

TheBohemian

---------------------------------------
my favorite OS: http://jnode.sf.net
Java 1.5 -> 1.4 converter: http://retroweaver.sf.net
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2004-09-02 08:00:39 »

Call a button a button.

Cas Smiley

Offline Mark Thornton

Senior Member





« Reply #6 - Posted 2004-09-02 13:40:35 »

Quote

It's a component of the controller. It seemed better than 'bit', 'thing', 'whatsit' or 'ingredient'. The HID standards were mentioned to name it Control, but a controller with controlls *would* have been confusing, as you pointed out.Endolf

Perhaps it is the 'controller' which is misnamed.

Controller ==> InputDevice
Axis ==> Control
Offline TheBohemian

Junior Member




Java will rule them all!


« Reply #7 - Posted 2004-09-03 00:15:09 »

Quote

Perhaps it is the 'controller' which is misnamed.

Controller ==> InputDevice
Axis ==> Control

Ah thanks. Someone else then me mentioned renaming both. (done that in a different thread)

Now again with Mark's support:
Please rename both classes.

cya

TheBohemian

---------------------------------------
my favorite OS: http://jnode.sf.net
Java 1.5 -> 1.4 converter: http://retroweaver.sf.net
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #8 - Posted 2004-09-03 01:48:19 »

I don't see that is being equivalent nor better.

For one a Control may have more than one Axis  (e.g. X and Y on a stick),  you do not treat them as separate controls, but they are separate Axis.

Perhaps Controller is over used in that it is used to group controls on a single device, so there are Controllers and sub-Controllers?

Maybe we need
InputDevice
which has Controls
which have Axis

?

But the more I think about it the more it seems that the original way is correct.  Buttons ARE Axis,  knobs are Axis, sliders are Axis,  all of these are on a Controller.  Though sometimes Axis are grouped (stick with X & Y, flight yoke with X,Y & Z), a general grouping of sub-controllers to accommodate this seems reasonable.

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #9 - Posted 2004-09-03 09:22:48 »

Quote
Controller ==> InputDevice
Axis ==> Control

Works for me.

Endolf.

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

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #10 - Posted 2004-09-03 10:08:36 »

But it's simply wrong!

Axis != Control

e.g. a stick is one control with two Axis

Why is there any desire to change what we have?Huh

Offline TheBohemian

Junior Member




Java will rule them all!


« Reply #11 - Posted 2004-09-03 10:42:37 »

With the extreme simplicity of LWJGL's approach to input devices I wonder what cas has to say about JInput's concept of subcontrollers ...

Calling everything an 'Axis' that is in fact a button, slider, axis etc is quite unusual. AFAIK JInput is not the only library that manages input devices so let's have a look what others do:

a) SDL (see libsdl.org - Doc Wiki)
- names everything except mouse and keyboard a 'Joystick'
- each joystick consists of a variable number of axes, balls, hats and buttons

b) ClanLib (see clanlib.org - docs)
- knows mice, keyboard and joystick, and generally input devices
- distinguishes axes and buttons (and keys for kbs)
- assigns id to each axis/button'/key

c) Allegro (see allegro.cc - Online Manual)
- knows joystick consisting of buttons and axes
- uses flags to describe each control (!) of a joystick
- mouse and keyboard are handled completely different

I just do not get why JInput has to do it more complicated than any of these libraries.

cya

TheBohemian

---------------------------------------
my favorite OS: http://jnode.sf.net
Java 1.5 -> 1.4 converter: http://retroweaver.sf.net
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #12 - Posted 2004-09-03 11:00:18 »

JInput doesn't call an button/key an axis, the Axis class has already been renamed Component. We have Controllers and Components. Whilst I agree that an axis is a control, and so is a key, Controller that has Controls would be confusing. The trouble with calling it InputDevice is that a force feedback gamepad for example is not just Input. What is the proper collective term for all Axis, buttons and keys?, it's certainly not Axis, hence it was renamed. Part of the reason JInput is more complicated is that it was not designed purely for joysticks. It was designed for input. Thats my understanding anyway. Otherwise there would be 3 classes, joystick, mouse and keyboard. JInput already supports digitisers for example.

Endolf

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #13 - Posted 2004-09-03 12:32:10 »

Quote
JInput doesn't call an button/key an axis, the Axis class has already been renamed Component.

Which was a significant mistake in my opinion.

Quote
We have Controllers and Components. Whilst I agree that an axis is a control, and so is a key,


I think a key is an axis on a keyboard control.

Quote
Controller that has Controls would be confusing. The trouble with calling it InputDevice is that a force feedback gamepad for example is not just Input.


Right.  controller works fine and is accurate.

Quote
What is the proper collective term for all Axis, buttons and keys?, it's certainly not Axis,

Yes it is!!!
Seriously get a dictionary.  The term axis fits.  Think in mathematical terms... x,y axis for sticks, a single axis for one-dimensional controls like buttons and keys, or knobs, etc.

Think of inputs on a controller in terms of coordinate systems and the state of the device.  Each button or stick adds axis to the coordinate system.

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #14 - Posted 2004-09-03 13:00:50 »

Quote

Which was a significant mistake in my opinion.

I noticed that some how Smiley
Quote
Seriously get a dictionary.


Ouch, but ok, hmm, I can see how a joysticks X, Y, or throttle axis are there, but, erm, a key doesn't rotate. I *suppose* a key/button goes up and down on an axis, and that line could be thought of as one, but it seems like stretching the definition to me.

On the other hand, if the bigest concern is what we call the things on a controller, then JInput can't be all that bad Wink

Endolf

Offline TheBohemian

Junior Member




Java will rule them all!


« Reply #15 - Posted 2004-09-03 16:58:02 »

Quote
The trouble with calling it InputDevice is that a force feedback gamepad for example is not just Input.


But then the whole API should not be named JInput ... no just kidding.

IMHO its more common knowledge that there are force feedback enabled input devices than naming a keyboard key an axis ...

Lets have a look at the Java API: Gues how the Java Sound API (javax.sound.sampled) named the 'thingies' that make the volume, pan etc? A 'Control', right.

Btw: I wish JInput would look more often at the JDK to adopt well-known patterns from it, eg. service provider interface instead of 'yapm' (Yet Another Plugin Mechanism) Wink

cya

TheBohemian

---------------------------------------
my favorite OS: http://jnode.sf.net
Java 1.5 -> 1.4 converter: http://retroweaver.sf.net
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #16 - Posted 2004-09-08 21:27:09 »

Sorry for being a bit harsh.  I needed a vacation, now I'm back Smiley

Quote

hmm, I can see how a joysticks X, Y, or throttle axis are there, but, erm, a key doesn't rotate.

Neither does the joystick.  The axes are simply used to form a coordinate system to measure the state of the device.  For buttons there is one Axis.

Imagine a button that is sensitive to pressure - such as an USB music keyboard.  Now the state of that button not just 0 or 1, as measured on the button's axis, but some other number within a range.

Quote
I *suppose* a key/button goes up and down on an axis, and that line could be thought of as one, but it seems like stretching the definition to me.


I think of it as generalizing... which is exactly the sort of thing that the base class Axis is - a general representation of an input.  I realize that it is not what you would typically think of, but I think the generalization applies well to all input types.

Quote
On the other hand, if the bigest concern is what we call the things on a controller, then JInput can't be all that bad Wink


Yeah, point taken, I just thought it odd that it was something that you thought needed changing, and the alternatives proposed seemed to all make more assumptions about the role of Axis.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #17 - Posted 2004-09-09 19:30:04 »

Quote

Yes it is!!!
Seriously get a dictionary.  The term axis fits.  Think in mathematical terms... x,y axis for sticks, a single axis for one-dimensional controls like buttons and keys, or knobs, etc.

Think of inputs on a controller in terms of coordinate systems and the state of the device.  Each button or stick adds axis to the coordinate system.


I can see that an Axis is "not bad" in it's mathematical defintion; however, I see the following problems:

- the common definition explicitly mentions it as a rotational reference-line (c.f. http://dictionary.reference.com/search?q=axis - not a "perfect" dictionary, but a good HCF of people's common definitions). Hence a lot of people are likely to expect axes to be rotational Sad.

- "axis" and "axes" are difficult words for english people Tongue the pronunciation is similar enough to be damn confusing in speech (easy to mistake one for the other) and it's sufficiently rarely used outside of co-ordinate-space axes that a lot of people probably double-take when they read it and have to think about what it means

Personally, although I've got a sneaking suspicion there's a similar word that more accurately describes the meaning, I'd rather like an "InputDevice" to contain one or more "Input"s (aka "Axis's"). That also makes it clear that they input data rather than output it (c.f. force-feedback devices).

...and I can write "input's" (referring to the programmatic plural of input without impying a different class name) and have it look less stupid than "axis's" (which is IMHO the correct plural of a class named "axis" but looks and sounds horrid).

A "Controller" with Input's sounds equally good to me too Smiley.

As to whether "InputDevice" is good or bad for force-feedbacks, I see a force-feedback device conceptually as "implements InputDevice, OutputDevice" - just because it happens to output stuff doesn't affect the fact that it is a fully valid InputDevice *as well*.

InputDevice compared to Controller? Well...three things:

1. Both are pretty obvious (unlike the other areas of contention, I think either would be acceptable - but it depends on your personal profesisonal / programming background; c.f. next points)

2. I slightly prefer InputDevice (as many others would) because I see it *so* often in my OS (linux: you have XFree86 configuration uses "InputDevice" and you see it a lot in linux-USB docs, config, drivers, etc - probably influenced by the X11 name) *and* because when I browse the javadocs for an API called "JInput" without a decent package.html telling me where to start, the "InputDevice" is going to jump out at me as a starting point because of the prefix-similarity with the API name. This is a small thing, but otherwise I'd have been equally happy with Controller, and this just gives it a small edge!

I *think* "Input-device" is often also used in USB manufacturers manuals - ISTR Wacom refers to their own hardware this way.

3. ...everyone's been calling console thingies "controllers" for years and years.

2 & 3 explain why I think everyone will fall into one of those camps.

malloc will be first against the wall when the revolution comes...
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.

BurntPizza (12 views)
2014-09-21 02:42:18

BurntPizza (11 views)
2014-09-21 01:30:30

moogie (13 views)
2014-09-21 00:26:15

UprightPath (23 views)
2014-09-20 20:14:06

BurntPizza (27 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (96 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!