Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKryzon

Posted 21 July 2013 - 02:23 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.


#1Kryzon

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.

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.


PARTNERS