LWJGL Forum
Programming => General Java Game Development => Topic started by: Onno on December 01, 2006, 11:17:41
-
Hi guys,
I'm new to LWJGL (and game development). So far I like what I see very much.
Since there is already support for OpenGL and OpenAL, I was wondering if OpenVG support was being planned for a future version as well? Vector graphics may come in handy during 2D game development.
I noticed the Amanith Framework (http://www.amanith.org) is Open Sourced. It provides an OpenGL accellerated OpenVG implementation so it will work on todays graphics cards.
It is written in C++ and already seems to have a Python binding available, but I couldn't find any Java bindings. I think it would fit in well with LWJGL.
-
I have personally looked at it before (when it wasn't open sourced), however I'm not sure if there is a general interest in it?
-
Looks like it would be nice to have a Java binding. 8)
-
I wouldn't complain if it was added (as I really like vector graphics, and would love to use them if possible). The possibility of turning vector graphics into openGL textures seems kind of interesting.
-
I have personally looked at it before (when it wasn't open sourced), however I'm not sure if there is a general interest in it?
I think there would be quite a few types of 2D games that could benefit from it. Point and Click adventures like Monkey Island 3 would be good candidates, but it would also give you high quality sprites and backgrounds to target a large range of screen resolutions in comic-style arcade games.
-
I have personally looked at it before (when it wasn't open sourced), however I'm not sure if there is a general interest in it?
I think there would be quite a few types of 2D games that could benefit from it. Point and Click adventures like Monkey Island 3 would be good candidates, but it would also give you high quality sprites and backgrounds to target a large range of screen resolutions in comic-style arcade games.
just use slick for that - http://slick.cokeandcode.com
-
Vector graphics generally would be a good add.
Kev
-
just use slick for that - http://slick.cokeandcode.com
I am using that :P
But it uses LWJGL under the hood and thus doesn't support vector graphics. Everything is still bitmapped.
If you simply use OpenGL for your sprites/backgrounds, the bitmaps get scaled. That works okay for most situations, but scaling small sprites to high resolutions looks ugly. Vector Graphics would fix that and allow you to zoom into game-levels endlessly.
But there are many more practical uses for vector graphics (keeping graphics size down for example or animating 2D models the way you would normally animate 3D models using coordinates).
-
It'd be nice to have a light weight implementation of SVG Tiny or SVG Basic that could render to LWJGL. Maybe thats doable pretty quickly, anyone got any examples of some simple compliant SVGs?
Kev
-
It'd be nice to have a light weight implementation of SVG Tiny or SVG Basic that could render to LWJGL. Maybe thats doable pretty quickly, anyone got any examples of some simple compliant SVGs?
This (http://www.tinyline.com/svgt/samples/samples/index.html) was my first Google result.
I doubt that it will be quick to implement without using existing libraries though, even SVG Tiny is quite a big specification.
I just clicked on the Tilitilation link in your signature by the way: a great game! Reminds me a bit of a 3D version of Bob's Bad Day (old Amiga Game).
-
It'd be nice to have a light weight implementation of SVG Tiny or SVG Basic that could render to LWJGL. Maybe thats doable pretty quickly, anyone got any examples of some simple compliant SVGs?
It should be a lot of work, but if you've got the time (and courage? :lol:), you can have a look at zShapes (http://www.javagaming.org/forums/index.php?topic=14778.msg119569#msg119569). The code is yours to refactor in any way you like. I'd love to see it become a full SVG rendering library, and I'd do it myself under better circumstances. I'm available to answer any questions you may have.
Btw, what I don't like about Amanith is that it's based on dynamic triangulation. This has implications on CPU performance and requires multisampling for antialiasing. Also, anyone knows what's the deal with AmanithVG? Why is that a commercial lib and how does it differ from Amanith Framework?
-
anyone got any examples of some simple compliant SVGs?
You can find everything you need in Open Clip Art Library (http://www.openclipart.org/).
-
It should be a lot of work, but if you've got the time (and courage? :lol:), you can have a look at zShapes (http://www.javagaming.org/forums/index.php?topic=14778.msg119569#msg119569). The code is yours to refactor in any way you like. I'd love to see it become a full SVG rendering library, and I'd do it myself under better circumstances. I'm available to answer any questions you may have.
Wow.. that's a very interesting library you have there.
Although it currently only handles shapes, which is not enough for actual rendering of SVG alike vector graphics, it still looks very useful.
-
Although it currently only handles shapes, which is not enough for actual rendering of SVG alike vector graphics, it still looks very useful.
Yes, it could work like this:
- Parse an .svg(z) with Batik (http://xmlgraphics.apache.org/batik/).
- Retrieve a list of Java2D shapes using the Batik node tree.
- Convert everything to triangles with zShapes.
- Implement SVG rendering
That's the difficult part. Batik does this already with Java2D, but we need OpenGL rendering. It should be easy for fills and gradients, but it gets
complicated if you need scissoring, different blend modes, etc.
- At runtime, go through each shape node (would probably be a GL display list), apply the appropriate rendering state and you're done. ;D