Author Topic: Writing a game overlay  (Read 4222 times)

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Writing a game overlay
« on: April 23, 2009, 10:39:20 AM »
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.

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Writing a game overlay
« Reply #1 on: April 23, 2009, 10:43:53 AM »
Garrett is looking into doing this for an application he's working on, but just for OpenGL and more specifically DP.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Writing a game overlay
« Reply #2 on: April 23, 2009, 11:30:16 AM »
Garrett is using Java though (at least, starting off).

Garrett

  • Autococker
  • Posts: 1372
Re: Writing a game overlay
« Reply #3 on: April 23, 2009, 02: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.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Writing a game overlay
« Reply #4 on: April 23, 2009, 04:56:39 PM »
DirectX is sort of the deal breaker for me, but its API doesn't look simple or fun.

Garrett

  • Autococker
  • Posts: 1372
Re: Writing a game overlay
« Reply #5 on: April 23, 2009, 05:14:55 PM »
Is your overlay for a chat client? Is it for many different games?

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Writing a game overlay
« Reply #6 on: April 23, 2009, 05:19:12 PM »
Many different games.

eMo

  • VM-68
  • Posts: 184
Re: Writing a game overlay
« Reply #7 on: April 23, 2009, 07:39:56 PM »
like a  vent overlay?