Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
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] 2
1  Java Game APIs & Engines / Xith3D Forums / Re: JDesktopPane in a UIWindow? on: 2004-05-05 21:19:28
When I tried my first steps with swing & xith  for the first time it was not working but after that I set any bounds of any object - that is all parent objects of your internal frame should have them set also.

If that does not help you may try a simpler example without internal frames and desktop pane.  A simple jpanel should work (maybe add a label also).

PS: I remember not having success when trying to move internal frames on the UIOverlay. Event handling is not as expected (the canvas always want to be the receiver/originator of events - had a hard time when making a workaround for textfields WITH real working eventlisteners - thread Prob with Xith, Swing, textfield + listeners http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1079039524). The other way around seems easier (Xith within swing gui: see thread "Xith and Swing ")

BTW: as far as I know show and setVisible are equal (though show is deprecated).
2  Java Game APIs & Engines / Xith3D Forums / Re: JDesktopPane in a UIWindow? on: 2004-05-04 06:12:07
That's a swing only question:

You cannot add a JFrame to a JComponent. That is impossible. The other way around works if you use
1  
yourJFrame.getContentPane.add(yourJComponent);


In your case you can only use any subclass of JComponent  to add to your DesktopPane.

If you need a frame like structure take JInternalFrame which is a subclass of JComponent and is a lightweight version to support features like JFrame.
3  Java Game APIs & Engines / Xith3D Forums / Re: UIOverlay problem on: 2004-05-01 00:38:02
I do not know a way for clearing it faster than by using clearRect but you may can optimize yout code. There is a lot of static data in it (the lines, setting white color twice where once should be enough, calculating data that stays constant, setting nackground  and clearing the full component). That needs to be done only once (at init time or in a separate setter). Also you simply may clear the changing data: the areas of text. For sure that will be small enhancemants but worth to try.

Just my two cents

By the way: what do you mean exactly by calling the clearing to be slow? Flickering (use double-buffering then)? Or updating only 1 or two times during each second? Than you should take in account that swing updates the real view of the gui representation within intervals and not as fast as possible ...
4  Java Game APIs & Engines / Xith3D Forums / What happened to Xith3DCollisionDropTest? on: 2004-03-22 21:53:01
Hi,

I wonder if there is something wrong with the current version available at xith.org. As far as I do remember it was a cube wherein several balls where jumping down and upwards, down and upwards etc.

Currently they are falling down only - no more collision with the outer box!

This is similar to a problem I got when moving inside a box in my own code. In the box collision did not work => I could move out. But from outside the box collision works =>  I cannot go inside again. Even using TestUtils.reverseWinding(geometry) did not help!

Workaround was to place 6 boxes around my outer box but that is a rather desparate approach, isn't it?

Any help would be appreciated,
  Stefan
5  Java Game APIs & Engines / Xith3D Forums / Re: looks like we have some competition on: 2004-03-20 23:55:12
Quote
Well, the answer to 1. is bugger all, took me a few lines of code, and 2. no, probably not. No mouse navigation? Why do you want to write a GUI that doesn't use mouse navigation for a PC game? But let's face it, how hard is it to do? It's trivial. It's all just trivial. It amazes me just how complex some problems can be made by API designers.


You are right complaining that swing is somewhat overpowered for all kinds of usages. On the other hand it allows you to choose HOW to implement a certain input (the kind of how to present a dialog, multiple layouts&widgets + different views, user defined mappings etc). Things I personally do not want to miss.

To 1: I disagree with having only a few lines of code for replacing it all. That may fit for egoshooters but a game like civlization, sim city etc. without an easy to do gui having only a few lines of code that have been testet, are free of errors etc.? Nope. I did a simple graphical hires gui for dos some years ago and it turned out to require more and more time to add features, fix errors and so on. Currently I do not have the time for doing so any longer.

Of course if you do have the required code using opengl only and that is all what you need - use that because it will be faster for YOU when it comes to maintaing your code. Doing good and fast guis with Swing certainly requires some skills plus time and cannot be done from scratch easily. But there are others that started their Java times with 2D and that often leads us to Swing or Swt. And for them having such capaibilites will shorten development times. And that is what counts in our business world- at least for those paying our salaries...

The second point is interesting also. GUIs where it is possible to navigate without using a mouse. Again shooters will not need this in general but there are games where you have to enter several values, maybe you want to chat etc. Doing so by keyboard can be significantly faster for experienced users. Also you can use the mouse for some other action allowing you to have dual action.
6  Java Game APIs & Engines / Xith3D Forums / Re: looks like we have some competition on: 2004-03-20 10:18:40
I disagree that there is no use for Swing, Awt or Swt. You could do any ui in opengl yes that is right but why to invent the wheel for another time again? The Uis have proven to be useful, are stable and I won't miss translucient guis that do not force me to split textures into pieces (256x256 and up).

Integraton of Swing requires some rework for the input handling (key, mouse, focus) but after that there should not be any more problem. And having used Swing since 1998 (with all its errors, flaws and so on) I have to mention that it is not easy to do everything it offers by hand again - I even do not have the time for writing that from scratch. And as I demonstrated with http://team.micram.de/dingfelder/projects/xith3d/jnlp/levelbox/LevelBox.jnlp it is possible to get nice effects (even watermarks) with a minimum of code ...
7  Java Game APIs & Engines / Xith3D Forums / Re: Prob with Xith, Swing, textfield + listeners on: 2004-03-20 09:11:20
Part 2 is not that easy ... In fact there is something wrong with the handling of focus, key and mouse events when dealing with Swing. Or maybe I am doing something completly wrong ...

If I have a textfield and add a mouse listener to my GLCanvas the textfield will get the event (Mouse_Click) but right after thet the GLCanvas will get it also!

A possible hack to workaround the doubled event problem would be to simulate some kind of focus handling yourself (did I mention that the AWT's focus will always stay on the GLCanvas? Sad ).

The main idea for this quick hack lies upon getting to know when the user clicks on our textfield (this does not implement any focusHandling per TAB-Key - that has to be done somewhere else).

To give you an overview (only for keyboard input):

Init your Overlay (just an example here - you have to add an overlay and modify any required part)
1  
2  
3  
4  
5  
UIWindowManager myUIWindowManager = new UIWindowManager(canvas);
myUIWindowManager.addOverlay(yourOverlay);
myUIWindowManager.setOverlayFocus(this);
myUIWindowManager.setPosition(this, 0, 0);
myUIWindowManager.setVisible(this, true);


Add a default UIEventListener (would not work without / but ensure having only one added in total):
1  
2  
3  
final UIEventAdapter myUIEventAdapter = new UIEventAdapter(myUIWindowManager);
canvas.get3DPeer().getComponent().addMouseListener(myUIEventAdapter);
canvas.get3DPeer().getComponent().addKeyListener(myUIEventAdapter);


Take your class for handling keyboard input for moving around in your world (use your own - this one relies upon the one David contributed with his nice QuakeDemo) . Note that the instance of the class does not have to be registered anywhere anymore! We will add its caller lateron. This approach will allow you to switch back to your current code when there will be a fix for the current problem related to events connected to Swing.
1  
final MovementKeyboardEventListener myMovementKeyboardEventListener = new MovementKeyboardEventListener(force);


Now we do need a special class to decide whether we have activated a JComponent (especially a textfield) or not. I used a KeyListener here but any other class would do also since this one does not listens for events by itself but simply decides whatever will be called due to the current event.
Sadly GLCanvas will get a 'mouse clicked' event right after the textfield got it => do need two indicators here.
I do not include those two booleans (isJComponent,  isLastSourceAJcomponent). We do need these ones to get hold of the fact having JComponents we want to add special user action to. Just add them to your code where it fits.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
final KeyListener myKeyListener = new KeyAdapter()
{
      public void keyTyped(KeyEvent e)
      {
            if (!isJComponent && !isLastSourceAJComponent)
                  myMovementKeyboardEventListener.eventDispatched(e);
      }

      public void keyPressed(KeyEvent e)
      {
            if (!isJComponent && !isLastSourceAJComponent)
                  myMovementKeyboardEventListener.eventDispatched(e);
      }

      public void keyReleased(KeyEvent e)
      {
            if (!isJComponent && !isLastSourceAJComponent)
                  myMovementKeyboardEventListener.eventDispatched(e);
      }
};


Right after that we build a AWTListener which will handle key and mouse events to glue everything:
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  
AWTEventListener myAWTEventListener = new AWTEventListener()
{
      public void eventDispatched(AWTEvent event)
      {
            if (event instanceof KeyEvent)
            {
                  if ((event.getID() == KeyEvent.KEY_PRESSED))
                  {
                        myKeyListener.keyPressed((KeyEvent) event);
                  }
                  if ((event.getID() == KeyEvent.KEY_TYPED))
                  {
                        myKeyListener.keyTyped((KeyEvent) event);
                  }
                  if ((event.getID() == KeyEvent.KEY_RELEASED))
                  {
                        myKeyListener.keyReleased((KeyEvent) event);
                  }
            }
            else if (event instanceof MouseEvent)
            {
                  // to cope with the distorting order of event castings (Jcomponent, GLCanvas) store the last state ..
                 isLastSourceAJComponent = isJComponent;
                  // now get the real source
                 isJComponent = (event.getSource() instanceof JComponent);
            }
            else
            {
         myMovementKeyboardEventListener.eventDispatched(event);
            }
      }
};

Furthermore
To make it all work finally just enable event notification (key & mouse):
1  
2  
Toolkit.getDefaultToolkit().addAWTEventListener(
                        myAWTEventListener, AWTEvent.KEY_EVENT_MASK|AWTEvent.MOUSE_EVENT_MASK);


As this is simply a quick hack without changing anything in Xith or Jogl code I do really hope that there is a better way do do it. Nevertheless if it suits your requirements and you can live with its limit feel free to use it.

On the other hand if anyone finds a better solution anybody wanting to use Xith and Swing together would be deeply grateful - me, too.  Wink
8  Java Game APIs & Engines / Xith3D Forums / Re: Prob with Xith, Swing, textfield + listeners on: 2004-03-20 06:08:52
For 1: try one of the following solutions (as listed in the examples above):
1  
2  
3  
4  
TextField yourTextField = ...;
yourTextFielf.getInputMap().put(KeyStroke.getKeyStroke('\n'), "action");
// or: yourTextField.getKeyMap().addActionForKeyStroke(yourKeystroke, yourAction);
yourTextField.getActionMap().put("action",  yourAction);

By defaukt swing has the enter key registered but that seems to be removed in here - do not know why.
yourActon is just an instantiation of the action that is to be performed. you can get all registered actions for your textfield by using
1  
 textField.getActions()



For 2: Still experimenting myself..
9  Java Game APIs & Engines / Xith3D Forums / Re: looks like we have some competition on: 2004-03-20 05:22:53
William, you summed it up perfectly!

Let me add one more combination: swt is for those needing a Gui and wanting to use JET for providing a JRE free installation. If using Swing and compiling with JET this one does not complain but it requires an installed JRE for runtime purposes also.
10  Java Game APIs & Engines / Xith3D Forums / Re: looks like we have some competition on: 2004-03-18 22:57:07
Please take WHoW into your concerns also
-What are your goals
-How do you want to reach them and
-Will it be easy to achieve

Speaking for myself only any engineer/programmer/Developer should ask him/herself these questions and decide what to use afterwards.

Not the pure amount of features counts, not even the number of developers of the core product nor the bloomy promises given by anyone. I really dislike these me-too effects to implement any feature here and any feature there - a behavior we can see in so many fields.

You may ask why? Let me answer with another question: Anyone using MS Word? Ever wondered why they could not  stop implementing new goodies (being required by nearly nobody) but not fixings annoying bugs for versions? And Sun in some cases is doing the same - I always wonder if a bug I reported in JDK 1.1.8 will ever disappear ...

Doing a good job is essential in todays times to shorten development cycles and getting USEFUL code. Therefore evaluation of any third party lib should take its time. Weight the pro and cons!

Oops - forgot something: I have not said anything that is related to Xith vs J3D in special.

Okay, you got me Wink

Let's start back some years. Around 1992 I was using an Amiga (no flames please) and got a 3D construction kit - anyone remembering that one? It was nice for the first steps but somewhat limited in speed and complexity. So I never got far with it. Some years later I got the A4 engine (this time on the pc) from a small but committed german company. Solid power for cheap. And it had its own scripting language making it easier to adopt further complexity. Then Java 3D was around and I had already switched from C++ to Java. So I gave it a try. It ran - no crashes but in my eyes it was too slow for my purposes. And I missed some tools and tutorials for easy understanding. Good tools are essantial for any product - nobody wants to place all objects in code but have the possibility to separate virtual worlds from the coding part (programmers and world designers often can produce astonishing effects in their special fields).
What I have been looking for is not a simple  click'n'point tool for creating virtual worlds - that is easy for the first steps but IMHO limits you afterwards. I do need the full control in coding anything that is missing and like to add features I do need - even for the costs of additional hacking.

When I found a pacman game in 3D running upon J3D I decided to test Java's capabilites again. To make it short it was awesome in a way that it worked - but at what costs. Running at 2 Ghz on a Gforce 3 I saw a performance that was less than desired for the worlds I wanted to create.

What to do? Giving up? Nope. Searching the internet I found some other approaches using native libs beneath. There I noticed a significant speedup (based upon Jogl, Lwjgl etc.) And around last christmas I tried Xith3D. Though it lacks some additional tutorials, source code documentation and even books dealing with it - btw. a Xith cookbook would be fine - I admire its solid base and commited coders. The forum contains several invaluable advices, hints and examples that helped me to cope with the problems I stumbled in.

As a result I do not see why to leave Xith at this very moment as it features speed and produces this one-more-step-effect that lets you push the limits even further.

PS: Did I say I really like the overlays?  Cheesy
11  Java Game APIs & Engines / Xith3D Forums / Re: Xith crashes if only 1 Shape3D added on: 2004-03-18 19:55:33
You may try the brand new drivers from Nvidia:
http://www.nvidia.com/object/winxp_2k_56.64

For me this fixed a somewhat related problem that resulted in crashing my xith based demo on a GF3.

As a second benefit you will get OpenGL® 1.5 support.
12  Java Game APIs & Engines / Xith3D Forums / Re: Jogl crashes Xith again - even after Yuris fix on: 2004-03-18 19:42:17
Seems that I am talking to myself in this thread here. Anyone out there Huh

The good news are that NVIDIA helped me with my graphics problem. Well, I do not know if they addressed this issue for me but in fact the brand new drivers (56.64) do the trick Roll Eyes

Hurrah!!!

http://www.nvidia.com/object/winxp_2k_56.64

Here is a list of major changes:

   * Adds support for GeForce 5700 and GeForce 5700 Ultra
   * Microsoft® DirectX® 9 and OpenGL® 1.5 support
   * Supports application profiles for custom image quality and performance modes for all of your applications and games.
   * NVIDIA nView 3.5 Multi-display technology
   * Advanced Microsoft® Internet Explorer® popup blocker
   * Industries only Display Gridlines technology
   * Improved HDTV Y Pr Pb component out support for 480i, 480p, 720p, and 1080i formats**
   * For a complete list of compatibility fixes please consult the v56.64 Release Notes below
   * Updated March 16: English WHQL driver now posted

You may guess which feature I like the most Wink
13  Java Game APIs & Engines / Xith3D Forums / Re: Jogl crashes Xith again - even after Yuris fix on: 2004-03-18 18:40:04
Testet it with

1  
<property name="XITH3D_USE_VERTEX_BUFFER_CACHING" value="false" />


Result: What do you guess this time?

Aaaaaaaaaaaaaaaaaaaaaaaaarggggggghhhhhh!

Now it runs for some seconds but UiWindow does not update - simply black in black and
- that prg crashes again ...

And GF3 is the minimum requirement for todays games ...
Would be nice to get to know all cards where this one is running on - without GF FX Emulation. Using that one the demo runs fine but at 0.2 frames per sec. Wooha!
14  Java Game APIs & Engines / Xith3D Forums / Re: Jogl crashes Xith again - even after Yuris fix on: 2004-03-18 18:24:55
Due to the provider problems I temporarely got another Webspace:

http://team.micram.de/dingfelder/projects/xith3d/jnlp/levelbox/LevelBox.jnlp

@ William: Your .htaccess solution would be fine for me!
15  Java Game APIs & Engines / Xith3D Forums / Re: Jogl crashes Xith again - even after Yuris fix on: 2004-03-18 18:20:13
What a world of graphics cards. Demo runs fine on good old Nvidia Tnt2 - even that M64 version does allow suitable frame rates. Gforce2 MX is fine also but not my GF3 ... Argh!
16  Java Game APIs & Engines / Xith3D Forums / Re: Jogl crashes Xith again - even after Yuris fix on: 2004-03-18 06:16:18
Hi William, an example for .htaccess would be fine. My provider allows uploads via ftp only therefore I will have to tryy if that works here also.

OS: Windows 2000, Nvidia drivers 53.03, Jdk 1.4.2_04

I now figured out some more information:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x815695A
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
     at net.java.games.jogl.impl.windows.WindowsGLImpl.glDrawArrays(Native Method)
     at com.xith3d.render.jogl.ShapeAtomPeer.drawGeometry(ShapeAtomPeer.java:524)
     at com.xith3d.render.jogl.ShapeAtomPeer.renderAtom(ShapeAtomPeer.java:705)
     at com.xith3d.render.CanvasPeerBase.render(CanvasPeerBase.java:102)
     at com.xith3d.render.jogl.CanvasPeerImpl.drawBin(CanvasPeerImpl.java:741)
     at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:982)
     at net.java.games.jogl.impl.GLDrawableHelper.display(GLDrawableHelper.java:74)
     at net.java.games.jogl.GLCanvas$DisplayAction.run(GLCanvas.java:194)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:235)
     - locked <0x10dbd158> (a net.java.games.jogl.impl.windows.WindowsOnscreenGLContext)
     at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
     at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
     at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1083)
     at com.xith3d.scenegraph.View.renderOnce(View.java:732)
     - locked <0x10665640> (a com.xith3d.scenegraph.View)
     at com.xith3d.scenegraph.View.renderOnce(View.java:665)
     - locked <0x10665640> (a com.xith3d.scenegraph.View)
     at de.game.pac3d.xith3d.Xith3DFrame.run(Xith3DFrame.java:328 )
     at java.lang.Thread.run(Unknown Source)

Heap at VM Abort:
Heap
def new generation   total 1536K, used 979K [0x10010000, 0x101b0000, 0x104f0000)
 eden space 1408K,  67% used [0x10010000, 0x100feea0, 0x10170000)
 from space 128K,  18% used [0x10190000, 0x10195eb8, 0x101b0000)
 to   space 128K,   0% used [0x10170000, 0x10170000, 0x10190000)
tenured generation   total 19128K, used 13995K [0x104f0000, 0x1179e000, 0x14010000)
  the space 19128K,  73% used [0x104f0000, 0x1129aeb0, 0x1129b000, 0x1179e000)
compacting perm gen  total 9984K, used 9946K [0x14010000, 0x149d0000, 0x18010000)
  the space 9984K,  99% used [0x14010000, 0x149c6b98, 0x149c6c00, 0x149d0000)

Elapsed Time = 29
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05 mixed mode)
#
17  Java Game APIs & Engines / Xith3D Forums / Jogl crashes Xith again - even after Yuris fix on: 2004-03-17 23:59:44
Just finished a Xith-Demo using Webstart. On Ati Radeon 9xxx it runs fine but on my GForce3 it is crashing as JCDs water demo did before Yuris nice fix. So the behaviour is the same (first rendering is ok but crashes shortly after that without any output) making me believing in  another reason for this one ...

Please have a look at
http://www.m42.de/projects/xith3d/jnlp/levelbox/LevelBox.jnlp
Sadly my provider does not support jnlp nor php Cry
Therefore running this project will only work by entering the address in Java-WebStart directly.

The only special thing in this demo is that I do use a swing  panel for some nice fadings (also adding/removing components to that panel quite often)...

Any ideas?

By the way: Many thanks to Jcd and David for supplying their great examples  
18  Java Game APIs & Engines / Xith3D Forums / Re: Prob with Xith, Swing, textfield + listeners on: 2004-03-12 22:21:49
And the third answer after rereading your second post: Wink

If you do want to have some overlay (graphics and so on) above your 3d world you may use
1  
jcomponent.setOpaque(false)

which will disable background (i.e. you can see through it).

or use alpha colors for its background
1  
jcomponent.setBackground(new Color(red,green,blue,alpha));


Do not forget to enable alpha blending for your UIWindow Cool
19  Java Game APIs & Engines / Xith3D Forums / Re: Prob with Xith, Swing, textfield + listeners on: 2004-03-12 22:15:25
Forgot one alternative: If you just do need to disable all events - then add some code to your UIEventHandler to filter all unwanted input.
20  Java Game APIs & Engines / Xith3D Forums / Re: Prob with Xith, Swing, textfield + listeners on: 2004-03-12 22:12:18
Regarding the enter event the standard code would be quite similar to your solution by using
1  
speedTxt.getKeyMap().addActionForKeyStroke(yourKeystroke, yourAction);


Adding a glasspane is a thing that is not supported as I do think by default. But if you can make use of JInternalFrame (it is a JComponent!) you could add a glasspane there. Sadly a JInternalFrame will not get focus - therefore you never could edit a textfield there because that one will not get focus either...

If you do not need textfields and so on but are only displaying labels and other components that do not contain interaction you also could use OverlayLayout. Sadly a textfield on a lower component would be drawn on top also - miracles of swing I believe.

Last chance to achieve something similar to glasspane is to render your normal panel with all your fields as a buffered image and replace the interactive panel by that image.
21  Java Game APIs & Engines / Xith3D Forums / Prob with Xith, Swing, textfield + listeners on: 2004-03-11 19:12:03
Recently I played around with Xith and its Swing integration via UIWindow. As far as it concerns displaying everything is fine. But being a Swing user from version 0.5 back in 1998 I also wanted to add special keylisteners, focuslisteners and some other magic also.

It works - well kind of - but not as wanted.

Focus handling seems to be messed up Sad My textfield never gets focus - even if the keylistener is called it says : NO FOCUS! instead the GLCanvas always optains the focus ... Mysteriously I can input data to the textfield and do see the blinking caret ...
The only info I could track is "setting component to focus gained" which is printed to stdout and cannot be found in the xith sources. Where could this come from? JOGL maybe?

Keylisteners are also to be handled carefully. That's the second prob. adding a keylistener to the GLCanvas (i.e. canvas.get3DPerr().getComponent() (and of course making use of that UIEventAdapter again) works fine for my own navigation in the scenery. But if you enter text to a textfield you would not await that when entering "Hello world" your avator would go forward when pressing the ''w" key that is - as you may guess by now - also being used for moving forwards.
Is there a special filter I can use? In Swing a listener added to a textfield would consume the event if not wanted for the outer plane but for GLCanvas it is different (even call event.consume() to stop any further event-handling for this special one). Sadly it cannot be workarounded by adding the UIEventAdapter for the textfields first and consuming the event ...

Let me try to sum up the 3D event handling as far as I do understand it in the current context:

I can only add KeyListeners/MouseListeners to the GLCanvas. To make a Swing listener work I have to use UIEventAdapter that will transport this info to my textfield and also to any other UIEventAdapter that has been registered. There is no chance to consume that event if I am entering text into a textfield and do not want any other listener to be informed. Textfields will never gain a real focus though being editable - especially focus gained/lost events will never occur. Correct? Or am I missing something here?

Any info would be appreciated gracefully.
22  Java Game APIs & Engines / Xith3D Forums / Re: Best way to do a "overlay" (scores, on: 2004-03-10 19:49:22
Using 1.4.2_03-b02 here - currently 1.4.2_04 is out. Your version is a bit dusty I believe. Though it is not that old installing a newer JDK may be a quick solution as I found some problems in Sun's bugparade that do not exactly match your problem but are somewhat related to it known for at least 1.4.x: 4866495 (Fonts of some Components look worse in 1.4.2 vs 1.4.1),  4840307, (TextField characters unreadable),
4924220 ( Microsoft Sans Serif (True Type) font is not rendered properly). I neither can guarantee that I found your bug nor that the latest version will help but I would give it a try also ...
23  Java Game APIs & Engines / Xith3D Forums / Re: Best way to do a "overlay" (scores, on: 2004-03-10 17:31:40
@SpuTTer: That is quite strange. I experienced such behaviour in Swing with outdated Java-versions only ... For me it does not depend upon width even with the string you are using... Which OS, Java version and font are you using? My configuration is Windows 2000, Java 1.4.2_03 and default font.
Did you tested  this with a simple Java-Swing-App without using xith also? Are you usiong absolute positioning or a LayoutManager?

@William Denniss:
Regarding the input field (and thinking of additions to Jens' tutorial) we also do need some text regarding editable textfields! This is because a key listener added to the canvas (used for navigation as e.g. in JCD's demos) will be influenced by key input for  the textfield also - just because of the UIEventAdapter. Same goes for mouse listeners.

Otherwise we would edit text and move around - btw. nice effect Wink





24  Java Game APIs & Engines / Xith3D Forums / Re: Creating a Grid based System on: 2004-03-09 22:03:54
Hi mmontalvo,

I currently did a simple 2d->3d mapping for myself. Sadly it is not ready for release yet but in the meantime you may have a look at some documentation I found on the web. If you do not need more than one level of height at one time that will be a point to start at:
http://fivedots.coe.psu.ac.th/~ad/jg

See chapter 16. It is written for Java3D but should be easily adopted to Xith.

And for that sword animation. Either go for JDC's md3 animation or look at a project that is not made for xith but shows some sword animation (javaisdoomed at sourceforge.net http://prdownloads.sourceforge.net/javaisdoomed/setup.exe?download)

Hope that helps.

Fivedots is currently down. Sorry. I do hope it will be online again
25  Java Game APIs & Engines / Xith3D Forums / Re: Best way to do a "overlay" (scores, on: 2004-03-09 21:10:18
Yep. Go for UIWindow. I was inspired by this thread and added Swing to my simple 3d world. I love it! Especially the part that you can set your Swing components to be translucent and see the 3d-World behind it Wink

Take the example Jens created before and modify it a bit.

Disable the panel's opaqueness
1  
panel.setOpaque(false);


Set the textfield's background to white but use alpha settings (50% here):
1  
textfield.setBackground(new Color(1f,1f,1f,.5f);


And to make it work without showing that nasty window's background around your textfield do not forget to enable alphablending for your TestWindow:
1  
super(width, height, false, true)


Just one last note: add some 3D scenery - that will do it  Roll Eyes
26  Java Game APIs & Engines / Xith3D Forums / Re: The JWS thread *Xith3D demos only* on: 2004-03-07 07:24:33
Addition to Pixel&Vertex shaders and GF3 for anyone who is using an old GF3 like me. By default it is not capable of performing GeforceFX related instructions but with the 53.03 drivers and a small Tool named aTuner it is possible to emulate the newer chip!

Of course CubeMap Reflection (Fragment/Vertex shaders accelerated) runs at 2 fps but I can watch its beauty by now (no more black holes)!

http://www.3dcenter.org/atuner/

Start it, click on OpenGl Extra, enable EmulateGeforceFx - that's it Wink
27  Java Game APIs & Engines / Xith3D Forums / Re: The JWS thread *Xith3D demos only* on: 2004-03-04 06:20:45
Cubic Water Reflection and Water demo are runnig fine now on GF3. Great Job!
Cheesy Smiley Cheesy
28  Java Game APIs & Engines / Xith3D Forums / Re: The JWS thread *Xith3D demos only* on: 2004-03-03 21:06:31
Thanks a lot, Yuri!
29  Java Game APIs & Engines / Xith3D Forums / Re: The JWS thread *Xith3D demos only* on: 2004-03-02 21:35:46
Sorry but it definitly does NOT run with Nvidia's 53.03 and a GFORCE 3.

It starts, shows up the first rendered picture and vanishes  ...

I suspect it is again due to a problem with JOGL...

Log only says:
Quote

Java Web Start 1.4.2_03 Konsole, gestartet Tue Mar 02 22:56:11 CET 2004
Java 2 Runtime Environment: Version 1.4.2_03 von Sun Microsystems Inc.

Init GL is net.java.games.jogl.impl.windows.WindowsGLImpl
OpenGL Renderer = GeForce3/AGP/SSE/3DNOW!
OpenGL Version = 1.4.1
OpenGL Vendor = NVIDIA Corporation
OpenGL Extensions = GL_ARB_depth_texture GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_window_pos GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_packed_pixels GL_EXT_paletted_texture GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_shared_texture_palette GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_object GL_EXT_vertex_array GL_HP_occlusion_test GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_fog_distance GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NVX_ycrcb GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control
No Fragment Program support, skipping

30  Java Game APIs & Engines / Xith3D Forums / Re: The JWS thread *Xith3D demos only* on: 2004-03-02 20:01:53
By the way: Runs fine on a Radeon 9000 and again GF3 has a problem when trying to run it ...
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (11 views)
2014-04-15 03:46:01

UprightPath (24 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (108 views)
2014-04-08 23:06:04

tom_mai78101 (208 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!