~eliasnaur/gio

Mailing list for the Gio project for discussion and patches.

Send your message to ~eliasnaur/gio@lists.sr.ht. No account is required and you can post without being subscribed.

1

Potential for games programming

Adam Stringer
Details
Message ID
<CAMFH0r1tnSOJ8TU-B-S8oc=vfD0fhUhS7-mzD_CkDEi0Q-rz0g@mail.gmail.com>
DKIM signature
pass
Download raw message
Thank you for the amazing library! I was wondering what you think
about someone considering using the Gio library for games programming
(I am considering making my wife a cute bunny themed game). The game
would be a simple isometric-esk style 2D affair which will be made up
pretty much entirely of sprite images.

From the way that the library currently is laid out I would consider
it to be already perfectly placed for this use case, with the infinite
loop and how receiving and processing events works, for example. I am
aware of one potential game stopping (lol) issue with the rendering
system in that are images drawn with alpha channels included? So
basically is it possible to draw images with transparent areas on top
of each other? I confess I haven't looked into this at all, I would
assume this is a given and I apologise if the answer is obvious.

--
tauraamui
Details
Message ID
<BWVJB4V7S7UO.FFZIP46K5BU6@testmac>
In-Reply-To
<CAMFH0r1tnSOJ8TU-B-S8oc=vfD0fhUhS7-mzD_CkDEi0Q-rz0g@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
On Sun Sep 8, 2019 at 9:33 PM Adam Stringer wrote:
> Thank you for the amazing library! I was wondering what you think
> about someone considering using the Gio library for games programming
> (I am considering making my wife a cute bunny themed game). The game
> would be a simple isometric-esk style 2D affair which will be made up
> pretty much entirely of sprite images.
> 

Games is definitely a use case I'm thinking about, but it's not a top
priority. FWIW, immediate mode UIs are frequently used for game UIs; see
for example the C++ Dear ImGUI library.

That said, if you only need to handle input and draw sprites Gio
should serve you well. You can also use the ui/paint.PathBuilder and
ClipOp API to perform GPU accelerated clipping to shapes consisting of
(2nd or 3rd order) B├ęzier curves.

> I am
> aware of one potential game stopping (lol) issue with the rendering
> system in that are images drawn with alpha channels included? So
> basically is it possible to draw images with transparent areas on top
> of each other? I confess I haven't looked into this at all, I would
> assume this is a given and I apologise if the answer is obvious.
> 

It is possible; the ui/paint.ImageOp operation supports all
image.Images, including images with transparent areas.

-- elias