Results 1 to 8 of 8

Thread: openGL Overlay

  1. #1
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default openGL Overlay

    For my scapp system and mainly for the upcoming scapp client I'm in need for an overlay solution.

    It should perform some basic tasks while being ingame (fullscreen) like showing a list of players, kick, ban, get some info, doing rcon, chatting with other scapp users.

    The ideal case for me would be to have a dll which I can send my drawings too (in what ever gui subsystem) and the dll will perform the ingame overlay and send back user interactions (mouse keyboard) back to my application.

    I'm quite a while doing research for these topics but haven't found an easy to use solution yet and there seems to be several different approaches floating around (however not much source code) like using an own driver (http://www.playxpert.com/web/guest/home), several other tools (fraps, xfire, steam, ts3overlay http://ts3overlay.r-dev.de/) and the mumble overlay.

    As for the moment I would go with separating the overlay solution which mumble offers, since its open-source, however its on the first sight not that easy (at least for me), but an advantage would be that it could also be used for nix/mac.

    Does anyone here can give me a guidance here how to proceed, or even better, does know a ready to use solution for this ?
    What are the steps I need to take from my .Net application ? (What drawing operations I need to do, and how, needs that to be bitmaps ?)

    I believe such a solution / dll could also be used for the nescessarily patch ingame administration.

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Joto,

    If scapp is made to interact with MOHAA, then why not use the client game wrapper?
    With most of the basic clientside and serverside stuff reversed, you can use a custom UI in the game using engine functions. This will be much more effective than OGL because OGL can be laggy when you're rendering stuff on screen.

    I wrote a tutorial and posted it on GD & TMT about how to make a menu using the cgamex wrapper.
    If you already have scapp functioning with MOHAA and it's able to communicate then just use the engine functions to create your UI. You'll be able to make buttons for menus and other things. A chat box may be a bit hard, but perhaps you can figure out a way to integrate it with MOHAA's ingame chat.
    You can setup a cvar like scapp_chat 1
    if it's enabled then it makes MOHAA's ingame chat communicate with the scapp host, otherwise if the cvar is set to 0 then it'll be a standard ingame messaging system like we're used to.

    Just something to ponder. Not sure if that's what you're after.

    Anywho, here is the thread I made on GD: http://www.gamedeception.net/threads...fixid=Tutorial
    okidoki also posted his technique. It's ALOT easier now that we have so much source code reversed and the technique is just as effective as what I mentioned above.

    Here is the end result of the widgets I created:
    http://x-null.net/version/menu.JPG

    you can use bitblt for bitmaps

    I do something like this
    Code:
    HBITMAP bitmap1 = (HBITMAP)LoadImage(NULL,"bitmap1.bmp", IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
    
    SendMessage(myBox,STM_SETIMAGE, (WPARAM)IMAGE_BITMAP,(LPARAM)bitmap1);
    It may be a little different for MOHAA. This is using Win32 API for a standard Windows App. Obviously for *nix the syntax for loading bitmaps will be different, I'm just not sure.

    I hope this is some food for thought though and that it's a bit helpful.

  3. #3
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default

    Hi James,
    Because scapp system is basically game independent (with favour on mohaa ofc) I need a generic approach here, using the UI system of mohaa with a wrapper will certainly work for some scenarios but its not flexible enough and not extensible enough for future needs (think of overlaying a webbrowser window ala xfire, or something I personally would more prefer a control for music player).

    Basicly the overlay system will be something like that I can provide any window to the library, and in a second layer those windows are translated / injected into the opengl / directx system (only opengl for the beginning, later d3d).

    I am not sure if the overlay mumble uses is following this generic window approach, they are talking of Qt widgets there, but atm this would be the system I would utilize for scapp, only problem is the source code that is responsible for the overlay makes me headaches, I am wether a Qt expert nor opengl

  4. #4

  5. #5
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default

    Yes, saw them allready, unfortunately they not working, the DirectDraw lib is not working properly, the example on codeproject does not work for full screen games, but thanks for your efforts.

    I have attached the mumble source code for anybody who is curious.
    Attached Files Attached Files

  6. #6
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    The thing is you will need to create a proxy DLL, pretty the same that cheats use, and then write classes for windows, buttons etc. = a lot of work

    + you will have to do this in C/C++, because it's not good to inject managed code (.NET / any IL ) to native code.

    Check this out:

    http://www.gamedeception.net/threads...ghlight=AbsoUI

    You will however need to fit it to your needs anyway.

  7. #7
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default

    Thanks, I will check that out and see if I can use it for my needs, on a first sight looks promising.
    C/C++ or Qt is not the problem (Coding languages are just tools ), the problem is the *time* needed for it, as the whole overlay stuff is non-trivial it would take some, so I try to figure out what would be the best road to go.
    The options so far are:
    - extracting the mumble overlay source code and create a proxy dll
    - creating a widget (in .Net) for playexpert
    - using a proxy website which can be called from ingame by xfire
    - licencing overlay from a overlay vendor
    - asking the ts3 overlay creator to provide a plugin for scapp system
    - creating own overlay from scratch using opengl / directx hooking
    - creating own overlay from scratch using driver / ddi level
    - using AbsoUi

    basically the widgets provided in Absos gui would allready be sufficient for my needs, so will def check that out.

  8. #8
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    + it's already for DirectX and OGL. It allows you to build menus based on simple XML. The question is if this will be enough, or will you need to do more to actually use it.

    There is also a absoUI for Half-Life so you could look how it was implemented into the game, to give you a better idea.

    http://www.gamedeception.net/threads...ghlight=absoui

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •