[Kde-games-devel] Theming suport

Mark A. Taff marktaff at comcast.net
Wed Mar 28 21:07:35 CEST 2007


On Wednesday 28 March 2007 08:20:37 Matthew Woehlke wrote:
> Mark A. Taff wrote:
> > As for backgrounds, I think they should all be svg as well, except when
> > there are compelling reasons for using a raster image for a particular
> > background.
>
> Sorry to jump in late, but... what is the opinion on tiled raster
> backgrounds? They also look nice (in a way that's very hard to achieve -
> at least inexpensively - with svg), and resizing isn't an issue because
> they tile...

Not having coded a game myself, but it is my understanding all the SVG's get 
rendered as raster (pixmap ) ultimately.  The key is that the original 
artwork be done in SVG, so:

1) it can be changed easily and precisely in Inkscape or similar
2) it can be changed programatically, via KGameSvgDocument or similiar
3) so the tiles can be scaled as required without becoming pixelated

For #3, let's say the tiled bg normally gets rendered at 25x25px initially.  
Can it then be scaled to 20x30? to 30x30? to 30x30? Being able to do so is 
good, imo, but I think consensus around here is that there may be cases where 
this is impractical, or even non-sensical.  Perhaps your application requires 
that the aspect ratio be maintained.  That is where the author has to use 
their best judgement, I think.

What I was speaking of before was a case where perhaps a cityscape of Paris 
would be an appropriate background, which is nigh impossible to make scalable 
without pixelation without using fractals.

If you do use a raster image as a source image, I suggest you at least wrap it 
inside an SVG document.  That way, your code will permit an artist to update 
or create a theme that replaces the raster image in the SVG file with an 
actual SVG-based image.

Regards,

Mark


More information about the kde-games-devel mailing list