[Kde-games-devel] Klickety in KDE4

Henrique Pinto tawhaki at gmail.com
Thu May 17 02:50:39 CEST 2007


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 at gmail.com


More information about the kde-games-devel mailing list