Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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 9885 times)
0 Members and 1 Guest are viewing this topic.
Offline zparticle

Senior Member




Thick As A Brick


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

Quote


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




Where's the Kaboom?


« Reply #61 - Posted 2004-02-13 14: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 Coder


Medals: 10


falling into the abyss of reality


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

Quote



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

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline campbell

Junior Member




Java games rock!


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

Quote


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 strategy.show()

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.

Thanks,
Chris
Pages: 1 2 [3]
  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.

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

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

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

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

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

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

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

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

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

CJLetsGame (210 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

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
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!