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   
Pages: [1]
  ignore  |  Print  
  Java 2D performacje on fullscreen mode  (Read 4878 times)
0 Members and 1 Guest are viewing this topic.
Offline Cranegger

Senior Newbie





« Posted 2008-02-23 16:32:44 »

I wrote my own game engine based on Java 2D API. I run some demos on fullscreen mode on my 22" monitor but I'm not glad because of performance. Why is performance so low?
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 81
Projects: 15


★★★★★


« Reply #1 - Posted 2008-02-23 17:30:30 »

I would recommend you try a hardware acceleration binding like LWJGL or JOGL that allow you to use OpenGL/DirectX, this will give you much better performance and is a must for nice smooth games.

If you don't want to learn OpenGL, you could try port it over to the Slick Library, it has OpenGL hardware acceleration and a very similar api to Java2D, this should make it easy to port your engine over. http://slick.cokeandcode.com
Offline Cranegger

Senior Newbie





« Reply #2 - Posted 2008-02-23 18:10:01 »

So nobody uses Java 2D in fullscreen games?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #3 - Posted 2008-02-23 20:12:37 »

You'll need to be more specific. What jdk version, what OS, what video board.

What kind of stuff your application does?

Many use fullscreen mode for gaming and are happy with it.

Dmitri
Offline Cranegger

Senior Newbie





« Reply #4 - Posted 2008-02-23 20:47:22 »

Java 6 update 3
Windows XP SP2
resolution: 1680x1050 px

EDIT: and olny ~20 fps
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #5 - Posted 2008-02-23 20:56:17 »

What kind of operations do you do?

Images? If so, translucent, bitmask?
antialiased rendering? Shapes?

What do you use for double-buffering?
BufferStrategy or VolatileImage? (I suggest the former).

If you can distill your app to a simple test case, that'd be the best.

Java 6 has Direct3D pipeline enabled in full screen mode. Check that it's
working : set J2D_TRACE_LEVEL=4 env. variable before starting
 your application and post the output.

also, the upcoming 6u10 (jdk6.dev.java.net) will have a new DirectX 9 based
pipeline enabled by default in both windowed and full-screen mode. You
may want to try it out.

Thanks,
   Dmitri
Offline Cranegger

Senior Newbie





« Reply #6 - Posted 2008-02-23 21:05:05 »

It's everything what I draw:
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  
        g.clearRect(0, 0, size.width, size.height);
       
        // Tło
        int width = background.getWidth(null);
        int height = background.getHeight(null);
        int x = 0;
        int y = 0;
       
        int rowCount = TileSet.pixelsToTiles(size.height, bgSize.height) + 1;
        int columnCount = TileSet.pixelsToTiles(size.width, bgSize.width) + 1;
       
        for (int row = 0; row < rowCount; row++, y += height)
        {
            for (int column = 0; column < columnCount; column++, x += width)
                g.drawImage(background, x, y, null);
           
            x = 0;
        }
       
        // Kafelki
        tileSet.draw(g, size, point);
       
        // Duszki
        player.draw(g, point);
        monster.draw(g, point);
       
        // FPS
        g.drawString("FPS: " + getFPS(), 0, (int)g.getFont().getStringBounds("K", g.getFontRenderContext()).getHeight());


I don't use any antialiasing or something like that...
I use BufferStrategy.

Quote
ava 6 has Direct3D pipeline enabled in full screen mode. Check that it's
working : set J2D_TRACE_LEVEL=4 env. variable before starting
 your application and post the output.
How can I do this?
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #7 - Posted 2008-02-23 21:14:10 »

What kind are your images? BufferedImages? How do you load them?

> How can I do this?

Run cmd.exe, then:
#> cd <your app dir>
#> set J2D_TRACE_LEVEL=4
#> java -jar YourApp.jar

This will print out a bunch of debug information on the console.

Also, could you try this:
#> java -Dsun.java2d.trace=log -jar YourApp.jar > log 2>&1

Let it run for a few seconds, then quit the app.

This last command will trace the rendering primitives.
If you could post a representative piece out of that, it'd help
diagnosing the issue.

The code that you posted seem fine - it should work just fine.

Dmitri
Offline Cranegger

Senior Newbie





« Reply #8 - Posted 2008-02-23 21:25:22 »

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  
E:\Documents and Settings\Konrad\Moje dokumenty\Projekty\Dema\MyGameLibTest\dist
>java -jar MyGameLibTest.jar
[W] GetFlagValues: DDraw screen locking is disabled (W2K, XP+)
[I] InitDirectX
[V] CheckRegistry: Found Display Device 0: WinFast A340
[I] CreateDevice: lpGUID=0x0 hMon=0x0
[I] DDSetupDevice
[I] DDraw::CreateDDPrimarySurface: back-buffers=0
[V] DDSetupDevice: successfully created primary surface
[V] DDSetupDevice: successfully setup ddraw device
[I] DDSetupDevice
[I] DDraw::CreateDDPrimarySurface: back-buffers=0
[V] DDSetupDevice: successfully created primary surface
[V] DDSetupDevice: successfully setup ddraw device
[I] DDSetupDevice
[I] DDraw::CreateDDPrimarySurface: back-buffers=1
[V] DDSetupDevice: successfully created primary surface
[V] DDSetupDevice: successfully setup ddraw device
[I] D3DContext::D3DContext
[V] D3DUtils_SelectDeviceGUID: using TNL rasterizer
[I] D3DContext::CreateD3DDevice
[I] D3DContext::CreateAndTestD3DDevice
[I] D3DContext::InitD3DDevice: d3dDevice=Ox114340
[V] D3DContext::CreateAndTestD3DDevice: D3D device creation/initialization succe
ssful
[W] TestRenderingResults: Quality test failed due to value 0 at (40, 6)
[I] CreateD3DDevice: tests PASSED, d3d enabled (forced: no).


I load this by:
1  
2  
3  
4  
    public Image getImage(String fileName)
    {
        return new ImageIcon(fileName).getImage();
    }
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #9 - Posted 2008-02-23 23:51:50 »

>return new ImageIcon(fileName).getImage();

Yuck. Smiley

Try ImageIO.

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #10 - Posted 2008-02-24 02:38:06 »

> Try ImageIO.

In theory it shouldn't matter that much although it certainly is
wasteful (pulling swing just for loading images).

Are those images 1-bit transparent, translucent? Gifs, pngs, jpegs?
There used to be a bug where some kind of loaded images weren't
being accelerated.

Also, could you add the output with -Dsun.java2d.trace=log?

Thanks,
  Dmitri
Offline Cranegger

Senior Newbie





« Reply #11 - Posted 2008-02-24 08:54:44 »

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  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D
render target"
)
D3DDrawGlyphs


They're pngs. Some of them are transparent.
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #12 - Posted 2008-02-25 02:11:28 »

You seem to be getting full hw acceleration, I'm not sure why it
only gives you 20fps.

What video board do you have?

Also, could you please set this property: -Dsun.java2d.trace=count (note - count, not log)
let it run for 10-15 seconds and quit. It will print out the summary of
which primitives were used.


Thanks,
  Dmitri
Offline Cranegger

Senior Newbie





« Reply #13 - Posted 2008-02-25 15:20:13 »

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
279 calls to DXDrawLine
147375 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
85 calls to sun.java2d.windows.DDBlitLoops::Blit("Integer RGB DirectDraw", SrcNo
Ea, "Integer RGB DirectDraw")
7 calls to sun.java2d.d3d.DelegateSwToTextureLoop::Blit(Any, SrcNoEa, "Direct3D
Texture"
)
321 calls to D3DDrawGlyphs
7 calls to sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbPre)
7 calls to sun.java2d.loops.Blit::Blit(ByteIndexedBm, SrcOverNoEa, IntRgb)
350 calls to DXFillRect
27599 calls to sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture",
AnyAlpha, "D3D render target")
59 calls to DXDrawRect
323 calls to D3DFillRect
143 calls to sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa
, IntRgb)
1 call to GDICopyArea
176556 total calls to 13 different primitives


WinFast A340
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #14 - Posted 2008-02-25 15:50:28 »

Before anyone else googles around... with "WinFast A340" he means a GeForce FX 5200.

弾幕 ☆ @mahonnaiseblog
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #15 - Posted 2008-02-25 22:10:33 »

Yeah, I have one of those here. They aren't speed demons for sure.
But I would have expected to get something more decent out of it.

Have you tried changing the display mode to something like
1200x1024? Just to see what kind of improvement you'd get?

Dmitri
 
Offline Cranegger

Senior Newbie





« Reply #16 - Posted 2008-02-26 15:49:37 »

I can't set this resolution. But when I set it on 1024x768 I get 30 FPS.
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #17 - Posted 2008-02-26 18:58:59 »

Is your app available online? I could try on my 5200 and other boards..

Dmitri
Offline Cranegger

Senior Newbie





« Reply #18 - Posted 2008-02-26 21:06:22 »

http://rapidshare.com/files/95185917/LibTest.rar.html
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #19 - Posted 2008-02-27 16:56:50 »

I can't download it- it complains that the user limit is reached.

Dmitri
Offline Cranegger

Senior Newbie





« Reply #20 - Posted 2008-02-27 17:08:28 »

Try this: http://www.2shared.com/file/2906657/598d3d4e/MyGameLibTest.html
Offline trembovetski

Senior Devvie




If only I knew what I'm talking about!


« Reply #21 - Posted 2008-02-29 18:17:23 »

OK, I think I can reproduce the problem now.

On my Nvidia 7900 GS board (1600x1200x32) I get 20 fps on 1.6.0_04 -
with the hw acceleration enabled. I get 60 (!) fps with
the ddraw/d3d pipeline disabled!

On 1.6.0_10 I always get 60fps (is the app throttled? since it's
60fps with hw accel. disabled and enabled).

I ran the test with primitive count and noticed a tons
of unaccelerated copies.

I think one of the images you have for some reason could not
be accelerated. Either because of the bug in ImageIO (there
was a bug fixed in 6u10 and jdk7 which prevented some
images loaded with imageio from being accelerated), or
may be you did something else (like grabbed a data buffer or
a raster)?

I would suggest to comment out some of the drawImages
in your app to see which one is responsible.

From the tracing I see that this unaccelerated image or (images) is
copied right after a drawString and fillRect calls:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
// ok  this is accelerated
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D render target")
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D render target")
sun.java2d.d3d.DelegateSwToTextureLoop::Blit(Any, SrcNoEa, "Direct3D Texture")
sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbPre)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D render target")
sun.java2d.d3d.DelegateSwToTextureLoop::Blit(Any, SrcNoEa, "Direct3D Texture")
sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbPre)
sun.java2d.d3d.D3DTextureToSurfaceBlit::Blit("Direct3D Texture", AnyAlpha, "D3D render target")
D3DDrawGlyphs
D3DFillRect
// and this is not
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
.... // many more of these


Dmitri
Offline JAW

Senior Devvie


Medals: 2



« Reply #22 - Posted 2008-05-09 13:55:14 »

Its a stupid idea, but maybe getFPS is wrong Cheesy

Actually, drawing some images should defintely be faster.
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.

Mr.CodeIt (10 views)
2014-12-27 04:03:04

TheDudeFromCI (13 views)
2014-12-27 02:14:49

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

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

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

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

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

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

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

CopyableCougar4 (102 views)
2014-11-29 21:32:03
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!