• FEATURED

View more

View more

View more

### #6MaxDZ8  Members

Posted 16 July 2013 - 12:19 AM

but now the Question is if we make level in inkscape and then export it to SVG

How should we import it to Citrus Engine ?

Don't import the SVG - unless you're targeting JavaScript as in Chrome or Firefox I'm afraid this will only end in tears. Rasterize everything at the appropriate resolution. If not oversampling too much it's possible to get a quality similar to vector yet using no vectors at all.

It is also possible you could use an intermediate step to convert to distance maps but in general you're being very vague about what you really need so I cannot give you an accurate answer.

Previously "Krohm"

### #7Kryzon  Prime Members

Posted 21 July 2013 - 02:21 PM

First set up your units in Inkscape as 'pixels' and work from that, considering the scale in actual pixel sizes and how it will look in the final game.

After you finished, rasterize the graphics with Inkscape to PNG (to keep actual the pixel size, use 90 DPI - look in the output size if it matches the size you want).

You'll end up with a very wide PNG (it's your entire level, after all). Then you can use GIMP to 'crop' that big image into several smaller ones with power-of-two sizes so you can load them as textures. EDIT: You can alread crop the level with Inkscape, as it supports rasterizing selections or parts of a bigger graphic, but it's better you do it in GIMP as you'll be dealing with already rasterized pixels and you can edit the level's appearance much better - brightness, contrast, saturation etc.

So you have your level split as several different, transparent images and only need to draw these images whose boundaries intersect the screen.

You will have to define some shapes for the physics, so you can also use Inkscape for that: draw polygons to follow your level's silhouette, and save these paths in a Plain SVG file from Inkscape - then you can interpret the SVG file (it's like an XML file) back in your game engine and build physics objects from that.

Edited by Kryzon, 21 July 2013 - 02:23 PM.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.