Top Quality Products

Checkers – Dames (Android Studio – Admob – GDPR)

4.57
Expert ScoreRead review

$16.00

Added to wishlistRemoved from wishlist 0
Add to compare

41 sales

Checkers – Dames (Android Studio – Admob – GDPR)

UPDATE 2022: Dames CHECKERS for beginners and masters. Develop your strategy and tactics, face the challenge and be the CHECKERS Master now!

Rating: 4.57/5

Introduction:

Are you ready to embark on an amazing adventure? Look no further than Dames CHECKERS, the ultimate 2-player strategy board game for Android. With its powerful AI, this game will challenge even the most seasoned players and provide hours of entertainment for beginners and masters alike.

Features:

♞ Computer, Double modes
♞ Great graphics with layered PNG
♞ Undo function
♞ 10 difficulty levels (Junior>Senior)
♞ Powerful Chess AI
♞ Save game progress and resume

Change Log:

  • 2022-03-09: Fix many errors, improve the running of the code
  • 2021-10-27: Update the project to API-31, added support for Android 12
  • 2021-02-03: Integrate button share, button more games, fix bug with sounds buttons, update all libraries and Android Studio builds to 4.1.2
  • 2020-05-22: Improve the quality of the code, fix 2 deprecated functions, integrate push notifications, integrate Firebase, update to Android Studio 3.6
  • 2019-11-29: Change the structure of the project, improve the loading of the game, fix problem first start of the game, add PSD file, added new documentation
  • 2019-10-12: Update the project structure to API-29, correct issue of king color

Key Features:

  • Easy to edit and reskin
  • Optimized for Mobile
  • AdMob integrated (Banner and Interstitial)
  • Universal (phone & tablet)
  • Documentation (video)
  • GDPR
  • Support 24/7

Popular Questions:

Q: How can I manage my console well and win with AdMob?
A: Follow the documentation video, and don’t waste time improving the code. Publish and improve later.

Q: So, what do I do?
A: Quickly skin your game, create an AdMob ID, and integrate it into the project.

Q: How much will I earn?
A: A game in its first time can bring you $1 per day, but if you start 10 games, you can earn $300 per month.

Conclusion:

Dames CHECKERS is an excellent 2-player strategy board game for Android that will challenge and entertain players of all levels. With its powerful AI, great graphics, and easy-to-edit code, this game is a must-have for anyone looking for a fun and engaging mobile experience. Don’t hesitate to download it today!

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “Checkers – Dames (Android Studio – Admob – GDPR)”

Your email address will not be published. Required fields are marked *

Introduction

Welcome to this comprehensive tutorial on creating a Checkers game for Android using Android Studio, AdMob for monetization, and GDPR compliance. In this tutorial, we will guide you through the process of creating a Checkers game from scratch, including setting up AdMob for in-app ads and implementing GDPR compliance.

Checkers Game Tutorial

Step 1: Setting up the Project

  1. Open Android Studio and create a new project.
  2. Choose "Empty Activity" as the project template and name your project "CheckersGame".
  3. Set the minimum SDK to 21 and the target SDK to the latest version.
  4. Create a new folder in the project directory called "assets" and add the following files:
    • checkers.png (the game board image)
    • checker.png (the checker piece image)
    • king.png (the king piece image)
  5. Create a new Java class called "CheckersGame.java" and add the following code:
    
    package com.example.checkersgame;

import android.os.Bundle; import android.app.Activity; import android.view.View; import android.widget.Button; import android.widget.ImageView;

public class CheckersGame extends Activity { private ImageView boardView; private Button newGameButton;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_checkers_game);

    boardView = findViewById(R.id.board_view);
    newGameButton = findViewById(R.id.new_game_button);

    newGameButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // Start a new game
        }
    });
}

}

**Step 2: Creating the Game Board**

1. Create a new XML layout file called "activity_checkers_game.xml" and add the following code:
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ImageView
        android:id="@+id/board_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="fitCenter"
        android:src="@drawable/checkers" />

    <Button
        android:id="@+id/new_game_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="New Game" />

</LinearLayout>
  1. Create a new Java class called "GameBoard.java" and add the following code:
    
    package com.example.checkersgame;

import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.view.View;

public class GameBoard extends View { private int boardSize; private int squareSize; private int[][] squares; private Paint paint; private Path path;

public GameBoard(Context context, AttributeSet attrs) {
    super(context, attrs);
    boardSize = 8;
    squareSize = 50;
    squares = new int[boardSize][boardSize];
    paint = new Paint();
    path = new Path();
}

@Override
protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);
    canvas.drawColor(Color.WHITE);

    for (int i = 0; i < boardSize; i++) {
        for (int j = 0; j < boardSize; j++) {
            int color = Color.BLACK;
            if ((i + j) % 2 == 1) {
                color = Color.WHITE;
            }
            canvas.drawRect(i * squareSize, j * squareSize, (i + 1) * squareSize, (j + 1) * squareSize, paint);
        }
    }
}

}

**Step 3: Implementing Game Logic**

1. Create a new Java class called "GameLogic.java" and add the following code:
```java
package com.example.checkersgame;

import android.graphics.Point;
import android.graphics.Rect;

public class GameLogic {
    private int[][] squares;
    private int currentPlayer;
    private int[][] piecePositions;

    public GameLogic(int[][] squares) {
        this.squares = squares;
        currentPlayer = 0;
        piecePositions = new int[2][8];
    }

    public void makeMove(int fromX, int fromY, int toX, int toY) {
        // Check if the move is valid
        if (!isValidMove(fromX, fromY, toX, toY)) {
            return;
        }

        // Update the piece positions
        int piece = piecePositions[currentPlayer][fromY];
        piecePositions[currentPlayer][fromY] = 0;
        piecePositions[currentPlayer][toY] = piece;

        // Update the squares
        squares[toX][toY] = piece;
        squares[fromX][fromY] = 0;

        // Check if the game is over
        if (isGameOver()) {
            // Display the game over message
        }
    }

    private boolean isValidMove(int fromX, int fromY, int toX, int toY) {
        // Check if the move is within the board boundaries
        if (fromX < 0 || fromX >= squares.length || fromY < 0 || fromY >= squares[0].length || toX < 0 || toX >= squares.length || toY < 0 || toY >= squares[0].length) {
            return false;
        }

        // Check if the piece is being moved to an empty square
        if (squares[toX][toY]!= 0) {
            return false;
        }

        // Check if the piece is being moved diagonally
        if (Math.abs(fromX - toX)!= 1 || Math.abs(fromY - toY)!= 1) {
            return false;
        }

        // Check if the piece is being moved to a square occupied by an opponent's piece
        if (squares[toX][toY] == 1 - currentPlayer) {
            return false;
        }

        return true;
    }

    private boolean isGameOver() {
        // Check if all pieces of one player have been captured
        for (int i = 0; i < 2; i++) {
            if (piecePositions[i][0] == 0 && piecePositions[i][1] == 0 && piecePositions[i][2] == 0 && piecePositions[i][3] == 0 && piecePositions[i][4] == 0 && piecePositions[i][5] == 0 && piecePositions[i][6] == 0 && piecePositions[i][7] == 0) {
                return true;
            }
        }

        return false;
    }
}

Step 4: Implementing AdMob

  1. Create a new Java class called "AdMob.java" and add the following code:
    
    package com.example.checkersgame;

import android.app.Activity; import android.os.Bundle; import android.widget.FrameLayout;

import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdSize; import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.MobileAds;

public class AdMob { private AdView adView;

public AdMob(Activity activity) {
    MobileAds.initialize(activity, new OnInitializationCompleteListener() {
        @Override
        public void onInitializationComplete() {
            // Initialization completed
        }
    });

    adView = new AdView(activity);
    adView.setAdSize(AdSize.BANNER);
    adView.setAdUnitId("YOUR_AD_UNIT_ID");

    FrameLayout adContainer = activity.findViewById(R.id.ad_container);
    adContainer.addView(adView);

    AdRequest adRequest = new AdRequest.Builder().build();
    adView.loadAd(adRequest);
}

}

**Step 5: Implementing GDPR Compliance**

1. Create a new Java class called "GDPR.java" and add the following code:
```java
package com.example.checkersgame;

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class GDPR extends AppCompatActivity {
    private SharedPreferences sharedPreferences;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gdpr);

        sharedPreferences = getSharedPreferences("gdpr", MODE_PRIVATE);

        Button acceptButton = findViewById(R.id.accept_button);
        acceptButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // Accept the GDPR terms
                sharedPreferences.edit().putBoolean("gdpr_accepted", true).apply();
                finish();
            }
        });

        Button declineButton = findViewById(R.id.decline_button);
        declineButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // Decline the GDPR terms
                sharedPreferences.edit().putBoolean("gdpr_accepted", false).apply();
                finish();
            }
        });
    }
}

Step 6: Integrating the Game Logic with the AdMob and GDPR

  1. Create a new Java class called "CheckersGameActivity.java" and add the following code:
    
    package com.example.checkersgame;

import android.os.Bundle; import android.view.View; import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class CheckersGameActivity extends AppCompatActivity { private GameLogic gameLogic; private AdMob adMob; private GDPR gdpr;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_checkers_game);

    gameLogic = new GameLogic(new int[][]{{0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}});
    adMob = new AdMob(this);
    gdpr = new GDPR(this);

    Button newGameButton = findViewById(R.id.new_game_button);
    newGameButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // Start a new game
            gameLogic.makeMove(0, 0, 1, 1);
        }
    });
}

}


**Step 7: Running the Game**

1. Run the game on an emulator or a physical device.
2. Tap the "New Game" button to start a new game.
3. Make moves by tapping on the squares.
4. The game will display the game board and the pieces will move accordingly.
5. The AdMob banner will be displayed at the bottom of the screen.
6. The GDPR terms will be displayed before the game starts, and the user can accept or decline them.

That's it! You have now created a Checkers game for Android using Android Studio, AdMob for monetization, and GDPR compliance.

Here is an example of how to configure the Checkers - Dames game in Android Studio with AdMob and GDPR compliance:

AdMob

To configure AdMob in your Checkers - Dames game, follow these steps:

  • In your AndroidManifest.xml file, add the following code inside the <application> tag:
    <meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />
  • In your activity_main.xml file, add the AdMob banner ad:
    <com.google.android.gms.ads.AdView
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:id="@+id/adView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    ads:adSize="BANNER"
    ads:adUnitId="YOUR_ADMOB_AD_UNIT_ID">
    </com.google.android.gms.ads.AdView>

    Replace YOUR_ADMOB_AD_UNIT_ID with your actual AdMob ad unit ID.

GDPR Compliance

To comply with GDPR in your Checkers - Dames game, follow these steps:

  • Add the following permissions to your AndroidManifest.xml file:
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  • In your activity_main.xml file, add a consent dialog for GDPR:

    
    <LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    
    <!-- AdMob banner ad -->
    <com.google.android.gms.ads.AdView
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        ads:adSize="BANNER"
        ads:adUnitId="YOUR_ADMOB_AD_UNIT_ID">
    
    </com.google.android.gms.ads.AdView>
    
    <!-- GDPR consent dialog -->
    <Button
        android:id="@+id/consentDialogButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Accept" />
    
    <TextView
        android:id="@+id/consentDialogText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="16sp"
        android:textStyle="bold" />

* In your MainActivity.java file, add the following code to show the consent dialog:

private Button consentDialogButton; private TextView consentDialogText;

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main);

consentDialogButton = findViewById(R.id.consentDialogButton);
consentDialogText = findViewById(R.id.consentDialogText);

// Show the consent dialog
consentDialogButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        // Show the consent dialog text
        consentDialogText.setText("By clicking 'Accept', you consent to the use of personal data for advertising purposes.");
    }
});

}


Note: This is just an example, you should adjust the code to fit your specific use case.
Here are the features mentioned in the content: 1. Computer and Double modes 2. Great graphics with layered PNG 3. Undo function 4. 10 difficulty levels (Junior > Senior) 5. Powerful Chess AI 6. Save game progress and resume 7. Support for Android 32 8. AdMob integration (Banner and Interstitial) 9. Universal (phone and tablet) 10. Documentation (video) 11. GDPR 12. Support 24/7 Additionally, the content mentions the following key features: 1. Easy to edit and reskin 2. Optimized for Mobile 3. ADMOB INTEGRATED (BANNER AND INTERSTITIAL) 4. Universal (phone & tablet) 5. Documentation (video) 6. GDPR 7. Support 24/7
Checkers – Dames (Android Studio – Admob – GDPR)
Checkers – Dames (Android Studio – Admob – GDPR)

$16.00

Shop.Vyeron.com
Logo
Compare items
  • Total (0)
Compare
0