[Kde-games-devel] Proposing KGameRenderer

Stefan Majewsky kdemailinglists at bethselamin.de
Thu Jun 17 09:37:33 CEST 2010


On Thursday 17 June 2010 00:50:17 Ian Wadham wrote:
> On Thursday 17 June 2010 4:00:26 am Parker Coates wrote:
> > Okay, now I *really* object to using the word "sprite". :D Since this
> > class could be doing practically anything, I hardly think the word
> > sprite is appropriate anymore. Maybe something nice and abstract like
> > KGameRendererClient? I don't really know. Is your intention to make
> > KGameRenderedItem inherit from this class? I think that would make the
> > most sense.
> 
> I have not been following this closely, but may I suggest something like
> Pic or Graphic instead of Sprite?
> 
> BTW, what is "nice" about "abstract"? ... :-)  The more generic names
> become, the more they drain away meaning and the harder code becomes to
> read.

As a compromise that also summarizes nicely the new implementation style, I 
have chosen "KGameRendererClient". A client is an object that defines a sprite 
key, frame index and render size, and recieves pixmaps from the renderer 
whenever necessary. The KGameRenderedItem is a subclass of this client (so it 
actually has three base classes now: QObject, QGraphicsPixmapItem, 
KGameRendererClient). All API and nearly all code from the item has been moved 
to the client class.

This change is only in my Git currently (see one of my last mails), I will 
update the ReviewBoard diff when I got around to adding boundsOnElement().

Greetings
Stefan


More information about the kde-games-devel mailing list