Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (537)
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  Java Game APIs & Engines / Java 2D / Re: VolatileImage usage on: 2003-09-30 13:08:04
So you say there IS a problem...

I mean from my description i shouldn't
face a decreasing fps but an increasing one?
2  Java Game APIs & Engines / Java 2D / VolatileImage usage on: 2003-09-30 11:45:56
Fellas...

I've got a little video game and
i was facing some speed issues in high
resolutions so i thought: "why not?let's
find out what this volatileImage stuff is all about"

The situation is the following:
Container->Canvas
BufferedImages drawing in  
Buffer (BufferedImage) and then the buffer is being
drawn to the Graphics of the Canvas using
Graphics2D's drawImage.

I knew nothing about VolatileImage so i started changing
everything i saw from BufferedImage to VolatileImage using
routines for validate() cases and contentsLost() (std procedure...)
The Result? Disastrous...(fps down 3-4 frames)

OK i have understood the redundancy of using VolatileImages
for the initial images but what about the final Buffer?
I mean it's the image(array of bytes)that should stay in the VRAM...

So,I did it again with only the final buffer being Volatile
but the results were the same.

Tell me:
Do i have a really BIG misconseption about what a
VolatileImage is and how to use it?
Does the above structure has any potential of becoming
any faster without any big changes (e.g BufferStrategy)?

I don't want so much a solution to my problem
comparably to how badly i want to find out
if i got straight VolatileImage.
3  Java Game APIs & Engines / Java 2D / fade effect with images on: 2003-06-03 14:24:29
Guys,
I'm trying to create a fade effect:
An image is shown in a JPanel and i want
another image to gradually paint over it while
the (initial) image from behind is fading.

I tried to use AlphaComposite, it worked , but the
outcome was really slow.

Another aproach was to get the alpha values of the images
by using   .getAlphaRaster() of the
BufferedImage class and then setting each pixel of the above raster by using .setPixels().Unforunately
(as you might have already guessed) that was also too slow. The image's dimension's are: 415x600.

Thank you for your time....
4  Java Game APIs & Engines / Java 2D / Re: Yet Another Image Question... on: 2003-05-12 01:24:37
If i'm not mistaken (not a very possible scenario...)  Toolkit.getDefaultToolkit().getImage() starts loading
the image when you call graphics.drawImage(). So even if i draw it in a BufferedImage or a JComponent the procedure of loading is pretty much automated.

(love that wako guy... )
5  Java Game APIs & Engines / Java 2D / Yet Another Image Question... on: 2003-05-11 22:10:03
Yes... I'm one of many java newbies who just can't seem to be able to load an image right.

So on to the Question:
I was using  Toolkit.getDefaultToolkit().getImage(...) to
load an image until one day i discovered it had asynchronous loading and so the drawing of a 1024x768 image wasn't exactly a great spectacle.

I tried to slip past this little glitch by drawing the acquired image to a BufferedImage and the on to the graphics object...
Darkness....The output was a (completely) black image.

But this could not daunt me (yet...). So i tried ImageIO.read(...). And yes ,the loading was synchronous.  But the image had transparent spots (.gif) which were black...(using the previous method no such problem occured) .

I know i'm doing something wrong in both of these methods...so if it's obvious by the above storytelling ,tell me. If not, say which code segment i should post.

Thanks guys
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (16 views)
2014-08-01 22:53:16

CogWheelz (15 views)
2014-08-01 22:51:43

CopyableCougar4 (18 views)
2014-08-01 19:37:19

CogWheelz (19 views)
2014-07-30 21:08:39

Riven (27 views)
2014-07-29 18:09:19

Riven (16 views)
2014-07-29 18:08:52

Dwinin (14 views)
2014-07-29 10:59:34

E.R. Fleming (42 views)
2014-07-29 03:07:13

E.R. Fleming (13 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36
Resources for WIP games
by CogWheelz
2014-08-01 18:20:17

Resources for WIP games
by CogWheelz
2014-08-01 18:19:50

List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

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