Running wayland inside something other than monitors.

Pekka Paalanen ppaalanen at gmail.com
Wed Jul 23 23:51:04 PDT 2014


On Wed, 23 Jul 2014 22:23:38 +0200
Kalrish Bäakjen <kalrish.antrax at gmail.com> wrote:

> I had the same idea, and asked in StackExchange whether it would be
> possible [1]. Even after reading the answers, the idea is flying in my
> mind. I am not an experienced programmer, but am anyway interested in this,
> so please tell me if you get anything.
> 
> Regards,
> KB
> 
> 1:
> http://gamedev.stackexchange.com/questions/79485/is-video-compositing-feasible

Umm... well, if the elements drawn in other processes than the main one
do not need to be accurately frame-synchronized to the main process'
output, this could certainly work. But if you do need exact
synchronization, the split to multiple processes will likely just hurt,
I believe.

With that assumption, you could very well use Wayland as the IPC there.
You probably want to replace the xdg_shell family of protocol
extensions with your own game-specific one that models your game
UI concepts better, but that also loses the option of running unmodified
toolkits or apps as Wayland clients to your game.

As to would all that really be worth it, it is quite hard for me to
imagine the benefits. An unmodified toolkit designed for desktop might
stick out from your game UI like a sore thumb, or maybe not if properly
themed... I don't know.

Technically it is all possible, but the benefits are unclear and depend
on case by case, IMHO. You would first need the game before you build
the tech. "Don't start with a framework, start with an actual game
and see if a framework falls out of it (after you have written your
Nth game)"... *shrug*

For prototyping, you could just have the additional processes as normal
graphical apps and see how it works, play your game in a window with
the other windows around, like the old Gimp UI style. That saves you the
effort of writing a Wayland compositor inside your game until you see
it would actually be good.


Thanks,
pq


> On Wed, Jul 23, 2014 at 8:08 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> 
> > On Tue, 22 Jul 2014 23:24:35 -0400
> > Kyle Siefring <kyle.siefring at verizon.net> wrote:
> >
> > > I've seen a few GUIs implemented in video games and they always suck.
> > > I'm curious as to how one could get qt/gtk/ect running inside SDL. Would
> > > it be practical to pile a modified Wayland and a modified toolkit
> > > running inside SDL to get this effect?
> > >
> > > I don't want to dive into a bunch of unfamiliar C so I probably won't do
> > > this anytime soon, but I just want to know.
> >
> > Well, it would be perfectly possible to have your game act as a Wayland
> > compositor. You could then run even unmodified Wayland apps, and present
> > them inside your game. I'm not sure if that is what you are after
> > though, but it could be a way to get those popular toolkits into use
> > for your game with mostly the effort of implementing a Wayland
> > compositor for desktop protocols and not modifying the toolkits at all.



More information about the wayland-devel mailing list