|
List Info
Thread: KMahjongg (almost) using SVG theme
|
|
| KMahjongg (almost) using SVG theme |

|
2006-08-21 22:56:35 |
Hi, guys. It took more time than what I have predicted,
thanks to
several incompatibilities while trying to get my vectorial
data into
Inkscape, and exporting it in a way that could be rendered
cleanly by Qt
SVG. We had to basically redo everything... But I am almost
done with
the art and code to make KMahjongg use SVG to render the
tileset and
background. See a preliminar screenshot at
h
ttp://www.tabuleiro.com/mauricio/kmahjongg_svg.png
There are some issues that I need to solve regarding tile
spacing (they
need to be closer) and shadows, so this is not final yet.
The old
version (for comparison) uses a fixed pixmap tile size:
h
ttp://www.tabuleiro.com/mauricio/kmahjongg_old.png
I am happy with the results so far, and I hope I will be
able to merge
it into SVN in a couple of days. But I need some feedback
from you guys,
and Alberto specially, as he is listed as the current
maintainer (and
bug owner!)
The following bug (wish actually) will be addressed by the
new code, as
I am planning to make the window resizable, and scale the
background and
tiles accordingly:
http://bug
s.kde.org/show_bug.cgi?id=121960
However, there is a decision to be made. Would we still
support the
older tilesets, unmodified? Supporting the backgrounds is
easy, we could
still accept any png, jpg or svg file, with the option to
tile or scale
accordingly. The screenshot above shows a SVG background,
btw. Custom
layouts will also still be supported without modification.
But there are some issues supporting the older tileset files
as they
are, specially because they assume a fixed tile size. They
also do not
support resizing easily, since the code uses a fixed color
for
transparency, and as a consequence the existing tileset
graphics do not
use antialias. We can of course compose first and then
scale. Tiles will
look crappy, however. The code that generates shadows is
very good, but
it is not very flexible, so it is difficult to adapt it to
use tiles
with round corners for example, or for tiles of different
proportions.
I was hoping to clean up this older code, and start with a
more flexible
design, one that accepts png and svg, automatically using
the alpha
channel for transparency and shadows. I also plan to add
spacing, aspect
ratio and shadow information in an external .tileset file,
where the
name of the .svg or .png data will be listed along with
geometry
information. This would let the artist have more control
over the shape
of tiles and shadows. The code will also be easier to
maintain, since we
will switch to use QPainter for all blitting and will no
longer be
drawing shadows by setting pixel data in pixmap caches.
Of course, I would add code to detect if the user is trying
to load an
older tileset (specially in upgrade scenarios), and deal
with it
gracefully. But I would like your OK to go ahead with this
plan before I
rewrite the drawing code.
Also, there is an issue that can not be solved unless we
ditch the
current method and adopt a more flexible scheme for loading
themes,
tilesets and backgrounds. So this is one more reason to
change it.
Please read the bug at
http://bug
s.kde.org/show_bug.cgi?id=129469
I don't know if it is possible to solve this issue
completely, but my
plan was to ship only a default (new) tileset with the new
revision, and
at the same time implement the KNewStuff framework. I do not
know much
about it yet, but it apparently supports localization of
resources (or
should!) Then I plan to get the current legacy tileset art
(pirates and
default) and maybe wrap them as KNewStuff packages, so
people could
still get them if they want to, and if they do not mind the
scaling
artifacts.
How does this plan sound?
BTW, I plan to give the same treatment to Shisen-sho next
week,
converting it to use this new SVG tileset and background.
Maybe I can
add custom tileset support to it as well in the future, with
KNewStuff,
and put the resources in a shared location for both games.
Implementing
KNewStuff seems like a good task for Akademy, as I would
have the help
of kdelib guys if needed.
Regards,
Mauricio
_______________________________________________
kde-games-devel mailing list
kde-games-devel kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
| KMahjongg (almost) using SVG theme |

|
2006-08-22 05:39:50 |
> See a preliminar screenshot at
>
> h
ttp://www.tabuleiro.com/mauricio/kmahjongg_svg.png
The SVG version is much better than the old one.
> However, there is a decision to be made. Would we still
support the
> older tilesets, unmodified? Supporting the backgrounds
is easy, we could
> still accept any png, jpg or svg file, with the option
to tile or scale
> accordingly. The screenshot above shows a SVG
background, btw. Custom
> layouts will also still be supported without
modification.
>
> But there are some issues supporting the older tileset
files as they
> are, specially because they assume a fixed tile size.
They also do not
> support resizing easily, since the code uses a fixed
color for
> transparency, and as a consequence the existing tileset
graphics do not
> use antialias. We can of course compose first and then
scale. Tiles will
> look crappy, however. The code that generates shadows
is very good, but
> it is not very flexible, so it is difficult to adapt it
to use tiles
> with round corners for example, or for tiles of
different proportions.
>
If a compatibility mode is not an option because of
complexity I would
vote for SVG only. KDE4 will bring some major changes so I
think it's ok
to break backwards compatibility for KMahjongg. If someone
needs his
very special tileset he can still use the old version of
KMahjongg.
Greetz,
Alex
_______________________________________________
kde-games-devel mailing list
kde-games-devel kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
| KMahjongg (almost) using SVG theme |

|
2006-08-22 05:39:50 |
> See a preliminar screenshot at
>
> h
ttp://www.tabuleiro.com/mauricio/kmahjongg_svg.png
The SVG version is much better than the old one.
> However, there is a decision to be made. Would we still
support the
> older tilesets, unmodified? Supporting the backgrounds
is easy, we could
> still accept any png, jpg or svg file, with the option
to tile or scale
> accordingly. The screenshot above shows a SVG
background, btw. Custom
> layouts will also still be supported without
modification.
>
> But there are some issues supporting the older tileset
files as they
> are, specially because they assume a fixed tile size.
They also do not
> support resizing easily, since the code uses a fixed
color for
> transparency, and as a consequence the existing tileset
graphics do not
> use antialias. We can of course compose first and then
scale. Tiles will
> look crappy, however. The code that generates shadows
is very good, but
> it is not very flexible, so it is difficult to adapt it
to use tiles
> with round corners for example, or for tiles of
different proportions.
>
If a compatibility mode is not an option because of
complexity I would
vote for SVG only. KDE4 will bring some major changes so I
think it's ok
to break backwards compatibility for KMahjongg. If someone
needs his
very special tileset he can still use the old version of
KMahjongg.
Greetz,
Alex
_______________________________________________
kde-games-devel mailing list
kde-games-devel kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
| KMahjongg (almost) using SVG theme |

|
2006-08-22 13:57:39 |
On 8/22/06, A. Sopicki <nangkar gmx.info> wrote:
> > h
ttp://www.tabuleiro.com/mauricio/kmahjongg_svg.png
> The SVG version is much better than the old one.
Yes indeed! That is beautiful. Great work!
> > However, there is a decision to be made. Would we
still support the
> > older tilesets, unmodified? Supporting the
backgrounds is easy, we could
> > still accept any png, jpg or svg file, with the
option to tile or scale
> > accordingly. The screenshot above shows a SVG
background, btw. Custom
> > layouts will also still be supported without
modification.
> If a compatibility mode is not an option because of
complexity I would
> vote for SVG only. KDE4 will bring some major changes
so I think it's ok
> to break backwards compatibility for KMahjongg. If
someone needs his
> very special tileset he can still use the old version
of KMahjongg.
If it is easy to add crappy-scaling of the old graphics then
I think
it should be added so that the user can decide how choppy he
likes his
graphics. However
if it is too much of a pain I don't think
backward compatibility is worth it in this case. You already
mentioned
that you would add a user-warning and that's all I think
would be
necessary.
_______________________________________________
kde-games-devel mailing list
kde-games-devel kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
| KMahjongg (almost) using SVG theme |

|
2006-08-24 22:02:50 |
A Dimarts 22 Agost 2006 00:56, Mauricio Piacentini va
escriure:
> Hi, guys. It took more time than what I have predicted,
thanks to
> several incompatibilities while trying to get my
vectorial data into
> Inkscape, and exporting it in a way that could be
rendered cleanly by Qt
> SVG. We had to basically redo everything... But I am
almost done with
> the art and code to make KMahjongg use SVG to render
the tileset and
> background. See a preliminar screenshot at
>
> h
ttp://www.tabuleiro.com/mauricio/kmahjongg_svg.png
It looks gorgeous!!!
> There are some issues that I need to solve regarding
tile spacing (they
> need to be closer) and shadows, so this is not final
yet. The old
> version (for comparison) uses a fixed pixmap tile size:
>
> h
ttp://www.tabuleiro.com/mauricio/kmahjongg_old.png
>
> I am happy with the results so far, and I hope I will
be able to merge
> it into SVN in a couple of days. But I need some
feedback from you guys,
> and Alberto specially, as he is listed as the current
maintainer (and
> bug owner!)
Nitpicking (Albert)
Well, as i said it looks wonderful, and now, would you like
to become current
mantainer and bug owner?
I'm the current one because noone else was and i'm only
doing very low level
mainteinership (that is fixing a few easy bugs) so you seem
like a good
candidate for a new kmahjongg maintainer to me.
> The following bug (wish actually) will be addressed by
the new code, as
> I am planning to make the window resizable, and scale
the background and
> tiles accordingly:
>
> http://bug
s.kde.org/show_bug.cgi?id=121960
>
> However, there is a decision to be made. Would we still
support the
> older tilesets, unmodified? Supporting the backgrounds
is easy, we could
> still accept any png, jpg or svg file, with the option
to tile or scale
> accordingly. The screenshot above shows a SVG
background, btw. Custom
> layouts will also still be supported without
modification.
>
> But there are some issues supporting the older tileset
files as they
> are, specially because they assume a fixed tile size.
They also do not
> support resizing easily, since the code uses a fixed
color for
> transparency, and as a consequence the existing tileset
graphics do not
> use antialias. We can of course compose first and then
scale. Tiles will
> look crappy, however. The code that generates shadows
is very good, but
> it is not very flexible, so it is difficult to adapt it
to use tiles
> with round corners for example, or for tiles of
different proportions.
>
> I was hoping to clean up this older code, and start
with a more flexible
> design, one that accepts png and svg, automatically
using the alpha
> channel for transparency and shadows. I also plan to
add spacing, aspect
> ratio and shadow information in an external .tileset
file, where the
> name of the .svg or .png data will be listed along with
geometry
> information. This would let the artist have more
control over the shape
> of tiles and shadows. The code will also be easier to
maintain, since we
> will switch to use QPainter for all blitting and will
no longer be
> drawing shadows by setting pixel data in pixmap caches.
>
> Of course, I would add code to detect if the user is
trying to load an
> older tileset (specially in upgrade scenarios), and
deal with it
> gracefully. But I would like your OK to go ahead with
this plan before I
> rewrite the drawing code.
I would say the HUGE gain we get from having SVG tilesets is
good enough for
the lose we get, but if you want i (or you) can blog about
it and see what
people says, also contact Richard Lohman (mail on the web
page) maintainer of
http://game
s.kde.org/kmahjongg/index.html that will be happy to get
news from
you
> Also, there is an issue that can not be solved unless
we ditch the
> current method and adopt a more flexible scheme for
loading themes,
> tilesets and backgrounds. So this is one more reason to
change it.
> Please read the bug at
>
> http://bug
s.kde.org/show_bug.cgi?id=129469
>
> I don't know if it is possible to solve this issue
completely, but my
> plan was to ship only a default (new) tileset with the
new revision, and
> at the same time implement the KNewStuff framework. I
do not know much
> about it yet, but it apparently supports localization
of resources (or
> should!)
Yes, it supports localization but was not very good AFAIK,
maybe Josef has
fixed it, you can contact him at spillner AT kde DOT org
(Josef is knewstuff
creator and mantainer) (or was :-D)
> Then I plan to get the current legacy tileset art
(pirates and
> default) and maybe wrap them as KNewStuff packages, so
people could
> still get them if they want to, and if they do not mind
the scaling
> artifacts.
>
> How does this plan sound?
Good.
> BTW, I plan to give the same treatment to Shisen-sho
next week,
> converting it to use this new SVG tileset and
background. Maybe I can
> add custom tileset support to it as well in the future,
with KNewStuff,
> and put the resources in a shared location for both
games. Implementing
> KNewStuff seems like a good task for Akademy, as I
would have the help
> of kdelib guys if needed.
Go Go Go!
Albert
>
> Regards,
> Mauricio
>
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
_______________________________________________
kde-games-devel mailing list
kde-games-devel kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
| KMahjongg (almost) using SVG theme |

|
2006-08-24 23:40:00 |
> It looks gorgeous!!!
Glad you liked it! I updated it slightly today, got some
feedback from my
wife regarding the shadows, as the previous one was a bit
thin and too
strong.
> Nitpicking (Albert)
Sorry for that. I have several friends named Alberto here in
Brazil, it is
the most common form of the name in Portuguese...
> Well, as i said it looks wonderful, and now, would you
like to become
> current
> mantainer and bug owner?
> I'm the current one because noone else was and i'm
only doing very low
> level
> mainteinership (that is fixing a few easy bugs) so you
seem like a good
> candidate for a new kmahjongg maintainer to me.
I would be glad to. I know you are quite involved in other
parts of kde,
and I think it could be a good way for me to get more
familiar with
bugzilla and the general issues related to maintaining code
in the KDE
tree.
> I would say the HUGE gain we get from having SVG
tilesets is good enough
> for
> the lose we get, but if you want i (or you) can blog
about it and see what
> people says, also contact Richard Lohman (mail on the
web page) maintainer
> of
> http://game
s.kde.org/kmahjongg/index.html that will be happy to get
news
> from
> you
Good idea. I will contact Richard and ask for his help on
this. There are
some tilesets available in the KMahjongg page, maybe we can
even already
adapt them to SVG format (without too much work, simply
embedding the
bitmaps) so users will not lose anything.
>as to ship only a default (new) tileset with the new
revision, and
>> at the same time implement the KNewStuff framework.
I do not know much
>> about it yet, but it apparently supports
localization of resources (or
>> should!)
>
> Yes, it supports localization but was not very good
AFAIK, maybe Josef has
> fixed it, you can contact him at spillner AT kde DOT
org (Josef is
> knewstuff
> creator and mantainer) (or was :-D)
OK, I did not know that. Well, since Josef is involved in
the BoF meeting
at Akademy this is just perfect. I will bug him about this
in Dublin
I see that you are going as well, looking forward for the
opportunity to
meet you guys there.
Regards,
Mauricio
_______________________________________________
kde-games-devel mailing list
kde-games-devel kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
|
|
[1-6]
|
|