I finally giveup use java to develop game

I really love java to make my net game, but after 10 days of research, I finally find java can’t reach my requirment, sigh~

My requirment is simple: (I will do a chinese net game)

  1. can fullscreen (this kick swt / swt + opengl / swt + lwjgl out, for swt can’t support fullscreen, is that true?)

  2. can support java input method framework(chinese ime) in Peered mode. (if anyone have any idea to do it in fullscreen mode? I just want to enable awt or swings on the jogl/lwjgl’s canvas, but failed! and when I use xith3d, it’s swing just support input method in non-client mode, can’t input chinese at all)

  3. can support chinese character in game(that’s can be solved, but I should define a large chinese font bitmap)

as I look back into microsoft directx, it solved these problem perfect, but I hate directx, I hate microsoft, I like my program run on linux/macosx, can someone give me some suggestion to use java do this job?

Sorry for my poor english~

How about using Swing/AWT for your input with JOGL? Any input can be done outside the OpenGL canvas (using stock standard widjets). Since Xith3D can render to a JOGL canvas, you can use Xith3D in this manner.

Sure it’s not as nice as having the input within in the OpenGL canvas itself, but at least you can get started.

Fullscreen shouldn’t be a problem with JOGL or LWJGL AFAIK.

Will.

but as just I said in 2, xith3d can just support SWT/AWT input method in non-client model, it can’t input chinese at all (I think it caused by no fully event support)

full screen is not problem, but full screen with chinese input method is just the problem, I have try many way to achieve it, but samed that I failed.

and if use AWT/Swing background, people can’t use chinese input method framework to select the character they need, it’s a big problem.

[quote]How about using Swing/AWT for your input with JOGL? Any input can be done outside the OpenGL canvas (using stock standard widjets). Since Xith3D can render to a JOGL canvas, you can use Xith3D in this manner.

Sure it’s not as nice as having the input within in the OpenGL canvas itself, but at least you can get started.

Fullscreen shouldn’t be a problem with JOGL or LWJGL AFAIK.

Will.
[/quote]

Indeed, I feel sorry for the chinese developers for whom Sun’s java really isn’t very good. Just look at the number 1 bug on Sun’s “bug parade” :(.

Surely there’s some organization in China that’s working on providing the code / patches / etc for this internationalization? Given how high the demand is…

then what should I do is to giveup?

Do you really need Chinese input? I ask because the vast majority of games I play or even see don’t have any input at all apart from keyboard polling.

Cas :slight_smile:

[quote]Do you really need Chinese input? I ask because the vast majority of games I play or even see don’t have any input at all apart from keyboard polling.

Cas :slight_smile:
[/quote]
Short answer: Well I would like to ;D

Long:
(Note1: this is all with LWJGL OpenGL frame)
(Note2: I am not that good with keyboards, just trying to figure out.)

Basically we have a non-standard keyboard (mine (hungarian)), let just concentrate on two keys on this keyboard:
Shift: thank god, its there where it has to be
(standard) “z”: oops, this for weird reason is swapped with the “y” key

My goal is to:
Enable to the user to set his keys used in the game to whatever he wants.

Let’s see what happens when the user presses the “z” key:

LWJGL returns the keyboard scan code (look at the table not the image): 44=“z”=(0x2C) (Keyboard.getEventKey())
and the localised character 121=“y” (Keyboard.getEventCharacter())

AWT KeyEvent (which AFAIK does NOT work in the LWJGL frame) returns:
Java-inner code 89 (KeyEvent.VK_Y)
and ascii code 121=“y”

Oookey, now lets look at the problem.
We have 2 possibilities: Setup in the LWJGL-frame in game, or create an AWT/Swing setup frame, and after the user presses the “Play” button, the LWJGL frame starts.

LWJGL mode:
-Can I use the scan code? Well, this way internationalised keyboards will never be recognised (i.e. when I press “y”, it will say I pressed “z”). Not the best idea, but oh well…

-Can I use character? No becouse If I use “shift” as for example Shoot, and “y” to left, than the character code may be sometimes 121=“y” (when Im not shooting), and sometimes 89=“Y” (when Im shooting).

-Both? The user presses the key, I save the scan code, but print the character to the screen. But what happens when the shift is pressed/caps lock is on? the user will see different characters for the same key (“y”, “Y”). And what when the user changes the locale settings in the OS? :frowning:

new Frame mode:
-character? see above
-Java inner code? It cannot be assigned to a LWJGL code.

Problem complicates when I want the user to write his name/level code/chat with the non-standard keys…

What I would like to see?

  1. maybe to convert keyboard scan-code to (lower case) localised character. Is there anything for this in Java?
  2. Use AWT Keyboard handling in LWJGL frame. It does not seem to work, even the Toolkit.addAWTEventListener does not dispatch thoose.

P.S.: Im i overcomplicating the problem?

I think chat in a net game is very important, to chinese user the chinese character input should be considered at No.1 position.

After 2 day’s dig, I think I found a way to solve this problem, but it’s still in my mind, I will finish a code in a few days, hehe~

If someone need code, please wait patiently.

It focus several techology down:

  1. java input method framework
  2. jogl (GLCanvas)
  3. chinese character show in opengl