ImageIO.read can load images in formats that aren't optimized for the current GraphicsDevice. That code will optimize them to use the same colormodel as the current GraphicsDevice so no conversions are necessary when rendering.

Yes, I understand what that does. I'm not sure you're understanding managed images though? Any BufferedImage (including those read through ImageIO) can be managed, meaning it's cached in VRAM, and no conversion would therefore be necessary when rendering. Theoretically seeing such a "considerable speed boost" between BufferedImage formats would suggest that something else is going on in how you draw or use the images that is stopping rendering from them being hardware accelerated (or alternatively it's the OS you're on, or just Java2D being Java2D! )

Anyway, I wasn't seeking to hijack your thread on that discussion - maybe start a new one if you want to discuss further?

Game looks great btw

Haha, who knows, probably Java2D being Java2D :~)Either way, the Renoria Engine also has a LWJGL backend that is fully hardware accelerated and tries to load the game from LWJGL by default. Java2D is kind of a "fall-back" for systems that fail to load LWJGL

You may have noticed that my render methods never use a Graphics2D object, instead always passing a RenderSpace object. This is the abstraction object used by the engine to plug in different rendering systems. RenderSpace may use a Graphics2D object behind the scenes, or may use a VAO from LWJGL.

Java2D first tries to use DirectX, then OpenGL, and then if all fails it doesn't hardware accelerate. Unless you are doing something really fancy with shaders (and java2D should be fine for the kind of game you're making) what you've done seems like a pretty pointless abstraction layer. If you have performance issues with Java2D you should trying playing around with the VM switches for java2d.

Anyway, nsigma and I argued about this for a while and it turns out I was referencing some pretty old material that was inaccurate for the time. Java2D does accelerate BufferedImages. A couple years ago, what you're doing might've improved performance but it doesn't any more.

I bench-marked my particle engine without (and with) creating compatible images and the difference in performance was (as far as I can see) zero.

Java2D first tries to use DirectX, then OpenGL, and then if all fails it doesn't hardware accelerate. Unless you are doing something really fancy with shaders (and java2D should be fine for the kind of game you're making) what you've done seems like a pretty pointless abstraction layer. If you have performance issues with Java2D you should trying playing around with the VM switches for java2d.

Anyway, nsigma and I argued about this for a while and it turns out I was referencing some pretty old material that was inaccurate for the time. Java2D does accelerate BufferedImages. A couple years ago, what you're doing might've improved performance but it doesn't any more.

I bench-marked my particle engine without (and with) creating compatible images and the difference in performance was (as far as I can see) zero.

*edit* Sorry, I've just hijacked the thread :X

Oh well, at least it helps accelerate the game on older versions of the JVM

And it wasn't completely pointless - The abstraction I've implemented has helped me accelerate the process of porting the engine to other platforms, such as iOS (Objective-C).

Not to mention my LWJGL implementation is a tad faster than the Java2D implementation, and it has better control over GPU memory, and does render a bit quicker.The LWJGL implementation generates large 2048x2048 textures before the game loads, and uses these massive textures as texture-atlases to improve performance.

Are you planning to release this eventually, and if so, when do you hope (actual deadlines nearly always fail) to do so? So far it looks amazing. Also, get your 10 artists to hurry up with those tiles. The grass is getting boring.

Are you planning to release this eventually, and if so, when do you hope (actual deadlines nearly always fail) to do so? So far it looks amazing. Also, get your 10 artists to hurry up with those tiles. The grass is getting boring.

Already working on new tiles!

Just waiting on him to finish making the dirt sides, the rest of the 3-patches and so on and so forth..

Thank you, I really appreciate that, and of course I'm going to be releasing it eventually

Our planned release is Christmas this year, but the absolute latest deadline, Feb next year.

Engine can now recolor sprites on the fly. Creates possibility for dying items and saving assets by recoloring items instead of creating new assets for them (Ex: Blue Beanie, Brown Beanie, Pink Beanie, etc)

Built a tool to show how this works:

Basically the algorithm first applies a luminosity filter to each pixel, then does some RGB math to blend the new source pixel with the luminosity value of the old pixel.

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