Jump to content

Simple Overlay Program

Krocket

2x2 pixels (or whatever I hope to edit it later) centered on my screen which will invert every color behind it. I currently use a program where I can upload any image to it and it will overlay on my primary monitor so I can use that image as my crosshair in all my main games, but I'd like to figure out how to create a simple program to do that on my own which I could add inversion to. Minecraft has something similar to this, whatever you look at the crosshair will show a little of what's behind it and it's inverted color.

 

Sorry if that was confusing

Link to comment
Share on other sites

Link to post
Share on other sites

Well I had a quick look and found a few things. Not paying attention to the language implementation specifically just the principals of what's going on. See if anything looks interesting to you. I certainly haven't had the time to actually go ahead and play with anything.

 

http://stackoverflow.com/questions/18141976/how-to-invert-an-rgb-color-in-integer-form

http://stackoverflow.com/questions/1165107/how-do-i-invert-a-colour-color-c-net

http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion%5Ffrom%5FRGB%5Fto%5FHSL%5For%5FHSV

http://stackoverflow.com/questions/541331/effective-way-of-making-negative-of-image-without-external-dlls

 

Your other option of course is to take a look in the Minecraft source code (since you've seen what you want there), I can't personally remember if the crosshair code is obfuscated or not. I do seem to recall that the GUI isn't so you might well be in luck.

The single biggest problem in communication is the illusion that it has taken place.

Link to comment
Share on other sites

Link to post
Share on other sites

Some anti cheat programmes may check for an overlay and will ban/kick you from the game.

If you still want to proceed seach for "external overlay c++" to find out more about drawing an overlay.

Then do something like this:

for each frame  Get pixel color in the center of the screen.  Invert color.  Draw lines using inverted color.

Hope this helps.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×