What you are trying to achieve is that the whole game is actually being
played at server.
On the other hand..
In my way of development.. the great thing is the thin communication. that
is .. the only 'thing' that will transferred will be some co-ordinates. or
a vector, of hardly 10-50 bytes.


lets get back to the original problem
i have removed everything from my scene graph. just a box. even then my
speed of moving that box using keyboard is very slow.
any suggestion, why?

i am using the following code for keyboard input:


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Transform3D move = new Transform3D();

  public void initialize()
        {

                keyboardEvents = new WakeupCriterion[2];

                // Only wake up when a key is pressed or released

                keyboardEvents[0] = new
WakeupOnAWTEvent(KeyEvent.KEY_PRESSED);
                keyboardEvents[1] = new
WakeupOnAWTEvent(KeyEvent.KEY_RELEASED);
                keyboardCriterion = new WakeupOr(keyboardEvents);
                wakeupOn (keyboardCriterion);
        }


        public void processStimulus (Enumeration criteria)
        {
                WakeupCriterion wakeup;
                AWTEvent[] event;
                KeyEvent evt;

do {
                        wakeup = (WakeupCriterion) criteria.nextElement();
                        if (wakeup instanceof WakeupOnAWTEvent) {
                                event =
((WakeupOnAWTEvent)wakeup).getAWTEvent();
                                for (int i=0; i<event.length; i++) {
                                        evt = (KeyEvent) event[i];
                                        if
(evt.getID()==KeyEvent.KEY_PRESSED) {
                            KEY_PRESSED=true;

                                                switch(evt.getKeyCode()) {

                                                        case
KeyEvent.VK_LEFT:       // move left

                    posx=posx-change;

move.set(new Vector3d(posx, posy,0.0f));

transformGroup.setTransform(move);
                                                                break;

                                                        case
KeyEvent.VK_RIGHT:       // move right

                    posx=posx+change;

move.set(new Vector3d(posx,  posy,0.0f));

transformGroup.setTransform(move);
                                                                break;

          } //end of switch
     } end of processStimulus


<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

i just wanted to give u the idea , how inout is taken and how the position
of a trasnformGroup is changed,
is there any other more efficient way?

ThanX.
fahad







Rayan Jreije <[EMAIL PROTECTED]> on 02/07/2000 10:07:32 AM

Please respond to Discussion list for Java 3D API
      <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Fahad Aziz/pk/Netsol)

Subject:  Re: [JAVA3D] Hello




Thanks Fahad,
So you have separate scenegraph for every player?
And the servlet is used only to exchange positions?
So as i understand you are "replicating" the geometry among users,
So I conclude there's no one shared scenegraph on the server.

What do you think about Having only one scenegraph on the server,
and having different views distributed among different users.
Meaning that every user will have different Canvas3D, and the connection
between the main scenegraph and the canvas3D would be through sockets.

Just an idea,What do you think?
I would apppreciate your opinion.
Thanks,
--Rayan Jreije



-----Original Message-----
From: Fahad Aziz [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 07, 2000 9:55 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Hello


I am using two transform groups, for two players.
What i require to do is that i move the two transform groups, as the two
plyers move themselves. i simply use setTransform to perform this job.

What is transferred between different users is the new position of player
and the position where it hits the ball,

1. Player 1 forward its position to the servlet.
2. Servlet has a socket connection with player 2,
3. Servlet  forwards this information to  Player 2.
4. Player 2 Receives the information and updates the postion of the
player2's transform group.


hope the picture is now clear.

fahad
Lahore, Pakistan








Rayan Jreije <[EMAIL PROTECTED]> on 02/07/2000 07:25:48 AM

Please respond to Discussion list for Java 3D API
      <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Fahad Aziz/pk/Netsol)

Subject:  Re: [JAVA3D] Hello




Hello Fahad,
I guess you are experiencing slowliness of your input not because of the
interface to the keyboard itself, but because you might have a large number
of active Java 3D behaviors at once. I am not sure in this case if Keyboard
buffering might help!
The solution is to redesign your user interaction in a way that you
minimize
the number of active behaviors running at once.

I am also working on a project and i need your assistance in the subject of
Multiplayer.
You said you are using JServlets +socket communivation to make your
application multiplayer(distrubited).
What is your strategy in this issue?
Are you building one scenegraph for every user?And where is the rendering
happening?
Are you rendering your scenegraph on the server and "streaming" the image
to
the user?
Or you are rendering the scenegraph on every user machine?

I would highly appreciate you sending me information or technical papers
and
references regarding this issue, because i am at the point to start a 3D
collaborative application that is very similar to what you have already
done.

I would be pleased also if i get any feedback from any other members of the
group.
Sincerely,
Rayan Jreij


-----Original Message-----
From: Fahad Aziz [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 07, 2000 8:54 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Hello


Hi.
I am a student of Bachelors, here at FAST ICS, Lahore-Pakistan
I am working on a online game called : 3D Online Multiplayer Paranoid"
I am using Java3D to develop the game and JServlets +Socket Communication
to provide Multiplayer support
I have successfuly developed the  game. The only problem i am facing is the
performance.
Java3D is though comparatively slow, but why is the keyboard input takes
much time.
I am looking forward for your assistance in this regard.
I want to implement keyboard-buffering thing, that used to solve my problem
if there is some other way to get good, fast and prompt inputs from
keyboard, i will highly appreciate.

Thank You
Fahad

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to