Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (769)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
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  
  Swing extremely slow on Macintosh???  (Read 6051 times)
0 Members and 1 Guest are viewing this topic.
Offline noblemaster

« JGO Spiffy Duke »


Medals: 35
Projects: 11


Age of Conquest makes your day!


« Posted 2006-11-14 07:13:55 »

It seems my game is running extremely slow on Macintosh! It's Swing based, so I guess I am in trouble. Also, the game runs through webstart. Is there a way to increase Swing performance on Macintosh? Needs Mac OS with Java 1.5.

As far as I know, sun.java2d.noddraw only works on Windows?

That's the game:
http://www.aevumobscurum.com/original/webstart/AevumObscurum.jnlp

If you play the demo, appearantly, the scroll speed etc is EXTREMELY slow. It works fine on my 3 years old Windows machine. Any ideas?

Offline CommanderKeith
« Reply #1 - Posted 2006-11-14 13:05:39 »

You can still use the ogl pipeline. VM option:

-Dsun.java2d.opengl=True

I haven't got a Mac to test your game on sorry.  The screen shots look tops!

Offline noblemaster

« JGO Spiffy Duke »


Medals: 35
Projects: 11


Age of Conquest makes your day!


« Reply #2 - Posted 2006-11-14 18:52:12 »

Quote
-Dsun.java2d.opengl=True

That's disabled through web start in Java 1.5. Unless I am mistaken.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CommanderKeith
« Reply #3 - Posted 2006-11-15 00:31:40 »

No it works in 1.5, you're thinking of the d3d option (which is windows-only anyway).

My jnlp file here turns on the OGL pipeline.  (Note that the game won't work with java 6 since it uses the com.sun package which has changed & I haven't updated yet).

http://www.freewebs.com/commanderkeith/STGOpenGL.jnlp

Keith

Offline noblemaster

« JGO Spiffy Duke »


Medals: 35
Projects: 11


Age of Conquest makes your day!


« Reply #4 - Posted 2006-11-15 09:37:29 »

Thanks! I created some .jnlp with different settings for Macintosh. Can you try if there is any improvement? Which one is the best version. Just click on the [Demo] button and check how fast the map scrolling is:

http://www.aevumobscurum.com/original/webstart/AevumObscurum-MAC1.jnlp
http://www.aevumobscurum.com/original/webstart/AevumObscurum-MAC2.jnlp
http://www.aevumobscurum.com/original/webstart/AevumObscurum-MAC3.jnlp
http://www.aevumobscurum.com/original/webstart/AevumObscurum-MAC4.jnlp

Which is the best combination?

Offline c_lilian

Senior Devvie


Projects: 1


Java games will probably rock someday...


« Reply #5 - Posted 2006-11-15 09:43:45 »

Too bad java 1.5 is needed : you're cutting the game away from at least half the mac base.

I would have tested the options here, but unfortunately, I'm part of the other half of mac users (pre - OS X tiger).

I'll try again later on my other mac (which has java 1.5)

Lilian Smiley

Offline CommanderKeith
« Reply #6 - Posted 2006-11-15 09:49:54 »

Note that the noddraw option doesn't apply to macs, its a windows thing.  The open GL option is the only relevant one to macs I believe.

In my open GL webstart jnlp I do this:

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

I specify the OGL option in both places since I'm not sure where it should be  Tongue.  Maybe someone could clarify?

Thanks,
Keith

Offline noblemaster

« JGO Spiffy Duke »


Medals: 35
Projects: 11


Age of Conquest makes your day!


« Reply #7 - Posted 2006-11-15 10:53:35 »

@CommanderKeith: I wasn't sure about the sun.java2d.noddraw option. The 4 .jnlp files are all the combinations of the sun.java2d.noddraw and sun.java2d.opengl as you suggested earlier!

Any difference?

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #8 - Posted 2006-11-30 19:08:52 »

2,1,4,3

Is the order of what scrolled the fastest.

I am running a 1.8ghz single processor G5 with 2.5gb of RAM. I can test this on my machine at work also if you like – it's a brand spanking new quad processor intel Mac, although the exact specs elude me right now (needless to say it is very fast). On my home computer it was pretty herky jerky but still looked totally playable. I can't judge that well though because I've never seen the game in action and have no clue how to play.

I've had some interested GUI issues transferring between Mac and PC as well, some really random stuff. It just shows that Java is not that cross platform.

See my work:
OTC Software
Offline noblemaster

« JGO Spiffy Duke »


Medals: 35
Projects: 11


Age of Conquest makes your day!


« Reply #9 - Posted 2006-11-30 19:25:14 »

Yes, not exactly sure how well the game does on Macintosh? Anyhow, can you also test that one:

http://www.aevumobscurum.com/original/webstart/AevumObscurum-MAC7.jnlp

Is this faster than #2?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #10 - Posted 2006-12-02 00:27:11 »

I just tested it on my work computer
1  
2  
3  
4  
5  
6  
7  
8  
9  
Machine Name:   Mac Pro
  Machine Model:   MacPro1,1
  Processor Name:   Dual-Core Intel Xeon
  Processor Speed:   2.66 GHz
  Number Of Processors:   2
  Total Number Of Cores:   4
  L2 Cache (per processor):   4 MB
  Memory:   4 GB
  Bus Speed:   1.33 GHz


And it scrolled incredibly quickly, with no noticeable speed issue. I'll try this new jnlp at home and see if it's this particular file or the computer that changed things. In any case, the last jnlp works great on a this-gen Mac.

See my work:
OTC Software
Offline noblemaster

« JGO Spiffy Duke »


Medals: 35
Projects: 11


Age of Conquest makes your day!


« Reply #11 - Posted 2006-12-02 01:11:47 »

wow, all that's different is the amount of memory required: It's 512MB for that particular file. Seems increasing the memory requirements solves the problem!?

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #12 - Posted 2006-12-06 02:14:44 »

Yeah, that version runs considerably faster on my home computer as well. I've needed to manually increase heap size to get some particularly processor-intensive programs to run before – these results aren't that surprising.

Increasing memory is fine, but then you've got to remember not everyone has enough to go that high. Maybe if you include the option of downloading different versions for different memory levels, you could accomodate everyone.

See my work:
OTC Software
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #13 - Posted 2006-12-18 19:44:13 »

The OpenGL pipeline is not available on the Mac with Java 5.  So sun.java2d.opengl won't help.
The biggest factor is the image format... make sure you are blitting images that are compatible with the display, there are only one or two image formats that have good performance on the Mac.  I think 32-bit with pre-multiplied alpha is the "native" format for the Mac.

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #14 - Posted 2007-01-15 19:40:06 »

Wait... there is no more OpenGL for Mac? Why not? I hadn't heard this, I thought Vista was the only thing giving OpenGL the bone. Dang it.

See my work:
OTC Software
Offline Orangy Tang

JGO Kernel


Medals: 57
Projects: 11


Monkey for a head


« Reply #15 - Posted 2007-01-15 19:47:35 »

Wait... there is no more OpenGL for Mac? Why not? I hadn't heard this, I thought Vista was the only thing giving OpenGL the bone. Dang it.
No, swpalmer means theres no gl pipeline in the JRE for Mac is all. IIRC the whole OS uses opengl to run it's gui on, so I guess there'd be no point of the JRE reimplementing it as well.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #16 - Posted 2007-01-15 20:17:25 »

Ah, okay, that makes sense. I can still use LWJGL then. Smiley

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (1668 views)
2018-06-10 19:43:48

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

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

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

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

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

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

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

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

Solater (969 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!