bufferstrategy or opengl?

so i spent days and days learning how to make a background with interactible sprites and a hero that moves through a scrollable map (i probably should have learned java before learning how to make java games :s) and came to find out that i was doing everything wrong (the performance was terrible!). so i learned the basics of double buffering and bufferedimages, tiles, etc. and found out after hours and hours of that that I should be using bufferstrategy.

So I looked on google and this forum and saw that opengl is an option for peak performance, but I can’t seem to find a comparison. before i jump into one concept or another, i think it might save me some time to get some pros and cons on the two, or maybe even advice on any other 2d apis that will give me some good performance (such as volatile image, but I understand that to be used anyway via bufferstrategy?). Thanks in advance.

java2d should basically be fast enough for you unless you are using lots of translucency/scaling/rotating; ff that is the case then you should consider opengl. If it isn’t, then you should spend more time figuring out whats making your program slow with java2d, 'cause it doesn’t have to be :wink:

For 2D cookie cutter sprite stuff, Java2D is actually very fast - about as fast as the graphics card can actually handle. Unfortunately it’s just very unreliable and inconsistent.

Cas :slight_smile:

you should get some pretty good speed with Java2D as im cuurently writing a game and have got 640x480 fullscreen parallax scrolling built from 32x32 tiles with a main player sprite of 96x64 and as a test stuck on 50 84x124 animated sprites too and all running at a smooth 75fps (oh and with a mod playing with Martin Camerons micromod player)

even on our laptop it runs great at 60fps (fps locked to the refresh rate) and thats got a crusty on board gfx card so we occasionally get a bit of slowdown bit in general it runs nice on that too (1.1 gig celeron)

whooo! 1.1 celeron, that’s telling!
well, if there isn’t that big of a difference when you do things properly, i’ll probably just stick to java 2d then. the reason i asked is because i figured that one is just as easy to get used to as the other, and if one is even slightly better than another, i’ll stick with that. (i’m making a mmorpg, so i was hoping for peak efficiency.) it sounds though, from what i’ve seen, that opengl is a little harder to get used to than java2d (especially after what i’ve learned about 2d up until this point) so i’ll just stick to the wiley bufferstragegy. Thanks for the advice guys!