The Gloves Are Off

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?

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

Nobody said it had to be pretty :slight_smile:

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

[quote]http://home.halden.net/tombr/blittest/blittest.php

Nobody said it had to be pretty :slight_smile:
[/quote]
but it’s fast… 105-117 fps here… mind sharing the sources?

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

[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?
[/quote]
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…

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.

[quote]but it’s fast… 105-117 fps here… mind sharing the sources?
[/quote]
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.

[quote] My question still remains, then – what type of things are people doing that would require more graphics capability than Java2D has?
[/quote]
I think there are two basice mindsets:

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

and

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

[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.
[/quote]
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. :stuck_out_tongue:

[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.
[/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.

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.

[quote]http://home.halden.net/tombr/blittest/blittest.php

Nobody said it had to be pretty :slight_smile:
[/quote]
This one appears to be faster than the others on the Mac, but there is no FPS display :frowning:

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.

[quote]Particualrly if you are going tio TVs (which I hope we will in the nto too distant future)
[/quote]
Could Jeff be dropping a hint? Hmmmm

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

So what’s the secret?

Cas :slight_smile:

cheating :wink:

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

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

so it is, didn’t see the link to the sourcecode :wink:

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

[quote]its still cheating though - if i understand the code correctly :stuck_out_tongue:
[/quote]
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.
[/quote]
what are you Abusing of? :wink: ;D :stuck_out_tongue: