Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overlay Electron

I am wondering if it is possible to overlay an application made in electron over a game. essentially similar to how steam overlays in games.

I want this because we have made a timer web app that times tasks and are debating making it an overlay if possible. to time certain events in games that reoccur

I have no idea if this can be achieved but it is something high on our list. Any example of how this can be achieved or has anyone done this before.

Thanks,

Kieran

like image 861
Kieranmv95 Avatar asked Feb 24 '16 17:02

Kieranmv95


1 Answers

To draw overlay in a game, you need hook Direct3D or OpenGL api according to which the game use.

And before present call(in D3D), you can draw your own stuff on a swapchain surface.

To control a overlay window in game, you need use Windows message hook and some other stuff.

And you should carefully manage all the windows in your program that draws in game.

There is a hook project Direct3DHook, it's written in C#, but it will be easy to write in C++.

If you want to write a good overlay engine, there will be plenty details to consider.

Overwolf is a overlay app platform, I write an overlay project at work which took about two month to be something approximate.

I have written a project, https://github.com/hiitiger/goverlay.

like image 117
hiitiger Avatar answered Nov 01 '22 08:11

hiitiger