Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3
  ignore  |  Print  
  The Gloves Are Off  (Read 10631 times)
0 Members and 1 Guest are viewing this topic.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #30 - Posted 2004-02-12 09:56:44 »

Quote
Sun's current  implementation 'sucks' to you? Then, why not using an other implementation?
...
I guess than simply ranting is faster than testing an API and asking for debate about intelligent subjects, like 'how to make sun integrate that other XXX pipeline as a default one', or 'what are the best alternate java2D implementations for gaming?'
...
Or, even better,  starting a new thread like ' why don't we make a fast lightweight java gaming java2d library based on a GL pipeline that will please us' and implementing one...... this is something that could have been done.... mmhhhh.... three years ago, i think...
man, all that energy lost for nothing....


Um, you're saying this in reply to *Cas* ? Huh

I don't use LWJGL (sorry, guys), but I know that not only is it done and working, but also how tirelessly (well, actually he may be tired at last Wink...) Cas has tried to get the GTG / J2D / etc groups @ sun to improve things, (according to his opinion of how they ought to be).

malloc will be first against the wall when the revolution comes...
Offline pepe

Junior Member




Nothing unreal exists


« Reply #31 - Posted 2004-02-12 10:01:45 »

Quote
I'm asking: why is Java 2D still so slow after nearly a decade?

Why not simply starting the thread with that  question?

Nevertheless, to stick to your thoughts, i think the right question should be:
"why is java2D still not fully hardware accelerated on parts that can actually be"
simply because:
- java is not slow, we all know it
- 3D hardware acceleration were not accessible 10 years ago. Talk about 6 years...

I think that most of the answer is "because no one did it", and also "because it's not as simple as we might think"...

Then, let's be constructive... i started a thread about 1.5 graphic acceleration and added a small contest... get there, participate/

*edit*
- java 2D is not slow, we all know it

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #32 - Posted 2004-02-12 10:20:09 »

Quote
i started a thread about 1.5 graphic acceleration and added a small contest... get there, participate

Yeah, that's what this thread was about, too Smiley Shall we stop this one or go to the other thread?

Cas Smiley

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

Junior Member




Nothing unreal exists


« Reply #33 - Posted 2004-02-12 10:42:44 »

the thread might be interesting to continue if we try something.
let's take one of the applications that were done here and convert it to Agile2D or any hardware accelerated java2D implementation. let's see the results we have then, and see how it compares to actual java2d, then compare it to 1.5 java2d.
that might be useful in finding where are the things that needs to be improved, if still the GL pipeline (linux) and other accelerations (vram for win32) are too slow or bad.
Anyway, it will give us an idea of what we might get to when things get accelerated as we all expect them to be in a near future.

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Mark Thornton

Senior Member





« Reply #34 - Posted 2004-02-12 12:52:54 »

The following is from the Agile2D page:
Quote
Importantly, drawing generic shapes and text is sometimes slower under OpenGL. The issue with general shapes can be somewhat mitigated by using immutable shapes - Agile2D caches immutable shapes using OpenGL display lists and can render them significantly faster (on the order of 50,000 shapes per second using the same test conditions above).

My own real work (the stuff which pays) does a great deal of general shape drawing (mostly wide polylines), each of which is rendered once only. So while OpenGL may speed up many of the operations you want for games, Java2D needs to provide a good balance of performance for other uses as well. That makes the job of using hardware accelleration much harder --- it can easily turn into hardware decelleration for another group. It is already the case that my code works faster when I turn anti-alliassing ON --- because that stops any attempt to use the hardware and useless punting between system memory and video memory.
For complex high quality 2D rendering Java2D seems to work as well as anything available (and allegedly rather better than GDI+). So given that current hardware provides only limited support for 2D, perhaps it is better to leave Java2D as it is and use a specialist API for 3D/games work. Certainly use 3D acc. if possible without significantly compromising performance of code using features which can't be accellerated, but don't hold your breath waiting for dramatic improvements.
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #35 - Posted 2004-02-12 13:02:38 »

Ah - but I don't want everything hyper accelerated!
There are a few key areas which are used by the vast number of apps out there which could be accelerated with GL or D3D:

  • Blitting
  • Rectangles & triangles
  • Lines

Leave the other stuff using the normal pipeline.
Incidentally poly drawing in GL is not usually optimised in consumer cards. The underlying functionality is meant to be the same as Java2D more or less but because the consumer cards are largely optimised for games, they've never bothered too much with the performance.

Cas Smiley

Offline zparticle

Senior Member




Thick As A Brick


« Reply #36 - Posted 2004-02-12 13:03:17 »

Quote


A whopping six and a half (6.5) FPS on Mac OS X 10.3.2  JRE 1.4.2_03  Powerbook 1GHz...  using 800x600 16 bit

The peak was 10, the low 2... not very impressive, and not playable really.  


Ick, well I'm glad I'm not using a Mac, how depressing. I get 60FPS solid on my crappy work machine (Win2k) without alpha. 30 solid with alpha. And the scrolling is smooth. Well just one more oddness about J2D, you can't count on any two machines running the same code even close to the same way.

Off topic a bit but at 800x600 that's only

a> 1 Screen clear
b> 475 non transparent blits of 32x32 images
c> 32 blits of 50% alpha channel of a 32x32 image

Is there a "big" different between the snowflakes that aren't completely filled images and my block tile? In other words is it likely that a snow flake, having large portions of the image being completely transparent, would perform better?

Offline Abuse

JGO Knight


Medals: 12


falling into the abyss of reality


« Reply #37 - Posted 2004-02-12 13:11:00 »

Profile the code, I bet all my worldly possessions that the 32 alpha blits are taking more than 90% of the processing time per frame.
Read back from vram realy IS that slow.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Mark Thornton

Senior Member





« Reply #38 - Posted 2004-02-12 13:20:52 »

Quote

Leave the other stuff using the normal pipeline.

The trouble, as we know, is that trying to guess which pipeline to use is tricky and swapping when you guess wrong is expensive.
Offline pepe

Junior Member




Nothing unreal exists


« Reply #39 - Posted 2004-02-12 13:24:19 »

i've discussed with nonnus, if he permits me to quote our private discussion, i'll tell you how he did his sprite drawing and what conclusion we can draw from that.
we'll be able to go further in that way

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nonnus29

Senior Member




Giving Java a second chance after ludumdare fiasco


« Reply #40 - Posted 2004-02-12 15:24:11 »

Basically I said:

I did my blending in software from the snowflake buffered image to a backbuffer buffered image blending each pixel.

Agile2d looks interesting, but it breaks the promise of crossplatformness and is gl4java available anymore?  And on what platforms?
Offline tom
« Reply #41 - Posted 2004-02-12 16:52:16 »

http://home.halden.net/tombr/blittest/blittest.php

Nobody said it had to be pretty  Smiley

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #42 - Posted 2004-02-12 18:02:50 »

Quote

[...]
Off topic a bit but at 800x600 that's only

a> 1 Screen clear
b> 475 non transparent blits of 32x32 images
c> 32 blits of 50% alpha channel of a 32x32 image
[...]


If the whole screen is redrawn, there's no need to clear it.

弾幕 ☆ @mahonnaiseblog
Offline pepe

Junior Member




Nothing unreal exists


« Reply #43 - Posted 2004-02-12 18:22:48 »

Quote
http://home.halden.net/tombr/blittest/blittest.php

Nobody said it had to be pretty  Smiley

but it's fast.. 105-117 fps here...  mind sharing the sources?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline kevglass

JGO Kernel


Medals: 164
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #44 - Posted 2004-02-12 18:31:25 »

Quote

http://home.halden.net/tombr/blittest/blittest.php

Nobody said it had to be pretty  


Oowwww! My eyes! Neat tho, and rather smooth too.

I'm still not overly impressed with Java2D for speed but this just at least prove you can do _some_ games with it.

Kev

Offline pepe

Junior Member




Nothing unreal exists


« Reply #45 - Posted 2004-02-12 18:34:39 »

Quote
Basically I said:

I did my blending in software from the snowflake buffered image to a backbuffer buffered image blending each pixel.

Agile2d looks interesting, but it breaks the promise of crossplatformness and is gl4java available anymore?  And on what platforms?

which means that going software is faster than vram read...  This is something interesting, imho. Scott's example is slow, still don't know exactly why, but i believe it is because there are vram reads. This leads me to think that once a pipeline is implemented using a particular method, it has to keep that way as much as possible. the wish to have blits and lines hardware must not be limited to only blits and lines because most of the acceleration, if not all will be lost in mixing techniques.  Again imho, accelerating rendering must be seen as a complete solution, not only a trick or two to use at some places. I believe this is partially why it is hard to implement a correct accelerated solution at all.

Agile2D looks nice, but is not a long term solution to me. it is nice to test the concept, but that stops here. GL4Java is ported to linux, OSX and win32, so it is quite cross platform... I think i heard that gl4java was not developed anymore. Anyway, what would be the interest now that we have JOGL...

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline crouilla

Senior Newbie




Me fail English?  That's unpossible!


« Reply #46 - Posted 2004-02-12 19:07:24 »

My question still remains, then -- what type of things are people doing that would require more graphics capability than Java2D has?  I'm blitting over 1200 images to the screen using bitmask blending and getting anywhere between 150 and 200 FPS... that's more than enough for most games I would write (I'm working on a 3/4 view or full isometric RPG -- haven't figured out which yet).  Does anyone have a demo (even a slow-moving one), of something they've written, or is Java's "slowness" just an excuse to get nothing done?

I'm just curious what people want to acheive that REQUIRES alpha blending and the like that can't be acheived by other means.
Offline tom
« Reply #47 - Posted 2004-02-12 19:24:15 »

Quote
but it's fast.. 105-117 fps here...  mind sharing the sources?


Sure. http://home.halden.net/tombr/blittest/BlitTest.java

It's basecly the same method as used by nonnus29. The background tiles are VolatileImages. Each sprite are dirty rectangles that are rendered in software.

It will run faster that nonnus29's demo because the background tiles are bigger. He use 32x32, I use 64x64. This doubles the speed on my computer. So there seem to be some overhead in useing lots of VolatileImages.

Offline nonnus29

Senior Member




Giving Java a second chance after ludumdare fiasco


« Reply #48 - Posted 2004-02-12 20:02:14 »

Quote
My question still remains, then -- what type of things are people doing that would require more graphics capability than Java2D has?  


I think there are two basice mindsets:

1.  I want all the capability just in case I want to use it.

and

2.  Its fun/challengeing designing around the limitations (hardware or software).

I think 2) is why there are people still doing snes or gameboy color dev.

Good (fun/addictive) gameplay transcends gfx.
Offline pepe

Junior Member




Nothing unreal exists


« Reply #49 - Posted 2004-02-12 20:12:50 »

Quote
I'm just curious what people want to acheive that REQUIRES alpha blending and the like that can't be acheived by other means.

heh.. maybe that there is some kind of a preventive defense feeling of the java developers - that have been quoted for too long about slowness- that relative slowness is not good, even if it's already nice. There is a strong desire of very fast things so that we can compete with people that have been thinking for too long that we are using slow APIs. That's normal. if we want to be remarked and make minds change about java, we have to be astounishing. Fast is not enough.
That's my analysis, it might of course not fit anyone else.  Tongue

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Abuse

JGO Knight


Medals: 12


falling into the abyss of reality


« Reply #50 - Posted 2004-02-12 21:47:03 »

Quote
My question still remains, then -- what type of things are people doing that would require more graphics capability than Java2D has?  I'm blitting over 1200 images to the screen using bitmask blending and getting anywhere between 150 and 200 FPS... that's more than enough for most games I would write (I'm working on a 3/4 view or full isometric RPG -- haven't figured out which yet).  Does anyone have a demo (even a slow-moving one), of something they've written, or is Java's "slowness" just an excuse to get nothing done?

I'm just curious what people want to acheive that REQUIRES alpha blending and the like that can't be acheived by other means.


Alpha Compositing is a fundamental requirement for sooo many 2D effects. I'm sure you don't need me to list them all.
The only thing that is more fundamental, is transforms.... and we don't have that accelerated yet either <_<

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline crouilla

Senior Newbie




Me fail English?  That's unpossible!


« Reply #51 - Posted 2004-02-12 21:51:45 »

Quote


Alpha Compositing is a fundamental requirement for sooo many 2D effects. I'm sure you don't need me to list them all.
The only thing that is more fundamental, is transforms.... and we don't have that accelerated yet either <_<


I'll give you transforms... they definitely could be a big aspect in the playing of some games.  

But to me, alpha blending is essentially eye candy that's nice, but not imperative in order to make a good game.  I totally understand the desire for it, just not why it's such a big stopping point for some people.

Case in point -- I just finished playing Planescape: Torment for the first time.  I've owned it for years, but now I'm going through all of the games I never beat on my "finish all my old games BEFORE I buy new ones" kick (after I was thoroughly disappointed by DX:IW after being such a fan of Deus Ex).  The graphics are about 5 years out-of-date, but the gameplay and fantastic story makes it a great game even today.  Even older is Fallout2, which I beat right before PS.  Both incredible games which had very little to do with the graphics.

Think about it this way -- how cool is it that you can do BITMASK blitting by just setting a flag in a function?  I come from the days when you had to do that manually, and it was no fun.  Java2D isn't perfect, but it's relatively easy to program, and someday (hopefully soon), they'll add everything we want to it.
Offline Jeff

JGO Coder




Got any cats?


« Reply #52 - Posted 2004-02-13 02:23:59 »

I'll speak up for Alpha belnding.

It makes a lot of things look nicer.  The most critical I can think of is anti-aliased text.    Particualrly if you are going tio TVs (which I hope we will in the nto too distant future) anti-aliasing is kinda important.

Yes you can design around it, but having it opens up more options.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #53 - Posted 2004-02-13 11:36:30 »

Quote
http://home.halden.net/tombr/blittest/blittest.php

Nobody said it had to be pretty  Smiley

This one appears to be faster than the others on the Mac, but there is no FPS display Sad

Keep in mind that the Mac has no hardware acceleration in 1.4.2 that I am aware of, and that if you use an image format that is not supported by the native rendering engine icky slow conversions are done.  I think I posted something about this either in Java2D or Performance Tuning a couple months ago.

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #54 - Posted 2004-02-13 11:40:40 »

Quote
Particualrly if you are going tio TVs (which I hope we will in the nto too distant future)

Could Jeff be dropping a hint? Hmmmm

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #55 - Posted 2004-02-13 11:51:27 »

That last test managed a fairly staggering 150fps on my machine.

So what's the secret?

Cas Smiley

Offline Abuse

JGO Knight


Medals: 12


falling into the abyss of reality


« Reply #56 - Posted 2004-02-13 12:18:17 »

Quote

So what's the secret?

Cas Smiley


cheating Wink

(I hope it isn't considered rude to decompile ppls code :|)

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline pepe

Junior Member




Nothing unreal exists


« Reply #57 - Posted 2004-02-13 12:55:33 »

Quote

(I hope it isn't considered rude to decompile ppls code :|)

Isn't the last example from Tom? Did i miss something?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline Abuse

JGO Knight


Medals: 12


falling into the abyss of reality


« Reply #58 - Posted 2004-02-13 13:16:54 »

so it is, didn't see the link to the sourcecode Wink

its still cheating though - if i understand the code correctly :p

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline pepe

Junior Member




Nothing unreal exists


« Reply #59 - Posted 2004-02-13 13:39:24 »

Quote
its still cheating though - if i understand the code correctly :p

hehehe... did not have to look at the code to see the cheating...
Quote
It's basecly the same method as used by nonnus29. The background tiles are VolatileImages. Each sprite are dirty rectangles that are rendered in software.

It will run faster that nonnus29's demo because the background tiles are bigger. He use 32x32, I use 64x64. This doubles the speed on my computer. So there seem to be some overhead in useing lots of VolatileImages.


what are you Abusing of?  Wink Grin Tongue

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Pages: 1 [2] 3
  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.

BurntPizza (22 views)
2014-09-19 03:14:18

Dwinin (36 views)
2014-09-12 09:08:26

Norakomi (65 views)
2014-09-10 13:57:51

TehJavaDev (91 views)
2014-09-10 06:39:09

Tekkerue (45 views)
2014-09-09 02:24:56

mitcheeb (66 views)
2014-09-08 06:06:29

BurntPizza (49 views)
2014-09-07 01:13:42

Longarmx (36 views)
2014-09-07 01:12:14

Longarmx (42 views)
2014-09-07 01:11:22

Longarmx (38 views)
2014-09-07 01:10:19
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

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

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

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

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

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!