SVG images?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
SVG images?
Does Love2D support vector graphics made in Inkscape?
Re: SVG images?
No.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: SVG images?
Not in any vector format anyway.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: SVG images?
SVG is an open XML format. You might be able to write your own loader and reader, but it would take a lot of work.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: SVG images?
Lua tables are much simpler to make vector graphics with in LÖVE. If you want to use Inkscape to create graphics, you might find this interesting: http://github.com/gvx/space/tree/master/asseteditor/
It is a converter from SVG to Lua tables, written by CyaNox for (my game) Space. I have no idea how it works, but it does, so I'm happy.
It is a converter from SVG to Lua tables, written by CyaNox for (my game) Space. I have no idea how it works, but it does, so I'm happy.
Help us help you: attach a .love.
Re: SVG images?
Note to self: try it, look for holes, host publicly for the rest of LÖVERobin wrote:Lua tables are much simpler to make vector graphics with in LÖVE. If you want to use Inkscape to create graphics, you might find this interesting: http://github.com/gvx/space/tree/master/asseteditor/
It is a converter from SVG to Lua tables, written by CyaNox for (my game) Space. I have no idea how it works, but it does, so I'm happy.
Edit: better yet, port to python. The actual implementation part is less than 20% of that (well done, but PHP) mess.
Re: SVG images?
A while ago, I wrote a lib that supports the basic SVG functionality (except for stroke, fill rules, gradients and textures):Jasoco wrote:SVG is an open XML format. You might be able to write your own loader and reader, but it would take a lot of work.
viewtopic.php?f=5&t=78537&start=10#p181146
It's possible to support every SVG feature in Lua but it's slow and requires a lot of extra math.
For games, it's better to convert the SVGs to a more reasonable format and load that.
Re: SVG images?
a few years ago i considered writing an svg-handling lib, but even svg tiny's spec is over 400 pages so i just went "nope"
this was also before Meshes were added to love so it probably would have not been the most pleasant thing to implement
this was also before Meshes were added to love so it probably would have not been the most pleasant thing to implement
Re: SVG images?
Some time ago, I was also thinking about an SVG workflow for love2d.
When you want to support different resolutions, it's a pain to work with raster graphics.
During my research I found this:
SVG Path Extractor for Corona SDK in Lua Language
https://github.com/singularity-is-i/SVG-Path-in-Lua
Lua library for easy SVG generation
https://github.com/cappelnord/EzSVG
nanoSVG
https://github.com/memononen/nanosvg
nanoSVG seems to me the best choice, but you have to write a nativ plugin for Love or a Binding via FFI (LUaJit).
When you want to support different resolutions, it's a pain to work with raster graphics.
During my research I found this:
SVG Path Extractor for Corona SDK in Lua Language
https://github.com/singularity-is-i/SVG-Path-in-Lua
Lua library for easy SVG generation
https://github.com/cappelnord/EzSVG
nanoSVG
https://github.com/memononen/nanosvg
nanoSVG seems to me the best choice, but you have to write a nativ plugin for Love or a Binding via FFI (LUaJit).
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests