Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 11: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 09:45:56

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:
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 12:24:29
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-11 23: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 20: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 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 if it's obvious by the above storytelling ,tell me. If not, say which code segment i should post.

Thanks guys
Pages: [1]
EgonOlsen (74 views)
2018-06-10 19:43:48

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

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

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

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

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

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

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

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

Solater (172 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!