[Kde-games-devel] QCanvas replacement?
Ralf Schmelter
kde-games-devel@mail.kde.org
Fri, 4 Oct 2002 15:16:23 +0200
Hello again,
> > - do we need to have multiple views of the canvas?
>
> I don't know if it's possible to share the QCanvas object to different
> clients but if could it's a great thing to have (in WC-like game for
> exampl or a football one) the same map ans sprites, images... for all
> players to view their own camera... see what I mean?. Even a split scre=
en
> feature is easy to do!
Yes, QCanvas can do this for you. You can have as many QCanvasViews per=20
QCanvas as you like (and your machine is able to process), all with diffe=
rent=20
views (position, scaling etc.) of the canvas.
> > - do we have to support scaling and/or rotating for
> > every sprite?
>
> I don't think so. Rotating and scaling could be separated and there cou=
ld
> be sprites wich don't need them but just with a flag on their propertie=
s
> the time will be saved enough just by checking it, isn't it?.
That will work if only some sprites are rotated (which should not impose =
such=20
a big problem), but if we rotate the view ... that's probably something w=
e=20
should avaoid, because it will not perform except for OpenGL.
> In console
> development Sprites are sorted by a category i.e. in GBA there are 128
> sprites and for rotating-scalling they are grouped by 128/32 groups. Bu=
t
> what your'e speaking is to do a general purpose library and not a fully
> arcade oriented...
Yes, it should support more than acarde games if possible.
> > - do we have to include text (probably) and other graphical primitive=
s
> > and
> > if
> > yes, to we convert them just into sprites?
>
> what about text layers? and bitmap layers? if theres a background image
> there's no need of a mmmh.. parallax map, just put the image and repeat
> it. If there must be text I'm sure it will be on topmost layer...
If this is really the case, then we might be able to draw directly in the=
=20
widget in the OpenGL case (it is derived from QWidget, so maybe this work=
s,=20
but I haven't checked).
> > - what
> > kind of backends to we want (OpenGL, XRender, QCanvas, SDL)?
> >- should we give the game some hints about expected performance if it
> >uses
> >some feature, so that it can decide not to use it, if it is not
> >absolutely
> >nescessary (e.g. to use a simple alpha mask instead of full alpha
> >blending)?
>
> I've checked the alpha from QCancas and never worked to me or my friend=
s.
> It allwais paints a pixel yes and one not so the draw seem blurrrrrr...=
=20
Yes, that's true. The best thing you can do is dither the alpha channel w=
hen=20
converting from the image to the pixmap. But it doesn't looks good either=
=2E
> If not supported could be used that but other features as rotating and
> scalling if not supported should give a message as "Don't try the game,=
it
> wont work!".
Or maybe the game you just switch some of the eye candy of, if that is=20
possible.
Ralf