How to load a vectorial image?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
barracuda
Prole
Posts: 3
Joined: Fri Apr 30, 2010 11:58 am

How to load a vectorial image?

Post by barracuda »

Hello,

I'm new here, and this is the first post for me. I found this good engine after I tried BlitzMax, DarkBasic, Novashell, AGen, etc... LOVE seems really good! Furthermore I like open source based programs.

Well, I wanted to create a game using physics and vectorial images, so I was looking for a way to load a vector format, but I cannot find anything. Ok I can create my editor, but it could be great if I could a 2D vectorial file.
Is it possible? Are there any functions to do that?

One thing more: Can LOVE engine manage efficiently 2D vectorial images? Or it is better (e.g. for performance reasons) manage bitmap ones (raster)?
I could not find the complete list of features of this engine, so I'm sorry if make so many questions!

1) Is it efficient managing polygon rotation (or bitmap rotation) directly in the engine? Or do I need to create the single rotation frames and manage them as an animation?
2) Is there any "trick" or specific api to manage animations?
3) Is there any demo to create a car using Box2D?
4) Can I use bitmap inside a polygon, like I can do with a 3D engine (polygon and textures)?

Thank you and I'm sorry for all these questions!
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: How to load a vectorial image?

Post by nevon »

barracuda wrote:1) Is it efficient managing polygon rotation (or bitmap rotation) directly in the engine? Or do I need to create the single rotation frames and manage them as an animation?
Bitmap rotation is built-in to the draw method.
barracuda wrote:2) Is there any "trick" or specific api to manage animations?
There's AnAL. Check the wiki.
barracuda wrote:3) Is there any demo to create a car using Box2D?
That's a little unspecific, but no, as far as I know there are very few Box2D demo specifically for Löve.
barracuda wrote:4) Can I use bitmap inside a polygon, like I can do with a 3D engine (polygon and textures)?
Not unless you write your own method for doing it.

As for vectors, there's currently no way for Löve to draw vector format images. At least not as far as I know. :(
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to load a vectorial image?

Post by Robin »

If you want to have cars, you'd probably want to roll your own physics system.
Help us help you: attach a .love.
barracuda
Prole
Posts: 3
Joined: Fri Apr 30, 2010 11:58 am

Re: How to load a vectorial image?

Post by barracuda »

Thank you for your quick reply!
About vector format I found http://love2d.org/wiki/love.graphics. With that lib I can draw lines, circles, etc...
So I can manage vector data in my program (array or other structured data) then use primitives to draw a vector-like image (circles, lines, etc...).
And in that case I think I can manage collisions and gravity via Box2D (I think....).
barracuda
Prole
Posts: 3
Joined: Fri Apr 30, 2010 11:58 am

Re: How to load a vectorial image?

Post by barracuda »

Robin wrote:If you want to have cars, you'd probably want to roll your own physics system.
I found a couple of examples to make a car using Box2D. Some people use prismatic joint for suspensions (tires). But I wanted to know if someone used box2d to make a car in LOVE.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: How to load a vectorial image?

Post by nevon »

barracuda wrote:Thank you for your quick reply!
About vector format I found http://love2d.org/wiki/love.graphics. With that lib I can draw lines, circles, etc...
So I can manage vector data in my program (array or other structured data) then use primitives to draw a vector-like image (circles, lines, etc...).
And in that case I think I can manage collisions and gravity via Box2D (I think....).
Oh, yeah. That you can do. I thought you meant drawing svg-files or something.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: How to load a vectorial image?

Post by Robin »

Actually, SVG-images are something that was looked into for (0.7? 1.0? I don't remember), no idea what happened to that.
Help us help you: attach a .love.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: How to load a vectorial image?

Post by nevon »

Robin wrote:Actually, SVG-images are something that was looked into for (0.7? 1.0? I don't remember), no idea what happened to that.
Puuuhleeease! I would love that!
User avatar
VideroBoy
Party member
Posts: 102
Joined: Wed Mar 31, 2010 6:12 pm
Location: Canada

Re: How to load a vectorial image?

Post by VideroBoy »

Native support for SVG would be pretty cool. I'm tired of resolution-dependent graphics. :nyu:

Finding an actual SVG library has been pretty sketchy in my experience though, and I've heard that the SVG specification is a monster to implement.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 66 guests