Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: 1 2 [3]
  ignore  |  Print  
  The Gloves Are Off  (Read 22028 times)
0 Members and 1 Guest are viewing this topic.
Offline zparticle

Senior Devvie

Thick As A Brick

« Reply #60 - Posted 2004-02-13 13:47:54 »


It's basecly the same method as used by nonnus29. The background tiles are VolatileImages. Each sprite are dirty rectangles that are rendered in software.

So basically mine is so much slower because I'm letting J2D do the blending and this is causing a lot of VRAM reads that you guys don't end up doing?

Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #61 - Posted 2004-02-13 13:58:30 »

After correcting the bug that positions the FPS indicator behid the window Title bar (at least on Mac) I see that Tom's example still only gets a max of 22 fps on OS X.  Sometimes it goes to 13 fps for a moment - but is usually around 20-22 fps.

Come on Apple engineers - you are caught up to Sun in terms of JRE release versions... now start optimizing!

As it stands for any action game you must use JOGL or LWJGL on the Mac, nothing else performs well enough.

Offline Abuse

JGO Ninja

Medals: 70

falling into the abyss of reality

« Reply #62 - Posted 2004-02-13 15:19:03 »


So basically mine is so much slower because I'm letting J2D do the blending and this is causing a lot of VRAM reads that you guys don't end up doing?

not exactly, Toms couldn't do what yours is doing.
It still forfills the contract set out by cas....
but from the perspective of a proper game, its useless Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline campbell

Junior Devvie

Java games rock!

« Reply #63 - Posted 2004-02-13 21:09:20 »


Note: in my code I use the BufferedImage....getData method to get an int[] for the backbuffer BufferedImage which I drawImage onto the BufferStrategy gc every loop, but I only get the int [] once at the beginning then keep modifying the array.  Just wanted to point that out from Abuse post.  Probably a unmanaged, nonvram image is  good in this case.

I've been trying these demos on various machines here at work (they're all good testcases for us, especially for the new OGL pipeline).  I'm finding that performance for nonnus29's testcase is relatively poor with OGL enabled, but I think that's because we're using OGL to copy a software (unaccelerated, non-managed) image to the backbuffer and flipping on every frame.

Just to back up what you and Abuse suspected, managed images will no longer be accelerated once you call getRaster() or a related method.  In this context, I don't see why you need to modify any image arrays directly.  It would be great if we could see your source code.  But from what I can tell, a more optimal approach would be something like:
 - load bigimage.gif
 - copy each tile from bigimage.gif into its own managed image (createCompatibleImage())
 - render each tile directly into the BufferStrategy backbuffer (no need for an
    intermediate BufferedImage)
 - call

If you follow this approach, everything should be accelerated, and with OGL enabled, every tile will be cached in a texture, and the snowflakes will be alpha blended to the backbuffer all at hardware speeds.  Let me know if this makes sense.  It would be great to see an updated testcase.

Pages: 1 2 [3]
  ignore  |  Print  

EgonOlsen (1250 views)
2018-06-10 19:43:48

EgonOlsen (1118 views)
2018-06-10 19:43:44

EgonOlsen (859 views)
2018-06-10 19:43:20

DesertCoockie (1268 views)
2018-05-13 18:23:11

nelsongames (1101 views)
2018-04-24 18:15:36

nelsongames (1330 views)
2018-04-24 18:14:32

ivj94 (2071 views)
2018-03-24 14:47:39

ivj94 (1224 views)
2018-03-24 14:46:31

ivj94 (2164 views)
2018-03-24 14:43:53

Solater (788 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!