[Kde-games-devel] Hybrid svg graphics...
Luciano Montanaro
mikelima at gmail.com
Sun Jan 20 22:12:23 CET 2008
Hi all,
it's me again with some more controversial argument...
An introduction, first.
I installed the gnome games, to have a look at the status of gaming on our
pointy-hat friend's platform.
AisleRiot uses svg graphics too. They ship five decks of cards in svg format.
Two of them use an hybrid approach where the indices and suits are vector
graphics, while the court cards use pixmaps as the main graphics.
The thing I did not know (or think about, actually) is that it's possible to
embed the pixmap as base64 data. So it may be practical to create single-file
card deck in svg format, if we want.
Actually, switching to svg only themes should simplify the common card caching
code Andreas is developing...
The other thing I noticed is that Gnome ships a dondorf deck too...
It is much smaller though, and much faster to load, and it uses pixmaps for
the court cards.
I think it looks better even when scaled up... though I've heard others whose
opinion differs.
Here is an image demonstrating the two decks...
http://www.cirulla.net/listing/kde_stuff/vector-pixmap.png
The one on the right is the pixmap version, on the left is the svg version.
At normal screen resolutions, there should be really little difference...
actually, the pixmap version colors should be more saturated.
From my point of view, the smooth lines at normally unreachable resolutions is
not worth the extra time it takes to load the theme...
Another "interesting" thing in Gnome decks is that the numbers do not render
with with the Qt renderer. It would be interesting to find out why.
To conclude:
maybe we should think a bit more about the "only vectors allowed" kdegames
policy. I think there are places for old school pixmap images too...
For example, pixmap images larger than any current screen resolution can be a
solution where an svg file would be too slow to load quickly.
Do not misunderstand me: vectors are great, and the current games use vector
graphics very well. However, it makes little sense in my opinion to use
automatic tools to convert pixmaps to vector, since the result is
uneditable, it's slow to load and does not really look as good as the
original anyway...
Well, that's all for now.
Ciao,
Luciano
More information about the kde-games-devel
mailing list