dumb question..

I was looking through the Drawing 2d graphics thread and was wondering can you use images made in inkscape/ corel draw or other vector programs in java games. I did a couple searches for .svg and only came up with simple geometry stuff like asteroids. I am looking for an art style you can find in most flash games. So is it possible to use these files? Thanks for the help! Sorry for the dumb question.

Hi, you can look at the batik library… I also remember that a topic on vector graphics was presented at java one, you should go to the download page and try to find if they have some good pointers.

It’s not that hard; just parse the SVG files and use Java2D to draw them. We did this for one of our projects; basically we needed to create a board game where the map had a lot of curves. So most groups spent ages mapping pixels in bitmaps or reducing their accuracy with 10x10 grids with some creating their own editors. We just used our common sense and made SVG files with Gimp :slight_smile:

There is Batik (too heavy with ~10mb), Tinyline and Salamander for direct SVG rendering. Slick also has some utility class for loading simple SVGs as geometry (level data).

And well, you can always export the SVGs as PNG and use those images as usual.