Hi,
I’m trying to make an RPG, and since I’m not good at 3D graphics and there’s not much nice-looking 2D image/sprite resources around, I started trying out a simple 2D vector graphics style from a top-down perspective.
It just uses ellipses, polygons and some radial gradient fills. Here are some prototypes that I made using the vector graphics program Inkscape (www.inkscape.org):
http://www.fileden.com/files/2008/9/22/2110084/trees.png
http://www.fileden.com/files/2008/9/22/2110084/oasis.png
Here’s the inkscape svg file where the above screnshots come from:
http://www.fileden.com/files/2008/9/22/2110084/playerAndTrees.svg
After prototyping it in Inkscape, I then re-make the graphic in java 2D code using Ellipse2D’s etc in the java.awt.geom package. I’ve re-created the first graphic in my RPG game, and also animated it so that the tree’s leaves blow around, moving according to a sine wave. The man also swaggers (rotates back and forth) as he walks according to a sine wave, where the y-axis of the wave is his rotation angle and the x-axis is time.
I’m getting ok-ish performance, averaging nearly 60FPS on a 750x750 pixel window, but ranging from 25 - 130FPS. I’m using the pre-release Java 6 update 10 (or update N). Thankfully java 6 update 10’s D3D pipeline does a good job accelerating everything. Still, when I profile the game, most time is spent rendering (using -Xprof, 40% time is spent in the method sun.dc.pr.PathFiller.writeAlpha8 and 20% in sun.java2d.d3d.D3DRenderQueue.flushBuffer alone).
I wanted to put this up to see what you thought and to get ideas. I also wanted to see if anyone was interested in using such an art style in their own game - it would be great to share ideas for graphics. I can post up a webstart and source if anyone is interested.
Thanks!
Keith