Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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: Java2d too slow for 2d games ? on: 2006-06-07 12:16:47
I experienced the exact same problem with the duration of the Thread.sleep(). I fixed it with some retroaction loop to get an average sleep time around what I need to have a stable frame rate around 40fps.
I am using the Direct3d pipelines because I have a ATI graphic card. The openGL pipeline is behaving weird on my config.
I find Java 2D very fast for my game: it is a full screen mode (1024x768) and I can achieve 60 fps without any problem. Just have to make sure we don't break the acceleration. From what I know, the rotation of an image breaks the acceleration so I don't use it. It is very important as well to use compatible images so that they can be accelerated.

2  Java Game APIs & Engines / Java 2D / Re: Draw semi-transparent Images on: 2006-03-07 12:46:27
But I am drawing only Images to the graphics which
maybe have a alpha value. I dont want to draw the whole graphics semi-transparent.

Hi LucaH,

if you the required alpha values are already in your image, then there shouldn't be anything else to do except calling the Graphics2D drawImage method. You just have to make sure the ColorModel of your image supports the transparency.

If you want to apply some additional transparency to your whole image, then you should probably use the AlphaComposite as Pepe mentioned.

To use the Graphics2D instead of the Graphics, just use a cast: g2d = (Graphics2D)g

Cheers.
3  Java Game APIs & Engines / Java 2D / Re: Advanced compositing rules with hardware acceleration on: 2006-03-06 13:00:10
Hi,

I havn"t checked my original post for some time and I see that things are getting exciting ! Good news !
I have some time-consuming projects going on right now, but as soon as I am done with it, I would be glad to help you in improving the blending modes !

Good luck and thanks for taking care of these so expected feature !

Regards.

Vince.
4  Java Game APIs & Engines / Java 2D / Re: Advanced compositing rules with hardware acceleration on: 2006-02-15 16:40:35
You should consider voting this RFE

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5094232

Cheers,

Mik

Yes this is exactly what I did. I vote for it and I am still hoping this enhancement request will be considered as a must have...

The java development team is really doing great and it is very exciting to see how fast java is evolving ! Hope these advanced blending mode will be part of it soon !

If you have any idea how I can do it  meanwhile without breaking the hardware optimization, that would be more than helpfull.

Vince.
5  Java Game APIs & Engines / Java 2D / Re: Advanced compositing rules with hardware acceleration on: 2006-02-15 16:10:11
I am currently using the Alpha composite with Mustang and it works definitely great.

My problem is that I am not able to have the lighting effects I want to have using only the alpha composite and the Porter/Duff rules.

The effect I am looking for is the overlay blending that you can find in Photoshop or Gimp. This allows to give some fancy lighting effects without making you image foggy as it is when you simply composite a bright image with alpha on top of the original image. The overlay blending allows to keep a good contrast by making the bright areas a bit brighter (and eventually colored ) while keeping the dark area almost untouched.

I have been try to develop a custom CompositeContext class and it gives me the results I want, but it is breaking the hardware optimization.

Ideally I would like to see new Composite in java2D API enabling advanced blending mode like multiply, divide, overlay, lighten, darken, etc... while keeping the hardware acceleration.

Vince.

6  Java Game APIs & Engines / Java 2D / Advanced compositing rules with hardware acceleration on: 2006-02-15 15:18:37
Hi,

I am developing a java2D based game. I am trying to find a way to keep the hardware acceraleration offered by OpenGL and/or DirectX pipelines and being able to use the multiply, divide or overlay compisting rules to generate some special lighting effects.

I could probably achieve it by using JOGL, but I like the beauty of using standard java2D calls and benefit from DirectX optilmization.

So, does anyone know a way of implementing the overlay compositing rule (like Photoshop or Gimp) without loosing the hardware optimization ?

Are there plans in Mustang or later java release to have access to htese compositing rules as we are using the AlphaComposite right now ?

Thanks.

Vince
7  Java Game APIs & Engines / Java 2D / Re: Unable to change display mode when using OpenGL based pipeline on: 2005-12-11 22:54:52
Hi,

I updated to Catalyst 5.12 (actually the equivalnt Omega drivers). The color problems is gone but a new one appeared: when I exit my game, leaving the exclusive full screen mode generates an exeption.... and I have to kill manually the game to come back to my desktop. The problem is then I cannot come back to my original screen resolution until I restart my PC...

Here is the stack dump:
Exception during disposal:
java.lang.reflect.InvocationTargetException
   at java.awt.EventQueue.invokeAndWait(Unknown Source)
   at java.awt.Window.doDispose(Unknown Source)
   at java.awt.Window.dispose(Unknown Source)
   at kernel.Game.restoreScreen(Game.java:560)
   at kernel.Game.finishOff(Game.java:539)
   at kernel.Game.run(Game.java:303)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InternalError: Could not set display mode
   at sun.awt.Win32GraphicsDevice.configDisplayMode(Native Method)
   at sun.awt.Win32GraphicsDevice.setDisplayMode(Unknown Source)
   at sun.awt.Win32GraphicsDevice.setFullScreenWindow(Unknown Source)
   at java.awt.Window$1DisposeAction.run(Unknown Source)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "Thread-2" java.lang.InternalError: Could not set display mode
   at sun.awt.Win32GraphicsDevice.configDisplayMode(Native Method)
   at sun.awt.Win32GraphicsDevice.setDisplayMode(Unknown Source)
   at sun.awt.Win32GraphicsDevice.setFullScreenWindow(Unknown Source)
   at kernel.Game.restoreScreen(Game.java:561)
   at kernel.Game.finishOff(Game.java:539)
   at kernel.Game.run(Game.java:303)
   at java.lang.Thread.run(Unknown Source)


I have been trying to install the real Catalyst to check if it was coming from Omega but Catalyst doesn't want to install. There is a pop-up telling me I should try to run th setup with standard VGA driver... I'll try this later...

If I don't open the OpenGL pipeline, everything goes right. The DirectX pipeline seems ok.

I am using the java 6.0 b63 nd my graphic card is an ATI Mobility Radeon 9700 series.
The grapical driver I am using is Omega 2.6.87 (equivalent to Catalyst 5.12) for Win XP.

There seems to be some bad interaction between the OpenGL pipeline and this new Omega driver...

Hope anyone of you has a solution... so I can finally use the OpenGL pipeline.
8  Java Game APIs & Engines / Java 2D / Re: Unable to change display mode when using OpenGL based pipeline on: 2005-12-11 14:39:53
Hi Chris,

I am using an ATI Mobility Radeon 9700 Series and my computer is a P4 HT 3.2GHz running Windows XP with 512 MB DDR.

I will try to update the catalyst driver. Hope this will solve this color issue. Thanks for the news!

Take care.

Vince.
9  Java Game APIs & Engines / Java 2D / Re: Unable to change display mode when using OpenGL based pipeline on: 2005-12-09 11:43:24
Java 6.0 is working great! I am now able to switch screen resolution when using OpenGL pipeline!
The only weird thing (which was already in java 5.0) is that the first time my images are displayed, the colors are displayed in gray... This turn back into the real color as soon as they are displayed the second time. Do you know if there is a way to have them displayed in the real color at the first time ?

In addition, using the sun.java2d.trace, I figured out the DirectX pipeline is used by default if I don't enable the OpenGL pipeline on XP. I don't have the color problems with the DirectX pipeline and performaces are similar so it is fine for me to use DirectX. My concern is this won't work if I try my game on Linux. However I have not tried yet. Maybe the color problem won't happend on Linux.

Anyway, you guys ar edoing a very nice job on Java! Please carry on! Java looks greater every day.

Regards.

Vincent.
10  Java Game APIs & Engines / Java 2D / Unable to change display mode when using OpenGL based pipeline on: 2005-11-23 16:54:49
Hi,

I am developing a 2D based game using java 2D. I use the exclusive full-screen mode. When turining on the OpenGL base pipeline, I cannot change the display mode anymore: I am limited to the current display mode. I am running my software on Windows XP with jre 1.5.0_05. The DirectX based pipeline is working great but I would like to check whether I could get more with the OpenGL based pipeline and eventually try my game on Linux systems.

I read java 6.0 includes improvement concerning the OpenGL pipeline. I will give it a try, but if you have any idea how I may solve my issue with the jre1.5.0, that would help me a lot.

Thanks.

Vince.
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.

Riven (3 views)
2014-07-23 21:07:15

Riven (5 views)
2014-07-23 20:56:16

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35
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

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24: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!