| View previous topic :: View next topic |
| Author |
Message |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Dec 16, 2011 3:16 am Post subject: graphics overlay |
|
|
Ok so here's what I want to do:
Create two points on the screen anchored to a window (800x600 program and I want points at like 40,50 and 40,80 for example, constrained to that window) and I want to trace a red ray from those two points using the cursor to set the angle.
I want these rays to stop when they hit the walls of a set field (say the edges of the window) and reflect once.
Essentially a mouse guide for a bubble break game, except it has to be an overlaying application instead of coded in.
So I need to know how to render these lines over a game without interfering with the mouse click.
What language should I pick?
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8585 Location: 127.0.0.1
|
Posted: Fri Dec 16, 2011 8:37 am Post subject: Re: graphics overlay |
|
|
| Cryoma wrote: |
What language should I pick?
|
Any language that can access Win32 API will work.
Some of the API you will probably need to look into:
- GetWindowRect
- GetClientRect
- GetCursorPos
- ScreenToClient
For drawing onto the window you'll need to pick a rendering method
- GDI
- GDI+
- Direct3D
- OpenGL
- etc.
Up to you which to pick for everything, it might be easier to hook the games rendering method and draw with that instead. Look around for external hacks though, there's a bunch for FPS games that you can find with sources included to get a start on what to do. Most are done with C++.
_________________
- Retired. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 473
Joined: 09 May 2003 Posts: 25899 Location: The netherlands
|
Posted: Fri Dec 16, 2011 9:17 am Post subject: |
|
|
Fullscreen or windowed ?
And do you care if clicking on a image blocks the mousemove or not?
If it's windowed and you don't care, look into window regions and give the window the same shape as the drawing
if fullscreen find out how it renders and hook that (d3d, opengl, gdiEx, etc...)
if windowed and you do want to click in the graphics, look into passing the mouse event messages down to the window behind it
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Dec 16, 2011 11:20 pm Post subject: |
|
|
It's a windowed java game, and it patches any files you try to change which is why I need to do an overlay.
| Quote: | | if windowed and you do want to click in the graphics, look into passing the mouse event messages down to the window behind it |
Never even thought of that thanks.
|
|
| Back to top |
|
 |
chASM Newbie cheater
Reputation: 0
Joined: 23 Jun 2011 Posts: 17
|
Posted: Sun Dec 18, 2011 2:45 pm Post subject: |
|
|
| Cryoma wrote: | It's a windowed java game, and it patches any files you try to change which is why I need to do an overlay.
| Quote: | | if windowed and you do want to click in the graphics, look into passing the mouse event messages down to the window behind it |
Never even thought of that thanks. |
Under Windows, it should not matter which programming language is used. Even a VM based intermediate language like Java needs to use Windows functionality to draw to the screen. The API used depends on the game.
In the case of Java I will assume that is not using DirectX but more likely straight GDI or GDI Plus. No idea what it would use under Linux, usually OpenGL but I am sure Linux has its GDI (plus) counterparts as well.
As for API hooking, CE has plenty of functionality for that and plenty of information on these forums on how to perform such hooks. Hell, look at Dark Byte's code and you can learn how to code them yourself (albeit that Dark Byte's code is somewhat verbose in places, but that only makes it easier to understand I guess).
Regards,
chASM
|
|
| Back to top |
|
 |
|