Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (686)
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  Game Development / Performance Tuning / Re: Accelerating images through BufferStrategy on: 2012-01-10 01:31:24
Today I tried to change the options of virtual machine to force acceleration on graphics card. After a while that give me an answer - support for DirectX/OpenGL is default enabled. When I turned off Direct3D acceleration, render time gone higher, so that solves my case Smiley Java2d is trying to use platform depended acceleration and if that fail, there is switch to software rendering. That's it - clean and simple Smiley
2  Game Development / Performance Tuning / Re: Accelerating images through BufferStrategy on: 2012-01-09 00:18:44
Thanks a lot for your time and effort Smiley

For now rendering all 2D tile map in resolution 640x480 takes about 3 ms, so I think it's quite good result and maybe it's true that I seek for too much performance boost in places where it cannot be granted Tongue Cpu usage for entire game takes 5-10% with 30fps on c2d processor, so there is much more to improvement  Wink

For example "Killer Game Programming in Java" calls it Full-Screen Exclusive Mode (FSEM) and it's done by invoking setDisplayMode(), but for what i can see there is no performance boost between it and window mode what's really strange for me.
3  Game Development / Performance Tuning / Re: Accelerating images through BufferStrategy on: 2012-01-08 23:40:16
Key listener is added to JFrame because there were problems with focus on JPanel, but for now it doesn't matter.

Now I even removed BufferStrategy at all and nothing changed. I read somewhere that all Swing components are default double buffered so it makes sense. In fullscreen mode there is access to many exclusive graphics card functions, so I thought that something is going to help to render faster.
4  Game Development / Performance Tuning / Re: Accelerating images through BufferStrategy on: 2012-01-08 23:21:09
All keyboard event are binded to JFrame instance and all mouse event to JPanel.

It's seems really odd that there is no difference in drawing time between window mode and fullscreen mode at all.
5  Game Development / Performance Tuning / Re: Accelerating images through BufferStrategy on: 2012-01-08 23:04:58
Thanks for your quick reply.

I create a BufferStrategy from JFrame which object is my main window. Before that, I create JPanel where events and drawings are made and put it into frame. I tried to change JPanel into Canvas and create BufferStrategy from there, but drawing time didn't change and all events on JPanel stop working. I measure drawing time by using System.nanoTime() before and after main drawing function.
6  Game Development / Performance Tuning / Re: Accelerating images through BufferStrategy on: 2012-01-08 19:55:54
I also have a question about image acceleration and overall java2d performance.

I draw graphics by active rendering. It's nearly same everywhere - create JFrame with JPanel, set display mode, create buffer strategy and draw graphics. It's the way how the fullscreen application is made. When creating in window there is no need to change display mode and work with buffer strategy. When everything is done with screen display I normally create BufferedImages via GraphicsConfiguration.createCompatibleImage() to display.

Now is the thing that's really strange for me. I run application in window mode with frame rate counter. I do the same with fullscreen display mode and there is no change in frame rate. I always think that fullscreen mode has a really big advantage in processing images. I also add, that same thing is true for two other pc's around me. In each case frame rate still nearly the same.

So my question is, is it something wrong with code and me or is that the way that java handles graphics? If needed I can also paste some application's code with the way how the things are done. I highly appreciate any suggestions about this case.
Pages: [1]
Dwinin (61 views)
2015-11-07 13:29:08

Rems19 (73 views)
2015-10-31 01:36:56

Rems19 (66 views)
2015-10-31 01:32:37

williamwoles (103 views)
2015-10-23 10:42:59

williamwoles (89 views)
2015-10-23 10:42:45

Jervac_ (103 views)
2015-10-18 23:29:12

DarkCart (130 views)
2015-10-16 00:58:11

KaiHH (112 views)
2015-10-11 14:10:14

KaiHH (152 views)
2015-10-11 13:26:18

BurntPizza (165 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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‑
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!