Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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 / Tools Discussion / Webstart: avoid showing accept certificates warning on: 2011-01-08 01:40:44
I am running a webstart app in computer lab and the certificate used to sign jars gets regenerated with each build.  Is there a way (e.g a command line argument) to avoid showing the accept certificates dialogue.
2  Game Development / Newbie & Debugging Questions / Re: Can a Swing GUI be used in a direct-rendering game? on: 2006-04-13 17:40:26
I think the problem is that the AWT event thread is accessing your swing components at the same time that you are drawing them from another thread.  I have had the same problem and the following solution worked for me.

Add the following class..
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  
import java.awt.AWTEvent;
import java.awt.EventQueue;
import java.awt.Toolkit;

//import jfreerails.controller.ReportBugTextGenerator;


/**
 * This event queue is synchronized on the MUTEX. This lets one control when
 * events can be dispatched.
 *
 * Note, changed to be a singleton to get it working on pre 1.4.2 VMs.
 *
 * @author Luke
 *
 */

final public class SynchronizedEventQueue extends EventQueue {
   public static final Object MUTEX = new Object();

   private static final SynchronizedEventQueue instance = new SynchronizedEventQueue();

   private static boolean alreadyInUse = false;

   /** Enforce singleton property. */
   private SynchronizedEventQueue() {
   }

   public static synchronized void use() {
      if (!alreadyInUse) {
         /* set up the synchronized event queue */
         EventQueue eventQueue = Toolkit.getDefaultToolkit()
               .getSystemEventQueue();
         eventQueue.push(instance);
         alreadyInUse = true;
      }
   }

   protected void dispatchEvent(AWTEvent aEvent) {
      synchronized (MUTEX) {
         try {
            super.dispatchEvent(aEvent);
         } catch (Exception e) {
            /*
             * If something goes wrong, lets kill the game straight away to
             * avoid hard-to-track-down bugs.
             */

            //ReportBugTextGenerator.unexpectedException(e);
        }
      }
   }
}


then change your game loop to...

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
public static void main(String[] arrghImAPirate) {
      SwingDirectRendering frame = new SwingDirectRendering();
      SynchronizedEventQueue.use();
      while (true) {
         synchronized (SynchronizedEventQueue.MUTEX) {

            Graphics g = frame.getBufferStrategy().getDrawGraphics();

            //Graphics g = frame.content.getGraphics()
           // to show that its not a BufferStrategy
           // problem you can uncomment the above and leave
           // out the BufferStrategy code

            frame.content.paintComponents(g);
            frame.getBufferStrategy().show();
         }
      }
   }


On my machine it seems to solve the deadlock problem.

Hope it helps

Luke
3  Game Development / Shared Code / Re: Automatically locate all classes; filter by regexp on: 2005-07-02 22:29:43
This sounds like exactly what I have been looking for.  Any chance of posting the code here or sending me a copy?

Luke
4  Game Development / Performance Tuning / Re: Packing bytes on: 2005-04-27 19:59:17
You could try
http://javolution.org/api/javolution/io/Struct.html
5  Game Development / Newbie & Debugging Questions / Re: Create a Valid Url Object on: 2005-04-10 18:44:50
The directory is relative to the classpath.
6  Game Development / Newbie & Debugging Questions / Re: Create a Valid Url Object on: 2005-04-10 15:33:02
I use the following...

URL url = ThisClassName.class.getResource(                  "/directory/filename");

which seems to work, including over webstart.
7  Java Game APIs & Engines / Java 2D / Re: Drawing Large Image: Out of Memory on: 2005-02-06 21:29:36
I think it might have been JComponent not JPanel I extended.  It was in a scrollpane.
8  Java Game APIs & Engines / Java 2D / Re: Drawing Large Image: Out of Memory on: 2005-02-06 20:24:17
I've used large JPanels without problems, so I expect the problem is the size of the image.

If it was me, wouldn't use an image for the background.  Instead I would override JPanel.paintComponent(Graphics g).  You can call Graphics.getClipBounds()  to see what needs painting.

9  Games Center / Archived Projects / Re: freerails on: 2005-01-20 15:57:27
Last night I released Jfreerails 0.2.6.



Webstart:
http://freerails.sourceforge.net/jfreerails.jnlp
Website:
http://sourceforge.net/projects/freerails/

Over 50 bugs have been fixed.  The user interface for laying, upgrading
and removing track has been significantly improved.  Also, new, more realistic
graphics for the track have been added.

Please give it a try.  Any bug reports or suggestions appreciated.

Luke
10  Discussions / General Discussions / Re: JGF v3 - status on: 2004-10-12 18:29:17
Coming back to the discussion of ratings above..  IMHO the system on amazon works well and looks relatively easy to implement although they may well do clever things to prevent abuse.

Luke
11  Games Center / Archived Projects / Re: freerails on: 2004-10-12 16:34:30
I've made the suggested change.  The nice thing about swing is that it only took 3 lines of code.  The change is in the sourceforge CVS; I haven't updated the webstart jar.
12  Games Center / Archived Projects / Re: freerails on: 2004-10-12 15:44:01
That sounds a good idea.  Would the best way be to make it behave in the same way as Excel does when you select cells by dragging - i.e.  it keeps scrolling until the mouse is released or dragged back inside the view port?
13  Games Center / Archived Projects / Re: freerails on: 2004-10-12 12:23:36
I have updated the game I am working on, freerails.  There have been many changes since I last posted a link here.  The one I am most pleased with is the new track build system that uses A* pathfinding.  

Webstart, ~1MB
http://freerails.sourceforge.net/jfreerails.jnlp

Website
http://freerails.sourceforge.net/

Hope you guys like it.  Any comments greatly appreciated.

Luke
14  Java Game APIs & Engines / JOGL Development / Mixing Swing/java2D and OpenGL on: 2004-07-29 19:44:15
I have been thinking about porting my game,  http://freerails.sourceforge.net/, to OpenGL directly rather than use Swing, since people keep saying its too slow:(  However, this seems like a lot of work and there are lots of things that Swing makes easy that would take a long time to get right if I were doing it myself.  So I have been looking at ways to mix Swing and OpenGL.

So far I have had a quick look at JOGL, but the most promising approach would seem to be using agile2D.  

What I have done so far is as follows:

I have added a method:


1  
GLFunc getGL(){

to the class
1  
 agile2d.opengl


This lets me mix java2D and direct use of OpenGL in JComponents.  For example
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  
import gl4java.GLEnum;
import gl4java.GLFunc;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

import agile2d.opengl.AGLGraphics2D;

public class TestJPanel extends JPanel implements GLEnum {
     
      protected void paintComponent(Graphics g) {

            super.paintComponent(g);
            g.setColor(Color.RED);
            g.drawString("This text was drawn by calling g.drawString(.) before the GL triangle.", 20, 20);

            GLFunc gl = ((AGLGraphics2D) g).getGL();

            gl.glBegin(GL_TRIANGLES);
            gl.glColor3f(0.0f, 0.0f, 1.0f); //blue
           gl.glVertex3i(20, 0, 0);
            gl.glVertex3i(0, 100, 0);      
            gl.glVertex3i(100, 100, 0);
            gl.glEnd();
           
            g.setColor(Color.WHITE);
            g.drawString("This text was drawn by calling g.drawString(.) after the GL triangle.", 20, 60);

      }
}


and

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  
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JLayeredPane;

import agile2d.AgileJFrame;


public class TestFrame {

      public static void main(String[] args) {
             JFrame frame = new AgileJFrame();
             frame.setSize(400, 400);
     
             frame.getContentPane().add(new TestJPanel());
                         
             //Add an JInternalFrame - shows light weight components can be drawn on top
            //components rendered using direct OpenGL.            
            JInternalFrame jInternalFrame = new JInternalFrame("JInternalFrame");
             jInternalFrame.setSize(200, 200);
             frame.getLayeredPane().add(jInternalFrame,
                  JLayeredPane.MODAL_LAYER);              
             jInternalFrame.setVisible(true);
                                     
             frame.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                System.exit(0);
            }
        });
                         
            frame.show();                                    
      }            
}


Which produces the following...




The advantages of this approach seem to be:
(1)   Java2d calls and direct openGL calls can be freely mixed.
(2)   I don't need to worry about light and heavyweight components.
(3)   rendering of the swing components is h/w accelerated.


My questions
(1)  Does this sound sensible?  Has anyone else tried it?
(2)  How does the performance of agile2D compare with the _current_ performance of standard java2D?
(3)  Is the any benefit in trying to port AGLGraphics2D and other relevant classes to use JOGL instead of gl4java?

Luke
15  Java Game APIs & Engines / Tools Discussion / Re: UML editors: 2004 roundup on: 2004-07-20 17:16:09
I think there is another aspect of UML that you might be overlooking.  UML is a language designed to help people communicate, its not just method of writing code faster.  E.g. if you look at the following page, the communication aspect seems to be one of the main selling points.

http://www-306.ibm.com/software/rational/uml/
16  Java Game APIs & Engines / Tools Discussion / Structural Analysis for Java on: 2004-07-18 18:48:53
Has anyone else here looked at IBMs Structural Analysis for Java?  Looks impressive but I'm not sure whether it is actually useful.  I guess there is a danger of trying to make code smell better rather than actually improving it: kind of like trying to solve a tramps problems by giving him a bath.


http://www.alphaworks.ibm.com/tech/sa4j
17  Java Game APIs & Engines / Java 2D / Re: custom Scrollable Component? on: 2004-06-23 19:35:13
One way to do it:
(1) extend JComponent
(2) override paintComponent(Graphics g) and in this method call g.getClipBounds() to see what needs painting, then paint this region.
(3) set the size of the component to 100 pixels by 60,000 or whatever and put the component in a scroll pane.
18  Java Game APIs & Engines / Java 2D / Re: JDK 1.5.0-beta2 is now available on: 2004-05-28 14:34:58
What version of opengl does the opengl pipeline require?

I'm getting
"Could not enable OpenGL pipeline for default config on screen 0 "

I believe my graphics drivers support 1.3 but not 1.4.
19  Games Center / Archived Projects / Re: Squareheads on: 2004-05-15 17:24:38
Just to say the problems I reported all appear to be fixed in the latest version. Smiley
20  Game Development / Game Play & Game Design / Re: I need some help with the controls :( on: 2004-05-03 23:30:59
Have you thought about Llamatron style - rotate in the direction you move the mouse when the mouse button is up and lock the direction when it is down (and fire all the time)?
21  Games Center / Archived Projects / Re: Squareheads on: 2004-05-02 16:36:53
The previous version worked in windowed mode, but with the  latest version, I get:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
java.lang.NullPointerException
      at sh.SquareHeads.createWindow(SquareHeads.java:216)
      at sh.SquareHeads.initLwjgl(SquareHeads.java:174)
      at sh.SquareHeads.main(SquareHeads.java:1294)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
      at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
      at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)


I'm runnning 1.4.2_04 on XP
22  Games Center / Archived Projects / Re: Squareheads on: 2004-04-28 23:07:50
I just tried it.   I'm running 1.4.2_04 on XP.  Works great in windowed mode but I get the following when I try to go into fullscreen.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
java.lang.IllegalStateException: Mouse must be created before you can read events
      at org.lwjgl.input.Mouse.next(Unknown Source)
      at trb.gui.lwjgl.LWJGLScreen.handleMouse(LWJGLScreen.java:116)
      at trb.gui.lwjgl.LWJGLScreen.processInput(LWJGLScreen.java:70)
      at sh.Menu.runMenu(Menu.java:315)
      at sh.SquareHeads.runMenu(SquareHeads.java:293)
      at sh.SquareHeads.main(SquareHeads.java:1271)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
      at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
      at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
23  Game Development / Networking & Multiplayer / Testing network game - Any recommendatio on: 2004-04-14 21:20:43
I wanted to test how my game will perform over various networks, e.g. how it would be affected by limited bandwidth, latency etc.

I was wondering how other people have approached this problem, and whether there are any tools it is recommended I use or any articles I should read.

Any pointers appreciated.

Luke

24  Game Development / Performance Tuning / Re: Why 4x better FPS when NetBeans is Running? on: 2004-03-17 20:23:13
Quote
What is your video board? What DX, driver version?


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
------------------
System Information
------------------
Time of this report: 3/17/2004, 22:04:48
       Machine name: D1QDQL0J
   Operating System: Microsoft Windows XP Home Edition (5.1, Build 2600) Service Pack 1 (2600.xpsp2.030422-1633)
           Language: English (Regional Setting: English)
System Manufacturer: Dell Computer Corporation
       System Model: Dimension 2350
               BIOS: IntelR - 42302e31
          Processor: Intel(R) Pentium(R) 4 CPU 2.50GHz
             Memory: 254MB RAM
          Page File: 208MB used, 417MB available
Primary File System: n/a
    DirectX Version: DirectX 8.1 (4.08.01.0810)
DX Setup Parameters: Not found
     DxDiag Version: 5.01.2600.1106 32bit Unicode


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  
---------------
Display Devices
---------------
        Card name: Intel(R) 82845G/GL/GE/PE/GV Graphics Controller
     Manufacturer: Intel Corporation
        Chip type: Intel(R) 82845G Graphics Controller
         DAC type: Internal
        Device ID: Enum\PCI\VEN_8086&DEV_2562&SUBSYS_01471028&REV_03
   Display Memory: 64.0 MB
     Current Mode: 1024 x 768 (32 bit) (60Hz)
          Monitor: Dell E151FPp
  Monitor Max Res: 1024,768
      Driver Name: ialmrnt5.dll
   Driver Version: 6.14.10.3691 (English)
      DDI Version: 8 (or higher)
Driver Attributes: Final Retail
 Driver Date/Size: 10/8/2003 10:12:28, 36927 bytes
    Driver Signed: Yes
  WHQL Date Stamp: n/a
              VDD:
         Mini VDD: ialmnt5.sys
    Mini VDD Date: 10/8/2003 10:11:20, 93979 bytes
Device Identifier: {D7B78E66-6622-11CF-F37D-4D21A2C2CB35}
        Vendor ID: 0x8086
        Device ID: 0x2562
        SubSys ID: 0x01471028
      Revision ID: 0x0003
         Registry: OK
     DDraw Status: Enabled
       D3D Status: Enabled
       AGP Status: Enabled
DDraw Test Result: All tests were successful.
 D3D7 Test Result: All tests were successful.
 D3D8 Test Result: All tests were successful.


Quote
Does your app set sun.java2d.translaccel property?

No

Quote
Also, could you please run your app from the command line with -Dsun.java2d.trace=count, let it run for a while, then quit and post the output.

Then, start some other java app (netbeans or whatever), and run your app with the tracing enabled.


Trace from first instance started, ~28FPS
Quote

38921 calls to sun.awt.windows.Win32BlitLoops::Blit("Integer RGB DirectDraw", SrcNoEa, "Integer RGB DirectDraw")
20637 calls to D3DDrawLine
470 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntArgb)
48718 calls to sun.java2d.loops.DrawGlyphList::DrawGlyphList(OpaqueColor, SrcNoEa, AnyInt)
1 call to sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbBm)
1 call to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgb)
21935 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb)
1 call to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm)
1834 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
6 calls to GDIDrawRect
470 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(Any, SrcOverNoEa, IntArgb)
5 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, "Integer RGB DirectDraw")
9677 calls to D3DDrawRect
21930 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, "D3D texture destination")
1 call to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntArgbBm)
2 calls to sun.awt.windows.Win32GdiBlitLoops::Blit(IntRgb, SrcNoEa, "GDI")
118 calls to GDIFillRect
470 calls to sun.java2d.loops.OpaqueCopyAnyToArgb::Blit(Any, SrcNoEa, IntArgb)
151801 calls to DDFillRect
149 calls to GDIDrawLine
470 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(Any, SrcOverNoEa, IntArgb)
317617 total calls to 21 different primitives




And from the second instance, running while first instance is minimised ~95FPS
Quote

74420 calls to sun.awt.windows.Win32BlitLoops::Blit("Integer RGB DirectDraw", SrcNoEa, "Integer RGB DirectDraw")
470 calls to sun.java2d.loops.OpaqueCopyAnyToArgb::Blit(Any, SrcNoEa, IntArgb)
4 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, "Integer RGB DirectDraw")
43882 calls to D3DDrawLine
470 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntArgb)
115148 calls to sun.java2d.loops.DrawGlyphList::DrawGlyphList(OpaqueColor, SrcNoEa, AnyInt)
1 call to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgb)
4930 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
4 calls to GDIDrawRect
1 call to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm)
31603 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, SrcOver, IntRgb)
31599 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, "D3D texture destination")
19794 calls to D3DDrawRect
470 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(Any, SrcOverNoEa, IntArgb)
2 calls to sun.awt.windows.Win32GdiBlitLoops::Blit(IntRgb, SrcNoEa, "GDI")
99 calls to GDIFillRect
1 call to sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbBm)
470 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(Any, SrcOverNoEa, IntArgb)
193677 calls to DDFillRect
1 call to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgb, SrcOverNoEa, IntArgbBm)
105 calls to GDIDrawLine
517151 total calls to 21 different primitives

25  Game Development / Performance Tuning / Re: Why 4x better FPS when NetBeans is Running? on: 2004-03-16 09:09:22
With 1.5 beta1

~95FPS with d3d=false
~70FPS with noddraw=true
~30FPS with no flags set
26  Game Development / Performance Tuning / Re: Why 4x better FPS when NetBeans is Running? on: 2004-03-16 08:34:27
Quote
So, with the d3d=false it doesn't matter if you're running two applications or one, you always get 110 fps?



From the command line, d3d=false always seems to work regardless of what else is running and gives me ~110FPS.  Setting ddoffscreen=false or noddraw=true
also works, but this only gives me ~80FPS.  Not setting any flags gives me ~25FPS.  

From webstart, setting d3d=false seems to have no effect, i.e. I get ~25FPS unless another java app is running.  Setting noddraw=true, however, does work and gives ~80FPS.

This is with 1.4.2_04.  I haven't tried 1.5 beta1 yet.
27  Games Center / Archived Projects / Re: freerails on: 2004-03-15 22:09:20
Thanks for the suggestions.

I've posted and updated version.

The website is
http://sourceforge.net/projects/freerails/

and the webstart
http://freerails.sourceforge.net/jfreerails.jnlp


I've made a few small performance and game play changes.  Adding
<property name="sun.java2d.d3d" value="false"/>
to the webstart script made the biggest difference!

28  Game Development / Performance Tuning / Re: Why 4x better FPS when NetBeans is Running? on: 2004-03-15 19:16:03
Setting -Dsun.java2d.d3d=false made the problem go away and increased the frame rate to 110FPS.

29  Game Development / Performance Tuning / Re: Why 4x better FPS when NetBeans is Running? on: 2004-03-15 18:19:19
Profiling 1.4.2_01 while I wait for 1.4.2_04 to download...

The first instance started ~25FPS
1  
2  
3  
4  
Hotspots
35%      sun.java2d.pipe.SolidTextRenderer.drawGlyphList:38
33%      sun.awt.windows.Win32DDRenderer.clipAndDrawLine:76
6%      jfreerails.client.top.GameLoop.run:101


The second instance started while the first instance is running but minimised ~75FPS
1  
2  
3  
4  
5  
6  
Hotspots
17%      sun.java2d.pipe.SolidTextRenderer.drawGlyphList:38
15%      jfreerails.client.top.GameLoop.run:101
8%      sun.java2d.SunGraphics2D.clone:244
...
2%      sun.awt.windows.Win32DDRenderer.clipAndDrawLine:76


It is the same VM and executing the same line of code, so why is:

sun.java2d.pipe.SolidTextRenderer.drawGlyphList:38 7x faster

and

sun.awt.windows.Win32DDRenderer.clipAndDrawLine:76 48x faster?

Updated, the problem persists with 1.4.2_04.
30  Game Development / Performance Tuning / Why 4x better FPS when NetBeans is Running? on: 2004-03-15 00:27:54
I am running 1.4.2_01 on XP

When I start the game I am working on via webstart
http://freerails.sourceforge.net/jfreerails.jnlp
I get ~25FPS.

However, if I start NetBeans, then click on the webstart link I get ~100FPS.

If I then close NetBeans, and click on the webstart link, I get ~25FPS again.

Also, when I start two instances of the game, then minimize the one I started first, the second instance has ~100FPS while if I  minimize the second, the first instance still has ~25FPS.

Using 1.4.0_04 and 1.4.1_01 JREs, the problem does not occur, i.e. I always get ~100FPS

Any ideas?

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

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (20 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (57 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!