Digital Paint Discussion Board

Digital Paint Community => Other Stuff => Topic started by: sk89q on April 23, 2009, 12:39:20 PM

Title: Writing a game overlay
Post by: sk89q on April 23, 2009, 12:39:20 PM
I was wondering if anyone here knew how to go about creating a game overlay like XFire, Steam, or PlayXPert. I've wanted to for a while now, but I have no grasp of the OpenGL and DirectX APIs.

I know that you have to hook into both OpenGL and DirectX for each draw in order to overlay stuff. For Vista, because the API changed with DirectX 10, you have to write code to target both pre-DX 10 and DX 10 systems (non-Vista vs. Vista).

To make matters worse, I'm trying to do this from Python, but I don't think it's possible given the DirectX and OpenGL libraries available for Python. In which case, that means I would have to build an external component and then integrate it into Python.

OpenGL code: http://www.idevgames.com/forum/showthread.php?t=16597 (not that I have an idea on how to actually hook that function in)

In DirectX pre-10, you are supposedly able to hook in with EndScene. Starting in 10, Microsoft separated the API a bit and now you will have to use D3D10CreateDeviceAndSwapChain and create a swap chain to do the overlay. I don't have links to the API docs because I didn't bookmark them when I was researching this two weeks ago.
Title: Re: Writing a game overlay
Post by: ViciouZ on April 23, 2009, 12:43:53 PM
Garrett is looking into doing this for an application he's working on, but just for OpenGL and more specifically DP.
Title: Re: Writing a game overlay
Post by: Zorchenhimer on April 23, 2009, 01:30:16 PM
Garrett is using Java though (at least, starting off).
Title: Re: Writing a game overlay
Post by: Garrett on April 23, 2009, 04:19:31 PM
Java has library bindings for both directx and opengl.  I have just started researching how to draw these overlays.  Java also has bindings to python so let me know if I can help you.
Title: Re: Writing a game overlay
Post by: sk89q on April 23, 2009, 06:56:39 PM
DirectX is sort of the deal breaker for me, but its API doesn't look simple or fun.
Title: Re: Writing a game overlay
Post by: Garrett on April 23, 2009, 07:14:55 PM
Is your overlay for a chat client? Is it for many different games?
Title: Re: Writing a game overlay
Post by: sk89q on April 23, 2009, 07:19:12 PM
Many different games.
Title: Re: Writing a game overlay
Post by: eMo on April 23, 2009, 09:39:56 PM
like a  vent overlay?