Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
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 finally giveup use java to develop game  (Read 2319 times)
0 Members and 1 Guest are viewing this topic.
Offline babypig

Junior Newbie




Java games rock!


« Posted 2005-03-27 01:37:58 »

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~
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2005-03-27 02:35:53 »

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.

Offline babypig

Junior Newbie




Java games rock!


« Reply #2 - Posted 2005-03-27 08:02:27 »

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

Junior Newbie




Java games rock!


« Reply #3 - Posted 2005-03-27 08:05:26 »

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.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2005-03-27 10:02:59 »

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" Sad.

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

malloc will be first against the wall when the revolution comes...
Offline babypig

Junior Newbie




Java games rock!


« Reply #5 - Posted 2005-03-27 11:13:47 »

then what should I do is to giveup?
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2005-03-28 09:29:54 »

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 Smiley

Offline Daniel_F

Junior Member


Projects: 2


Java games rock!


« Reply #7 - Posted 2005-03-28 12:26:13 »

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 Smiley

Short answer: Well I would like to  Grin

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? Sad

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?
Offline babypig

Junior Newbie




Java games rock!


« Reply #8 - Posted 2005-03-29 03:01:51 »

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


Quote

Short answer: Well I would like to  Grin

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? Sad

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?

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 (21 views)
2014-09-19 03:14:18

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

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

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

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

mitcheeb (65 views)
2014-09-08 06:06:29

BurntPizza (47 views)
2014-09-07 01:13:42

Longarmx (35 views)
2014-09-07 01:12:14

Longarmx (40 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19
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!