The article issued in the past period "QQ game plug-in production tutorial (touching)" mainly expounds the current working principle of QQ game plug-in.
Recently, I received some netizens' emails, asked some of these details. Mainly about the problem of coordinates and color of some points in the game. Let me talk about the analysis of the game:
First, the acquisition of coordinate points:
The acquisition of the coordinate point is the method of using the netizen conan:
First, a screenshot of the game. After activating the game window, use Alt PrintScreen (this can only be cut with the current active window).
Open the drawing table, paste the intercepted picture on the drawing board. Click on the magnifying glass to enlarge the picture, (generally put it 6X) Observing the status bar of the drawing sheet is the coordinate of the mouse. As shown in Figure (1) "176, 102" in the status bar is the coordinate of the game screen, the coordinate of the red dot (the upper corner coordinate of the game area). With the same method, plus a simple addition or subtraction can be used to derive the size of 48 * 48 pixels.
Note: The coordinates shown here are coordinates with respect to the game window (ie, the left upper corner coordinates of the screenshots are (0, 0), not the coordinates of the full screen.
Second, the color of a point:
"QQ game plug-in manufacturing tutorial (on touch)" method to determine if the method of the square can be used to obtain the color of a point in the game window to establish a square matrix. There is such a code in the program:
If color1 = 16777215 And color2 = 16777215 Then .type = PandaIf color1 = 2097151 And color2 = 1353909 Then .type = ChickenIf color1 = 4473924 And color2 = 14209230 Then .type = DogIf color1 = 13828048 And color2 = 3862322 Then .type = FrogIf color1 = 8623264 and color2 = 5805536 Then .type = monkeyif color1 = 10921638 and color2 = 9408399 Then .type = Catif Color1 = 15398649 and color2 = 1655140 Then .type = OX
Among them, 16777215, 2097151 ... These are color values obtained with GetPixel. About this value, you can use the getColor function in the program, it will not be repeated here.
Description: The color value obtained here is obtained when the display color is 32 bits. If the value obtained under 16-bit or other colors is different. If you want to make the plug-in fit, you can run normally under the quality of the various colors, you can get color under multiple color quality, or take other algorithms to determine whether the square can be eliminated.
If there is more questions, please contact me. I will continue to add Terry6395@yahoo.com in this article.
Please indicate the source: Copyright (a) Cyril 405 Studio