Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: Selecting objects with the mouse on: 2005-02-17 14:11:03
sorry for not replying unti now. I got busy with some other things and forgot about this part of my project and this topic.

I used this example and with some modifications it worked just fine for me, thx a lot.

2  Game Development / Networking & Multiplayer / what am I doing wrong? (newbie- please help) on: 2004-10-18 17:33:36
hello.

I am making a JOGL networked aplication, and here is what I am trying to do:

I have a few JSliders, that controls the atributes of a JOGL 3D object( a cube). So, if the user changes the position of the JSlider, it must send this information to all the other users, and then get the atributes changed.

here is what I done, but it isn]t working:

on the contructor:

1  
2  
3  
4  
5  
6  
7  
try {
                socket = new DatagramSocket(5000);
            }

        catch(SocketException socketException) {
        socketException.printStackTrace();
        }


on the state changed metod of the SliderHandler class (couse I olnly have to send informations when someone chage the atributes value)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
try{

                byte sendData[] = pacoteString.getBytes();

                sendPacket = new DatagramPacket(sendData, sendData.length, InetAddress.getLocalHost(),5000);
                socket.send(sendPacket);


                byte reciveData[] = new byte[100];
                receivePacket =new DatagramPacket( reciveData, reciveData.length);

                socket.receive(receivePacket);

                pacoteString = new String(receivePacket.getData(), 0, receivePacket.getLength());

                token = new StringTokenizer(pacoteString);

                flag = Integer.parseInt(token.nextToken());

                valor = Float.parseFloat(token.nextToken());
                System.out.println(valor);


                if(flag == ROTACAO_X_CUBO)
                   renderer.setrotacaoCuboX(valor);

                else if (flag == ROTACAO_Y_CUBO)
                     renderer.setrotacaoCuboY(valor);

                else if (flag == ROTACAO_Z_CUBO)
                     renderer.setrotacaoCuboZ(valor);

                else if (flag == TAMANHO_X_CUBO)
                     renderer.settamanhoCuboX(valor);

                else if (flag == TAMANHO_Y_CUBO)
                     renderer.settamanhoCuboY(valor);

                else if (flag == TAMANHO_Z_CUBO)
                     renderer.settamanhoCuboZ(valor);

                else if (flag == POSICAO_X_CUBO)
                     renderer.setposicaoCuboX(valor);

                else if (flag == POSICAO_Y_CUBO)
                     renderer.setposicaoCuboY(valor);

                else if (flag == POSICAO_Z_CUBO)
                     renderer.setposicaoCuboZ(valor);

                else if (flag == COR_VERMELHO_CUBO)
                     renderer.setcorCuboVermelho(valor);

                else if (flag == COR_VERDE_CUBO)
                     renderer.setcorCuboVerde(valor);

                else if (flag == COR_AZUL_CUBO)
                     renderer.setcorCuboAzul(valor);
                }

            catch (IOException ioException){

                  ioException.printStackTrace();
                  }
        }


Should I made a diferent code for the client and the server? Couse the way it is now, it's all the same.
What is happning is that it's only sending the packet to itself, like there isn't any other user runing the program.
I don't have much experience, so any help would be very apreciated.
thx,

uderman
3  Game Development / Networking & Multiplayer / Sending float data over a network on: 2004-08-16 15:57:07
Hello

I am writing a JOGL/Swing program, and in the network part of it I need to send information about some 3D objects over a network. When a user changes the objects atribute, every instance of the program must recive this information, so I will not be a client/server program right? I think all I have to do is to learn how to send data(floats) over a network. Can anyone help me or point me to the right direction?

Thx
4  Java Game APIs & Engines / JOGL Development / Selecting objects with the mouse on: 2004-08-02 17:12:56
hello,

In my JOGL program, I have to objects ( a cube and a piramide), and all the program so is change some objects propriets like position, rotation, size, color using JSliders.

So far I have just implemented the changes to the Cube. I would like to be able to select the objects with the mouse, and then perform the actions to the object selected, and also be able to drag the objects aroung the world. How can I do that?

I have read some material about selection on OpenGL, but I am having problens to "port" this to JOGL. I think all I have to do is to somehow know wich object is selected, and then send this info to the ChangeListener class of the Jsliders to perform the action to the selected object.

thx,
any help is apreciated.

5  Java Game APIs & Engines / JOGL Development / Re: Using JCanvas with Swing on: 2004-07-20 14:49:26
got it, thx a lot
6  Java Game APIs & Engines / JOGL Development / Re: Using JCanvas with Swing on: 2004-07-19 10:52:54
thx, but how about the part of adding the GLCanvas to the frame?
7  Java Game APIs & Engines / JOGL Development / Using JCanvas with Swing on: 2004-07-19 10:24:11
hello,
I was thinking about making something similar to this:

-----------------------------------------------------
|JMenu                                                       |
-----------------------------------------------------
|JList      |                                                  |
|             |                                                  |
|             |              JCanvas                        |
|             |                                                  |
|             |                                                   |
|             |                                                   |
|             |                                                   |
-------------------------------------------------------

is it possible?
I know about the issues about mixing lightweight and heavyheight components, but that can be solved if I set the JMenu and JList components to heavyheight right?

How do I add the the JCanvas? Add it to a JPanel, and then add the JPanel to the main JFrame?

any help is apreciated, thx.

Edit: The ansii pic is messed up, but it´s a menu in the top, then a list if the left and the canvas.
8  Java Game APIs & Engines / JOGL Development / Re: "no jogl in java.library.path" on: 2004-07-08 09:28:50
thx, it's working now Smiley
9  Java Game APIs & Engines / JOGL Development / "no jogl in java.library.path" on: 2004-07-07 18:05:49
C:\j2sdk1.4.2_04\bin\java.exe  -classpath "C:\j2sdk1.4.2_04\jre\lib\rt.jar;C:\j2sdk1.4.2_04\lib\tools.jar;C:\Arquivos de programas\Java\j2re1.4.2_04\lib\ext\jogl.jar;E:\Uderman\OpenGL\NEHE TUTORIAL\LESSON 1\JOGL CODE" Lesson01
java.lang.UnsatisfiedLinkError: no jogl in java.library.path
                       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
                       at java.lang.Runtime.loadLibrary0(Runtime.java:788)
                       at java.lang.System.loadLibrary(System.java:834)
                       at net.java.games.jogl.impl.NativeLibLoader$1.run(NativeLibLoader.java:60)
                       at java.security.AccessController.doPrivileged(Native Method)
                       at net.java.games.jogl.impl.NativeLibLoader.<clinit>(NativeLibLoader.java:46)
                       at net.java.games.jogl.impl.GLContext.<clinit>(GLContext.java:51)
                       at net.java.games.jogl.impl.windows.WindowsGLContextFactory.createGLContext(WindowsGLContextFactory.java:82)

                       at net.java.games.jogl.GLCanvas.<init>(GLCanvas.java:69)
                       at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:150)
                       at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:118)
                       at net.java.games.jogl.GLDrawableFactory.createGLCanvas(GLDrawableFactory.java:85)
                       at Lesson01.main(Lesson01.java:121)
Exception in thread "main" Finished executing


hello,

I got this erro when trying to run the JOGL code to nehe tutorial 1.
Probably I didn&acute;t installed JOGL correctly, so can anyone help me?
10  Game Development / Networking & Multiplayer / 3D graphics on a network aplication on: 2004-06-21 15:26:52
hello,

I will create a networked virtual environment in Java, and would like to know what should I use to create the virtual environment and the virtual objects..

does it make a diference using Java3D or JOGl in the network part of it?(Like sending information about the location of the objects to the instances of the program?)

Any ideas are apreciated, since I don't know much about anything Cheesy

also, those are topics that I made asking questions about my project in the Java3D and JOGL forums:


http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action =display;num=1087577051

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=3D;action=display;num=1087772943

11  Java Game APIs & Engines / Java 3D / Should I use Java3D in my aplication? on: 2004-06-20 21:09:03
hello,

I need to build a networked virtual environment, and need to create the 3d space, and some 3d objects to play around. I asked at the JOGl forum if using JOGl was my best choice, and they said that I should use Java3D or Xith3D:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1087577051

As far as I know, I would get best performace using Opengl, and would get the project better organized and would deal with the 3D objects in a network better using Java3D or Xith3D. Am I correct?

Also, I would like to know if Java3D really is slow, takes more space, more memory and stuff, is it true?

Is it possible to use Java3D in my aplication? Couse a important part of the project is study he behaves of the virtual environments when more users connect to it. Would it be a issue when sending packages over the network with informations about the objects(like position, moviments, if it´s selected by other users and more)?

Thanks for ya help.

uderman
12  Java Game APIs & Engines / JOGL Development / Re: Questions from a n00b on: 2004-06-18 19:07:48
thx for the fast replies Smiley

another thing, I heard that Java3D is slow, takes much space and stuff, is it true?

I am asking that couse it could be a problem for the project when sending information for the instances of the project over the nerwork. And I wil take a look at Xith3D to see what it's about.

13  Java Game APIs & Engines / JOGL Development / Questions from a n00b on: 2004-06-18 14:44:11
hello all.

I am completly new to openGl, and don't have much experience in Java. I will develop as a research project at University a "Networked Virtual Environment" in Java. So I need to build the 3d ambient, and also add some 3d objects to it, then study the network efects while the users manipulate those objects on the environments.

I would like to know if using JOGl is my best choice, or if I should use Java3D, or anything else?

If the best choice is to use JOgl, the way I should go is to frist learn some openGl, and then JOgl right? Also, where can I find some resourses to learn JOGl? The only Tutorial I finded so far was this one: h++p://www.stud.ntnu.no/~johanno/appletviewer.jsp?task=tutorials. If anyone could provide me with some more resourses it would be great.

Thanks all,

Uderman
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (55 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (89 views)
2014-12-09 22:41:13

BurntPizza (112 views)
2014-12-08 04:46:31

JscottyBieshaar (83 views)
2014-12-05 12:39:02

SHC (92 views)
2014-12-03 16:27:13

CopyableCougar4 (100 views)
2014-11-29 21:32:03

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

toopeicgaming1999 (159 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

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