What's the best method for a Tiled-Image?

:slight_smile: hi! I’m a french guy… and I have need to be advised.

I know I’m not the best English Speaker of the World, so I beg to be excued for my low level in english.

In fact, I have gone in a french forum where someone advised me to go here so as to find the solution of my problem.

My prob is the following:

I would make a java-game and I have to make Sprite, I succeeded in implementation of frame animation in my sprites: I use a big Image where I placed the different sub-image which will be used by the sprite so as to animates itself.

But I have found two, even three solution:

-the method: Graphics.drawImage(Image img, int dstx1, int dsty1, int dstx2, int dsty2, int srcx1*, int srcy1, int srcx2*, int srcy2, ImageObserver observer);

-the method: BufferedImage.getSubImage();

-and the method: CropImageFilter.

I would like know what’s the most performant method.

I have realized some test, and it seems that BufferedImage add a time of loading (and lot of lines in the code, hihi!! :stuck_out_tongue: ).
But I don’t know if this detail is important…

I do use the drawImage meth’ for all of the Image operations. That works well with standard configuration. Java Advanced Imaging can bring new plugins and does improve the speed of Image operations through its API, e.g. the RenderedImage class does provide acceleration needed in games.

:smiley: WaWoouuuhh!! I was understood!!! lol :slight_smile: I’m very happy: my english may be comprehensible!

Thank you BroumBroum. I don’t know if I’m going to use Java Advanced Imaging… I’m a beginner in progra…

We can make Sprites easily with JAI’s API?

re- thank you! I’m very happy :slight_smile: !!

The first one is the best and it’s very fast. :slight_smile:

Bienvenue a java-gaming.org mon ami!

:smiley: hihi, merci infiniment CommanderKeith!
In this forum, you seem more friendly than on some French Forum.

I endeavour speak Englisk as well as I could. But, if someone understands French, I can write the French traduction below my English sentences for your own training.

I will use the meth’ drawImage() as you advised me, thanks! If you have the time, I have posted a other topic.

For each topic here, I woul like poste a traduction of your solution on this French Forum in order to help the French beginner:
http://www.developpez.net/forums/forumdisplay.php?f=630

I can?