From kde-games-devel Thu May 17 00:50:39 2007 From: Henrique Pinto Date: Thu, 17 May 2007 00:50:39 +0000 To: kde-games-devel Subject: Re: [Kde-games-devel] Klickety in KDE4 Message-Id: <200705162150.39541.tawhaki () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-games-devel&m=117936309929879 On Wed 16 May 2007 21:43, Fabiano Sant'Ana wrote: > The approach I see to that is to implement one way to choose the theme > from console, each theme has it own configurations and high scores > (cause the points system from klickety and ksame differs too much). > There is anyway to themes do that? > Or should we create "engines" like amarok do for scripts and put the > klickety behavior inside that? Or should we just implement it hard coded > and then the themes just change the pieces layout - and the users can > play klickety using ksame pieces and vice-versa? (the last for me seems > to be the best way...) I think a 'theme' would have to have: * An SVG file describing the appearance * High Score Tables * A formula for calculating the score * Number of colors and size of the board I believe the best approach, at least for the start, would be to have a class for each game 'theme', deriving from a base class. Each class would override a "score" method to calculate the game score, and set the number of colors, size of the board and SVG theme file accordingly. I don't remember exactly how the highscore system works, but you should probably be able to provide a highscore table as a member of the class, too. In the future, if there is any need, we can use Kross or QtScript for creating the score calculation funcion in a scripting language, but I'm not sure if such a thing would be actually useful. What do you think? -- Henrique Pinto tawhaki@gmail.com _______________________________________________ kde-games-devel mailing list kde-games-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-games-devel