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 


[C++] Drawing over maple/gunbound

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Wed Jan 28, 2009 2:28 pm    Post subject: [C++] Drawing over maple/gunbound Reply with quote

Ok my problem is that the screen keeps updating, and it lags to use a while statement.... is there anyway to keep the line ON top?

im using..

HDC hdc = CreateDC("DISPLAY", NULL, NULL, NULL);

I know it gets the display but i have nothing better to use...

_________________
Back to top
View user's profile Send private message
FerrisBuellerYourMyHero
Master Cheater
Reputation: 0

Joined: 14 Feb 2007
Posts: 401
Location: Inside your <kernel>

PostPosted: Wed Jan 28, 2009 2:45 pm    Post subject: Reply with quote

See the problem is that the game draws right over it, then you draw over the game, the game draws back over it, etc, etc..

It creates a flickering effect which looks bad!

The only way to prevent the flicker is to hook the games drawing loop, as in a directx hook. But then if your hooking directx you might as well use directx to draw what you want to draw!

In this way your forcing the game's drawing loop to draw your drawing, which makes it look like its part of the game and their is absolutely no flicker! Draw in EndScene right before calling the real EndScene. Because whatever is drawn last will be on top of everything else, which is what you want.

_________________
You know, life moves pretty fast. If you don't stop and look around once in a while, You could miss it!

Back to top
View user's profile Send private message MSN Messenger
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Wed Jan 28, 2009 3:37 pm    Post subject: Reply with quote

As you might have noticed, im using C++...

so do you know any way to do this with C++ and if u do

can u show me an example?

_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jan 28, 2009 3:44 pm    Post subject: Reply with quote

If you want to draw over it with GDI, find a good place in the render loop to jump to your drawing routine, and do it there. You shouldn't get flickering.
Back to top
View user's profile Send private message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Wed Jan 28, 2009 3:46 pm    Post subject: Reply with quote

slovach wrote:
If you want to draw over it with GDI, find a good place in the render loop to jump to your drawing routine, and do it there. You shouldn't get flickering.


What's a render loop? and post an example plz. I can't do anything without seeing it first. thats just me >.>

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Jan 28, 2009 4:14 pm    Post subject: Reply with quote

The render loop is the loop that draw's all the games graphics... Where it draw's all its frames, sprites, etc.

And no one will post an example since you asked for 2 specific games.
Learn yourself.

_________________
Back to top
View user's profile Send private message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Wed Jan 28, 2009 4:16 pm    Post subject: Reply with quote

... i meant like a tut.... nvm
_________________
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Wed Jan 28, 2009 5:38 pm    Post subject: Reply with quote

alternitivly you could Window the game into another window and not allow it to draw to the whole window..

i can give u the keys.. you must open the door.. Smile

regards BanMe

p.s. the keys are SetWindowParent() SetWindowLong() .. i wrote a utility in autoit back when Survival Project was around called Banimizer that did just this.. search the autoit forums for MSCPorts.. Wink
Back to top
View user's profile Send private message MSN Messenger
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Jan 28, 2009 6:20 pm    Post subject: Reply with quote

Hooking Direct3D Creates the best performance. The others create laggy crap. I made one using win gdi32 and it flickers... So hook D3D.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jan 28, 2009 7:02 pm    Post subject: Reply with quote

dnsi0 wrote:
Hooking Direct3D Creates the best performance. The others create laggy crap. I made one using win gdi32 and it flickers... So hook D3D.


Refer to my post above.

I did that in COD4 some time ago, it worked fine, and there was essentially no flickering.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Jan 28, 2009 7:11 pm    Post subject: Reply with quote

slovach wrote:
dnsi0 wrote:
Hooking Direct3D Creates the best performance. The others create laggy crap. I made one using win gdi32 and it flickers... So hook D3D.


Refer to my post above.

I did that in COD4 some time ago, it worked fine, and there was essentially no flickering.


Then I must have made something wrong with my code...
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Wed Jan 28, 2009 9:19 pm    Post subject: Reply with quote

if you are on a MP system like i am you can assign threads to CPU's thus avoiding flickering..

regards BanMe..
Back to top
View user's profile Send private message MSN Messenger
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Thu Jan 29, 2009 4:41 pm    Post subject: Reply with quote

New Question: How do i sense a click? o.O
_________________
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Jan 29, 2009 5:58 pm    Post subject: Reply with quote

Not sure if this helps, but I remember this a while ago.

http://forum.cheatengine.org/viewtopic.php?t=297892&postdays=0&postorder=asc&start=0

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Thu Jan 29, 2009 6:08 pm    Post subject: Reply with quote

Quote:
GetAsyncKeyState()

Alternatively you can hook the WndProc.

_________________
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