Monday, March 31, 2014

Android Programming With the Google+ API Overview

Since its launch in 2011 Google+ has gained a reputation and following that seems to be growing by leaps and bounds. As more traffic jumps on the Google+ bandwagon; more and more developers are looking for ways to incorporate Google+ functionality into their apps.

This article discusses concepts and tools associated with developing Android applications that use the Google+ API to: 
  • Present Google+ log-in and Consent Form to users;
  • Create Google+ posts;
  • Access and use user activity data (such as game scores, purchases, etc.); and
  • Search and retrieve Google+ people information (for example, listing people with the highest game scores, etc).
It also discusses the Google Play Services public interfaces associated with the Android Quick Start app.

Getting Started


To develop an Android application on the Google+ platform you will need Google Play Services and the latest version of the SDK Tools, which can be added or updated using the Android SDK Manager.

The Android SDK Manager can be accessed from within the Eclipse IDE (with the Android Development Tools) by selecting Window -> Android SDK Manager. You can then select to install or update Google Play Services and the SDK Tools, as shown in the following picture. For more information see my previous article Programming Mobile Apps for Android With Eclipse and Getting Started With the Google+ Platform.


Note that you may even need to update the Android Developer Tools (ADT) plugin if you are using Eclipse to build Android apps. If you need to update the ADT you can do so (from within Eclipse) by selecting  Help -> Install New Software. The Available Software window displays. When you click the Add button the Add Repository window (shown below) displays. You can then add the URL for the ADT: https://dl-ssl.google.com/android/eclipse/


Once you add the URL and click OK the wizard walks you through selecting the components you can install to update an existing installation.


For additional information on updating the ADT in Eclipse visit  http://developer.android.com/sdk/installing/installing-adt.html.

Installing or updating Google Play Services, SDK tools, ADT, are just a few of the updates you may need to make to your development environment. For a complete list of the prerequisites needed to use the Google+ API you can visit: https://developers.google.com/+/mobile/android/getting-started#prerequisites.

Google Developers Console

Once you have prepared your development environment as previously mentioned, you need to enable the Google+ API. To begin you access the Google Developers Console and create a project. The Console automatically assigns a unique project name.


Once the project is created you can select the project to set the properties.


In this example I created a project to run the Google Quick Start sample project. I can now enable the Google+ API by clicking the Off button to turn On the Google+ API.

You will also need a unique Client ID, which is created by clicking the Create New Client ID button shown in the following picture. The Create Client ID window, also shown below, displays. You will then need to add the application type (which is "Installed" for Android apps) and package name (I used: com.google.android.gms.plus.sample.quickstart as the package name so I could run the Quick Start Sample). You will also need the Signing certificate fingerprint (SHA1) (see my previous article How to Build Facebook Apps and Games for Android to learn more about hash keys). Once all fields are completed you can save your changes. 



Once the information has been entered and submitted the client ID is created, as shown in the following picture. In this example the client ID is associated with the package name of the application (shown in the following picture). Therefore, if you add a package name that is different from that of the package name in the application your sample application will not work.



As API requests are sent, from your application, to the Google Server the client ID is used to identify your application and also track associated transactions.


After you enable the Google+ API (application programming interface) you can configure your development environment to make Google+ API calls via Google Play Services.

Once you create your project in the Google Developers Console you must then clone or download the sample application from GitHub:  https://github.com/googleplus/gplus-quickstart-android.

Configuring the Android Quick Start App

As previously mentioned, your project will use Google Play Services to access the Google+ API. Therefore, part of preparing your development environment includes importing the Google Play Services library located in the adt-bundle directory on your computer. (Note: I'm running Windows 64-bit so my adt-bundle directory is as follows:  adt-bundle-windows-x86_64-20131030). The path to the Google Play Services library on my computer is as follows:


Use File -> Import from within the Eclipse IDE to select the Google Play Services Library project.
Select the Google Play Services lib project, as shown below. Click Finish to import the selected project.

You will then need to reference the google-play-services_lib project from within your project.  To run the sample I must first reference google-play-services_lib.To do this I right-clicked the project and select properties from the menu to display the Project Properties window, shown below.


I can then click the Add button and select the google-play-services_lib (which is available because you added it as a project to the workspace).


Once you have added the project you can click OK to close the Project Properties window.



To run the sample you must connect to a real Android device. Since your project is not configured to run on a specific device (real or virtual) when you select Run, from within the Eclipse IDE, the Android Device Chooser displays (as shown below).


I can then click OK to run the device. For more information about running virtual versus real devices see my previous article titled, Programming Mobile Apps for Android With Eclipse.

OAuth 2.0 Protocol


The Google+ authentication/authorization uses the OAuth 2.0 framework. The OAuth 2.0 framework was created so third-party applications could access another company's resources (mainly social networking company resources) without giving these applications customer's private data.

With the OAuth 2.0 Framework a users' log-in, for example, is neither accessed nor stored by a third-party app. And, Google is just one of many companies that currently use the OAuth 2.0 Framework.Google's implementation of the OAuth 2.0 framework supports three types of applications: Web Server apps, computer and hand-held device apps and apps that run on the client-side (such as JavaScript applications).

To implement the Google+ login, which utilizes the OAuth 2.0 framework for authentication and authorization, developers can use Google+ log-in, which invokes the user Consent Form as well as the Google user login window.


API programming really is all about code re-use, which makes developing apps easier and faster. Consider the development time cut by building an application on top of one or more existing applications (in this case Google+ and Google Play Services). You do not have to write as much code to build your application. Instead, you use your knowledge of the existing applications (by reviewing the API documentation) and then declaring variables/objects and calling the methods, etc. you want to use or setting the applicable properties to fit your application. Notice below the code to import the Login button and then the code that declares and calls the Login button. A procedure was not written to create the Login button because it already exists.



When the user click the Google+ Sign in button the user is presented with the Google sign-in. To login the user enters the correct user name and password and submits the response. The Consent form is also presented to the user. The user reviews the form and makes desired changes to the Consent form if the application requests access the user does not want to give. The information is sent to Google Play Services. If the credentials are accurate the Google server returns an authorization code to your application. Your application then requests an access token. The Google server returns an access token to your application.




The access token is used, by your application, to perform the approved transactions on behalf of the user. The response from the server also includes a refresh token. Whenever the access token expires the refresh token is used to request a new access token until the refresh token expires. For more information on OAuth 2.0 see Google's OAuth 2.0 Playground . For more on Google+ sign in for Android see: https://developers.google.com/+/mobile/android/sign-in and https://developers.google.com/+/features/sign-in

Google Play Services & The Google+ API


In the Quick Start app, the googleapiclient is the "main entrypoint for Google Play Services integration" so that calls from the application to Google Play are wrapped with the googleapiclient interface.  Once a connection is established the People class is used to get information associated the current person logged in. The Quick Start app calls the AccountAPI to clear the default account or revoke access when the user selects the applicable option. The following paragraphs provide additional information about the Google+ API.

The Google+ API is divided into four resource types as follows:  People, Activities, Comments and Moments

People Resource: The People resource contains the method used to get people data by retrieving the individual's user name  (or userID). A few of the properties associated with the People resource include the person's name, profile image, profile URL, about me content (including the about me description, bragging rights, relationship status), organization where the person works/worked, places lived, circled-by count, plus-one count, whether or not the account is verified, the cover photo and more. Developers can incorporate some or all of the attributes within an application that uses the Google+ API. The developer can also use the People resource to search for people, list people by activity (discussed below), etc.


Activities Resource: The Activities resource is used to work with content posted to Google+. The Activities resource has three property types as follows: Actor, Object and Verb. The Actor property type includes properties associated with the person who performs an activity such as create a post, re-share a post or even plus-one a post. A few Actor properties include display name, the URL for the person's profile, the URL for the person's profile image, etc.The Verb property type defines whether content was created (i.e., newly published content) or re-shared. The Object property includes properties such as the object type for example whether the activity is associated with content or an action such as plus-one or re-share.It also includes properties that hold the ID of the object, the original actor, comments (or replies) associated with the published content, people who +1'd the content, etc.

Comments Resource: The Comments resource includes methods used to list comments associated with content or get content.

Moments Resource: The Moments resource includes methods used to record activities users perform.For example, if a user makes a purchase or achieves a high score in a game; developers can use the moments.insert method to create a post that discloses the applicable information.

Lastly, developers use App Activities to create actions users can perform within an application such as buying, adding comments, identifying the user's location, etc.

Tuesday, March 4, 2014

Skype, Skype Manager, Skype Connect & Skype Programming

Most people know you can install and use Skype on your phone or even your computer to place phone or video calls or send chat messages. But, have you ever used Skype on TV to watch friends and family members while you talk? What about using Skype on your home phone; or, using it to make group calls? Or, if you own a business did you know you can use Skype on your office telephone system to save on business calls? Developers can even incorporate a Skype Button to make Skype accessible from any website. This article discusses the various Skype features available.


Skype Overview


If you are using Skype on a computer (Windows, Macintosh or Unix) you get a few more options than those using Skype on a mobile device. However, as a mobile app Skype provides quite a few options. For example, users can manage contacts, view a person's profile, make video or phone calls and send chat messages.


Users can add multiple participants to a chat, as shown in the above picture; or, even attach and send a file. And, users can assign a group name (using the Rename group option) to multiple participants associated with a chat, as shown in the following picture.

Rename group

Once you create a group you can easily initiate a chat session with the group by selecting the group name. The following picture shows a chat session initiated with the "Test Group".


Skype users, using the mobile version, can also block, edit or remove a contact as well as add a contact to Favorites. Contacts listed in Favorites make it easier to find and connect with a contact.


Skype on a computer provides the ability to do all of the above and more. For example, Skype computer users can import contacts from Facebook or even place group phone calls by adding contacts to a group, as shown in the picture below. You can then save the group to your contacts to easily connect with multiple people in the group.


The following picture shows a group call placed from a computer to two people using Skype on mobile devices.


Skype for computers includes Skype WiFi, which enables you to use WiFi at public locations to place calls or chat. You can also use it to log into a professional account, request a subscription, manage Skype credits (used to pay for calls), manage your profile, backup contacts to a file/restore contacts from a file, access Outlook contacts, block a conversation as well as view voice messages and files sent to you.

You can also share your screen to show someone else the content you are viewing on your computer or mobile device. The screen session below shows a Skype Computer user requesting to share her desktop screen with a mobile phone user.


And, you can manage your Skype settings (including the ability to select the Language in which your client displays) and more.

If you interested in using Skype to make free calls from your home phone, you can easily accomplish this task as well. You can visit the Skype Store to purchase a phone that comes with everything you need to Skype friends and family members who also use Skype.

Skype Manager


More and more Skype is being used to connect people locally, nationally and worldwide. And while many use it to talk with family and friends; others are finding innovative ways to tap into its capabilities to conduct business. For example, some investors use Skype to conduct critique sessions with entrepreneurs and start-up business owners.

If you are a business owner you may want to get the most from Skype by adding it to your organization's software list. To manage users and associate each user with features and Skype credits you or your Skype administrator will need to install a component called Skype Manager™ .Skype Manager provides a way to set up employee accounts and enable features employees are allowed to use such as call forwarding, voicemail subscriptions, etc. In addition, Skye Manager includes a dashboard so authorized users can monitor employees' Skype usage and associated costs.



Skype Manager adds capabilities such as the ability to host conference video calls with customers or employees using Skype anywhere in the world. This is possible because Skype Manager provides the ability to create groups.



Once a group is created you can add customers and/or employees to the group. When ready you can select the applicable group name to place the group call whenever you want.



Users can also share files with other Skype users without worrying about file-size limits. And, as with Skype for the computer and mobile device--users can send instant messages to the people they are talking to while on the call. Users can also share their screen with other users to show a presentation or other materials; or, even get assistance from a co-worker to help troubleshoot a problem.

Skype Manager isn't just for businesses. Individuals who want to keep in touch and share Skype features with family and friends can use Skype manager to assign features to other people, monitor usage and perform other tasks previously mentioned.

Skype Connect


In addition to Skype Manager, businesses can use Skype Connect to use Skype on a session initiation protocol (SIP)-enabled corporate telephone network or gateway. With Skype Connect a regular business telephone system becomes a Skype phone that provides a way for employees to make Skype calls from the organization's office phone system, which can help save on phone call costs.

Skype Programming


If you have a business and you want customers or employees to be able to contact you or a specific person using Skype, Skype Buttons provide an easy solution.

Developers can navigate to the Skype Button's website at: http://www.skype.com/en/features/skype-buttons/create-skype-buttons/. The developer can then enter the Skype user name associated with the person who should be contacted when an individual clicks the Skype button. The Skype Button can initiate a phone call or send a chat message from a website or web app. The page generates the code that can be added to a website or web app for easy access.


The Skype URI API also provides the ability to incorporate Skype Buttons that require more complex functionality. For example, developers may need to write code so a website or app can determine if a users has Skype installed. Further, the developer may also need to define what action the website or app should take if Skype is not installed.

In addition to Skype Buttons, developers can use the Skype.ui Javascript Function to
dynamically create Skype URIs that provide more functionality than the Skype Button. The Skype URI API currently includes code that provides a way to build Skype snippets that offer the ability to:
  • Switch focus to a Skype client;
  • Initiate an audio call to a Skype user or group;
  • Initiate a video call to a Skype user; and
  • Send a chat message to a Skype user or group.
For additional instruction you can access tutorials to learn more about using the Skype URI API by clicking the following links:

Tuesday, February 11, 2014

Android Programming, 3D Images and OpenGL ES

As disused in my previous article "Unity Game Engine's Mesh Renderer, Mesh Filter, Shaders and Materials Overview" a 3D scene is defined by a collection of vertices that include attributes such as position, normals, texture values, etc. For a device to display a 3D animation scene, the scene is transformed into a 2D image through the rendering process (aka the rendering pipeline or graphics pipeline).

This articles discusses the Open Graphics Library specification for Embedded Systems (OpenGL ES) used to define shaders and other elements to render 3D scenes. It also discusses the OpenGL Shading Language specification. And it provides an overview of a simple Android application that uses the OpenGL ES to render animated graphics on Android devices.

OpenGL ES and the OpenGL® Shading Language

For a 3D scene to display there are a series of steps executed through the rendering pipeline. These steps ensure 1) only the objects within the camera's view display, 2) reflections are properly added, and 3) images behind other images are shown/hidden based on the camera's view. The output is then merged and the final image displayed. The last stage of the rendering pipeline finalizes what pixels will display based on the pixels closest to the camera and other variables mentioned. The 3D scene below, from the Stealth game, shows a game scene that has not yet gone through the rendering pipeline.



When we run the game (so that the vertices are transformed into a 2D image), notice we only see the game objects closest to the camera.  And, based on the camera's view objects behind some of the partitions are hidden. As the player moves the view shifts and more processing occurs to render the images that are now within the camera's view.


Developers who specialize in 3D and animation can program some of the stages associated with the rendering pipeline by creating programs called shaders.  Shaders execute inside the graphics processing unit (GPU) and define how the data is processed to, ultimately, display the final image. The ability to create shaders means developers can now create custom effects that were not possible when the rendering pipeline only included pre-programmed stages.

The OpenGL ES is a cross-platform API used to create and compile shaders and execute other related operations including the ability to define buffers that the shaders write to.

OpenGL Shading Language


In addition to the OpenGL ES specification the OpenGL Shading Language specification is necessary to understand the different data types that can be used including vectors, matrices, opaque types, samplers (which are handlers to textures), cube maps, depth textures for shadows, etc. It also defines the statements and structures, variables (including constants) and more. The OpenGL Shading Language support progamming the following shaders: vertex shader, tessellation control shader, tessellation evaluation shader, geometry shader, fragment shader (sometimes called the pixel shader), and compute shader.

Vertex and Fragment Shaders


Each shader type is directly linked to a processor. For example, Vertex shaders run on the vertex processor. The vertex shader is used to read the coordinates of the vertices, transform them to 2D screen coordinates as well as process other attributes of each vertex such as color, normals, etc.

The fragment shaders (also referred to as pixel shader) receives pixel data, calculates the final color of the pixel and passes it to the next stage so the final output can be produced. The pixel shader can change the depth of the pixel to define what pixels should or should not be drawn. By default, the depth defines the distance between the originating triangle and the camera. But, the developer can manipulate the distance by specifying a value that will be used when the final image is created.

(You can read a more general overview of Shaders by reading my previous article Unity Game Engine's Mesh Renderer, Mesh Filter, Shaders and Materials Overview.)

Android and the OpenGL ES


Android includes support for 2D and 3D graphics using the OpenGL ES API. Android supports several versions of OpenGL ES as follows:
  • OpenGL ES 1.0 and 1.1 is supported by Android 1.0.
  • OpenGL ES 2.0 is supported by Android 2.2 (API level 8).
  • OpenGL ES 3.0 is supported by Android 4.3 (API level 18).
Note that when you use a higher version of OpenGL ES with android; all lower versions are supported. For example, if your app uses OpenGL ES 2.0; it also supports OpenGL ES 1.0

Before you start developing your 3D app or game you will want to download and install the Android Developer Tools (ADT) Bundle and access the Android SDK Manager to download the applicable Android SDK platform, etc. For more information, please see my previous article titled:  Programming Mobile Apps for Android With Eclipse.

Note:  When you create an emulator, as outlined in my previous article, make sure you check the option to enable the GPU on the host. As mentioned, OpenGL ES apps require access to a GPU.


Displaying Graphics on Android with OpenGL ES

 

Android Manifest


When you create an Android app that supports OpenGL ES, you must add a declaration to the AndroidManifest.xml file. The uses-feature statement to be added includes the glEsVersion attribute, which provides a way for developers to define the OpenGL ES version required to run the application. For example, if OpenGL ES version 1.0 is required; the glEsVersion attribute is set as 0x00010000. If an application requires OpenGL ES 2.0 and OpenGL ES 3.0; the value of the attribute is set to 0x00030000. It is then understood that the application supports not only OpenGL ES 3.0; but also all lower versions. Here is what the uses-feature statement looks like (in this example the application requires OpenGL ES 2.0):  <uses-feature android:glEsVersion="0x00020000" android:required="true" />

The uses-feature statement takes two other values besides glEsVersion as follows: android:name and android:required. Android:name defines a valid value from the hardware or software list at the bottom of the Uses-Feature API Page. The android:required value defines whether the feature is "required" to run the app. True means the feature is required; false means use the feature if it is available on the device.

The classes that make up the android application project is defined by the graphics and their behavior. Take a look at the simple Hello OpenGL ES projects, which can be downloaded from http://developer.android.com/training/graphics/opengl/environment.html.

Note: Once you download the project, you can use the Import option, available from the File menu in Eclipse. You can then use the "Existing Android Code Into Workspace" option to import the project and then run it as an Android Application. Remember you cannot run the project without an emulator that has GPU support and the android version that corresponds to the required OpenGL ES version, as discussed in Android and the OpenGL ES section above. 



The download includes two android application projects. One requires OpenGL ES version 1.0 the other requires version 2.0. When you run the application it displays a triangle and a square. You can click and rotate the triangle because it was programmed to respond to user interaction.

 Hello OpenGL ES Android Application Project Classes


The Hello OpenGL ES project's core classes are as follows:
  • MyGLSurfaceView
  • MyGLRenderer
  • OpenGLES20Activity
  • Square
  • Triangle

MyGLRenderer implements the GLSurfaceView.Renderer class, which is used to render a frame. In the Hello OpenGL ES project the GLSurfaceView.Render uses GLES20 constants to draw the background color of the frame. It uses the Matrix class to set the camera position as well as calculate and store 4 x 4 column-vectors for rendering. (Below is an example of the 4 x 4 column-vector matrices from the OpenGL ES Android reference:)

  m[offset +  0] m[offset +  4] m[offset +  8] m[offset + 12]
  m
[offset +  1] m[offset +  5] m[offset +  9] m[offset + 13]
  m
[offset +  2] m[offset +  6] m[offset + 10] m[offset + 14]
  m
[offset +  3] m[offset +  7] m[offset + 11] m[offset + 15]


The Hello OpenGL ES project introduces quite a few interesting programming concepts. For example, the MyGLSurfaceView class implements the GLSurfaceView class, which creates a view container (which manages a surface so OpenGL can render to that surface) used to render OpenGL ES graphics as well as capture touch events so users can interact with the graphics. Th android activity class creates an instance of the GLSurfaceView to serve as the Content View for the activity.

In the project the MyGLSurfaceView calls the MyGLRenderer class so the graphics can be rendered using the GLSurfaceView.Renderer class. Both the Triangle and the Square class use the GLES20.glCreateProgram() command to create an empty OpenGL ES program. And the GLES20.glAttachShader command is used to add the vertex and fragment shaders to the program.  The GLES20.glLinkProgram command (or public method) is then used to create the OpenGL program executables. The vertex shader executable runs on the vertex processor and the fragment shader executable runs on the fragment processor.

Since the user can interact with the triangle, the triangle coordinates are captured and used to write the position of the triangle. The MyGLRender class is implemented in a way that ensures, once the triangle is rendered, it is only rendered again when the data changes.

Summary


Overall the Hello OpenGL ES project has a very simple design that executes the key elements of an animated graphics android application. This program can help developers more easily understand how to program graphics using the OpenGL ES API as well as create shaders and assign buffers. For more information you can refer to the following list of resources:


Friday, January 24, 2014

Game Cheat Engine Overview (Part 1)

Yes, it's true. There is a software program that can be used to cheat when you play a game. My guess is that die-hard gamers would never use such a tool. But for people, like me, who love software and like to explore you will likely find this little tool a bit interesting.

A cheat engine is a software app that lets you change values assigned to a variable in a game. (Note that a variable is a named storage location in the computer's memory. The storage location holds the value that might be a number, a text string or some other data type. The variable provides the developer a way not only to store; but also to retrieve and manipulate values. For example, a game might give a new player 3 lives. And each time the player get's shot "x" number of times (where x can be any number), the player looses a life. In this example the number of lives is stored in a variable. And, as an incident occurs that results in the value changing (i.e., the player looses a life) the value is updated.

The Cheat Engine provides a way for users to locate the value in memory and change it. For example, if a player wants to change the number of lives from 3 to 10--the Cheat Engine could be used to accomplish this task. The following paragraphs provide additional information on various ways Cheat Engines might locate a variable's value and change it.

Downloading the Game Engine


I downloaded Cheat Engine 6.3 from www.downloads.com. But it can also be downloaded from http://www.cheatengine.org/.

Download Engine Page

Note:  If you are not familiar with www.downloads.com; it's probably not the best place to download the Engine. This is because downloads.com adds a lot of unwanted software to downloads. If you are familiar with downloads.com you probably have already figured out how to duck and dodge your way to an executable that includes only the product you want to install.

Installing the Cheat Engine


The Cheat Engine is pretty straight forward to install. However just be aware that when you come to the "Improve Your Internet Protection" screen you can select "Custom Installation" (even though it "appears" to be disabled) if you do not want to install the AVG tool bar or the Outfox.tv application.

Custom Installation Image

Once you select Custom Installation, from "Improve Your Internet Protection" screen, you can deselect the AVG options if desired, as shown below.

Custom Installation Image With AVG Options Deselected

When you click "Next" install wizard recommends the Express installation.You can click Custom Installation if you want to deselect the "Install Outfox.TV" option.

Express (Recommended) Option Selected Image

You can then continue to use the Setup wizard until the Cheat Engine is installed. Once it is installed an Information window displays. When you click Next a dialog pops up and asks "Do you want to try out the tutorial?" If you click yes, the Tutorial application launches. Note that the Tutorial application is a separate app from the Cheat Engine app. Both apps are shown in the following picture.


When you click the Next button on the Cheat Engine Tutorial app you are presented with the first objective in the tutorial. You must click the "Hit me" button on the lower left bottom portion of Cheat Engine Tutorial app. Doing this changes the "Health" variable's value.


 Changing a Known Value


In this example, you know the value of the variable. For example, if you start a game with 250 rounds of ammunition; you know the value--but you don't know the address of the value (i.e., where in memory the value is located). As shown in the following picture I clicked the "Hit me" button until the Health value changed from 100 to 73. The Next button, on the Tutorial app, will remain disabled until I locate the Health variable and change its' value back to 100. To begin I have to use the Cheat Engine app to open the Tutorial executable file (i.e., Tutorial-i386.exe). To open the .exe file I use the "Select a process to open" button, outlined using a red box in the picture below.


When the Process List window opens I can select the Tutorial executable (highlighted in the picture below) and click the Open button.


The Cheat Engine opens the executable file and populates the Engine with the Start and Stop scan ranges and other values. There are three values that are primarily used for the Scan as follows:  "Value", "Scan Type" and "Value Type". The "Value" field holds the value of the variable. The Scan Type indicates the type of scan that will be used to locate the value. And the Value Type, which is the same as a data type.



Note: If you are not familiar with Data Types (referred to as "Value Type" in the Cheat Engine) Microsoft has an older reference for C# that provides a brief and basic example of data types. This might help clarify how one data type differs from another: http://msdn.microsoft.com/en-us/library/cs7y5x0x%28v=vs.90%29.aspx

In the Value field, shown in the above picture, I entered 73, which is the current "Health" value based on the number of times I clicked the "Hit me" button. Since I am searching for the exact value "73" I leave the Scan Type value set to "Exact Value". Also the "Value Type" is set to 4 Bytes, which is feasible to search for the numeric value 73.


When I click the First Scan button a list of values display in the left side of the window. This means more than one variable's value is currently set to 73. So I need to isolate the variable specific to the "Health" value.


To do this I will need to click the "Hit me" button. Clicking the button changed the Health value to 71. I enter 71 in the value field and then click Next Scan. The Cheat Engine rescans the variables already presented and searches for the variable whose value is now 71. As shown in the following picture, only one variable has a value of 71. So I know this is the Health variable.


I can either double-click the address value; OR, right click it. If I right-click the value a popup window displays. I can then select "Add selected addresses to the addresslist", as shown below.


Whether I double-click the address value or use the popup window, the address is moved to the bottom portion of the window, as shown below.


Right-click the value in the bottom window. The popup menu displays. Select Change record -> Value, as shown below.


The Change Value window displays. I can now change the Health Value from 71 to 1000 and click OK to close the Change Value window


The Next button is now enabled, which signifies that I have performed the step properly and can move on to the next step.


The following objectives show how to locate a variable whose address changes, how to use pointers and more. If there is enough interest in this topic I will post the information for the remaining steps associated with the Cheat Engine tutorial.