Vector array

Post questions on how to use or achieve an effect in Inkscape.
Miglu
Posts: 4
Joined: Thu Sep 23, 2010 5:55 am

Vector array

Postby Miglu » Thu Sep 23, 2010 6:07 am

How to get the vector array from an SVG file? (so that it can be used in games)

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Vector array

Postby prkos » Thu Sep 23, 2010 8:13 am

Can you explain in more detail what you want to do?

Check this out http://wiki.colivre.net/Aurium/InkscapeGenerator
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Vector array

Postby tomh » Thu Sep 23, 2010 9:39 am

Also have a look at these: http://www.lysator.liu.se/~perni/iboardgameexts/

oh, and the tile clone dialogue can come in handy depending on what you want to do

Miglu
Posts: 4
Joined: Thu Sep 23, 2010 5:55 am

Re: Vector array

Postby Miglu » Fri Sep 24, 2010 1:33 am

I want to create shapes easily with Inkscape and use their vector arrays, instead of manually making the shapes from code. I am going to use the vector arrays to make collision shapes in a physics engine.

Miglu
Posts: 4
Joined: Thu Sep 23, 2010 5:55 am

Re: Vector array

Postby Miglu » Fri Sep 24, 2010 4:05 am

I want to easily do shapes with Inkscape using the vector arrays instead of making the shape manually in code. How to get the vectors from n SVG file?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Vector array

Postby brynn » Fri Sep 24, 2010 1:27 pm

Do you want the images, or the XML code?
You want to draw the images, and then take the code from the XML Editor?
Is that it?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Vector array

Postby ~suv » Fri Sep 24, 2010 1:45 pm

Miglu wrote:I want to easily do shapes with Inkscape using the vector arrays instead of making the shape manually in code.
Can you post a sample of the data structure (e.g. of a rectangle, ellipse or a regular path) you use in your external code?

Miglu
Posts: 4
Joined: Thu Sep 23, 2010 5:55 am

Re: Vector array

Postby Miglu » Sat Sep 25, 2010 2:23 am

I mean that I want the vectors, or most of them if there are very many of them, so that they can be made into an array of vectors in the code. This is an example of making a rectangle's array: cpVect array[4] = {cpv(x, y), cpv(x + w, y), cpv(x + w, y + h), cpv(x, y + h)};
It is strange that the documentation has nothing about this. Are not complex shapes that are used in physics engines usually created with an SVG application, so that that is one of their main uses.


Return to “Help with using Inkscape”