Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
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]
  ignore  |  Print  
  Java Webstart and -Dsun.java2d vm args  (Read 1916 times)
0 Members and 1 Guest are viewing this topic.
Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Posted 2006-12-16 04:38:18 »

I've been trying to get my webstartable game to use -Dsun.java2d.translaccel=true or -Dsun.java2d.opengl=true all night.

Afters hours and hours of trying I've figured that this just isn't possible. Which is rather retarded since the jnlp syntax for java 1.5 clearly says that you can define or run the webstartable application with your own vm args. (given that you have signed your jar, which I did)

So, I've decided that Java Webstart is useless for Java2D games.  Roll Eyes

Unless, anyone know of any tricks to do to get this to work?

I got Java Version 1.5.0 (build 1.5.0_09-b03).


My jnlp file:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.5+" codebase="http://www.stratzone.net/4k" href="starship.jnlp">

  <information>
    <title>Starship Invaders</title>
    <vendor>Arni Arent (appel)</vendor>
    <description>Defend against a Romulan invasion</description>
    <description kind="short">Starship</description>
    <icon href="starship_icon.gif"/>
    <icon kind="splash" href="starship_splash.jpg"/>
  </information>

  <security>
        <all-permissions/>
  </security>

  <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+" java-vm-args="-Dsun.java2d.translaccel=true"/>
    <jar href="starship.jar"/>
    <property name="sun.java2d.translaccel" value="true"/>
  </resources>  

  <application-desc main-class="S"/>
</jnlp>


starship.jar is signed.


Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2006-12-16 06:50:30 »

Unfortunately it looks like passing the sun.java2d.translaccel property to the underlying JVM isn't currently supported in Java Web Start (we can fix this in an update release, and I'll raise the issue next week), but I can guarantee to you that the sun.java2d.opengl property is supported. The fully hardware-accelerated JRefract demo on the jogl-demos page uses it, for example, and I've just retested that demo and it works as expected.
Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Reply #2 - Posted 2006-12-16 07:57:31 »

but I can guarantee to you that the sun.java2d.opengl property is supported. The fully hardware-accelerated JRefract demo on the jogl-demos page uses it, for example, and I've just retested that demo and it works as expected.

Nope, not working for me. I get no errors. This game is running below 20fps on my pc, but when I start it from within eclipse it runs at 50fps (using translaccel=true I get 80fps).

http://www.stratzone.net/starship/starship.jnlp
http://www.stratzone.net/starship/starship.jar (signed jar)

I checked the jnlp file for the JRefract demo, and it's not using the sun.java2d.opengl=true parameter.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #3 - Posted 2006-12-16 13:10:27 »

I checked the jnlp file for the JRefract demo, and it's not using the sun.java2d.opengl=true parameter.

There are two JNLP files for that demo and this one does use the -Dsun.java2d.opengl=true property.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #4 - Posted 2006-12-16 13:16:09 »

Nope, not working for me. I get no errors. This game is running below 20fps on my pc, but when I start it from within eclipse it runs at 50fps (using translaccel=true I get 80fps).

http://www.stratzone.net/starship/starship.jnlp

Cute game. I get 63 FPS on my machine and dumping the system properties in the Java console shows that sun.java2d.opengl=true is being passed through. Actually I just realized the issue may be that you're running with a 5.0 version of Java -- have you tried with Java SE 6? There were substantial improvements to the Java 2D / OpenGL pipeline in the new release and I can believe that in 5.0 the sun.java2d.opengl system property might not have been supported in Java Web Start.
Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Reply #5 - Posted 2006-12-16 21:09:00 »

Cute game. I get 63 FPS on my machine and dumping the system properties in the Java console shows that sun.java2d.opengl=true is being passed through. Actually I just realized the issue may be that you're running with a 5.0 version of Java -- have you tried with Java SE 6? There were substantial improvements to the Java 2D / OpenGL pipeline in the new release and I can believe that in 5.0 the sun.java2d.opengl system property might not have been supported in Java Web Start.


63fps, that's good Smiley

Well, I'm trying to aim for Java 5.0, since that's the current version.

Maybe I'll wait until Java 6.0 becomes the current release, then I'll release the game Smiley


Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline endolf

JGO Knight


Medals: 7
Projects: 1


Current project release date: sometime in 3003


« Reply #6 - Posted 2006-12-17 10:50:38 »

Erm, Java 6 *is* the current release. Smiley

Endolf

Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Reply #7 - Posted 2006-12-17 11:01:33 »

Erm, Java 6 *is* the current release. Smiley

Endolf

In my Java Updates application (on my windows) I do "Check for updates", and it says that I already have it, version 1.5.etc..

If I were to release a application written for Java6, then only the most extreme developers would be able to run it. It's not mainstream yet...hell...Java 5 just got mainstream Smiley

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Pages: [1]
  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 (51 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (209 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!