Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


graphics overlay

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Fri Dec 16, 2011 3:16 am    Post subject: graphics overlay Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Fri Dec 16, 2011 8:37 am    Post subject: Re: graphics overlay Reply with quote

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
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 473

Joined: 09 May 2003
Posts: 25899
Location: The netherlands

PostPosted: Fri Dec 16, 2011 9:17 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Cryoma
Member of the Year
Reputation: 198

Joined: 14 Jan 2009
Posts: 1819

PostPosted: Fri Dec 16, 2011 11:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
chASM
Newbie cheater
Reputation: 0

Joined: 23 Jun 2011
Posts: 17

PostPosted: Sun Dec 18, 2011 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites