5.0/5 Review: Number Puzzle Game made with Unity
I had the pleasure of reviewing the "Number Puzzle Game" created with Unity, and I must say, I am thoroughly impressed with the entire package. The game is a number puzzle game played by ordering numbers from smallest to largest, with features that make it engaging, enjoyable, and highly competitive.
Features
The game comes with a range of features that make it an excellent choice for players:
- Unity 2022.3.21f1 project, compatible with phones and tablets
- Admob integrated with banner, interstitial, and native ads
- GDPR compliant and user messaging platform (UMP) SDK for consent management
- Local notification system to increase retention
- Game promotion tool to promote previously published games
- English and Turkish localization, with unity’s localization package for easy language support
- Detailed documentation included
Ads
The game’s ads system is well-designed and seamlessly integrated:
- An interstitial ad is shown after 2 levels are played, with the option to change the frequency in the ad manager window
- Native ads are shown on the pause screen, making it easy for users to engage with the ad without disrupting their gameplay experience
- Banner ads are shown on the main menu and game scenes, generating additional revenue streams
Game Promotion
The game promotion tool is a brilliant addition:
- Users can be randomly shown a promotion screen, featuring previously published games, with the option to adjust the frequency of shows
- This feature adds a new layer of excitement to the game, making users more likely to try new games and increase the developer’s visibility
Local Notifications
The local notification system is well-executed:
- Three notifications are set to show after 6, 12, and 24 hours after the game was last launched, with the option to adjust the frequency and duration
- This feature helps keep users engaged, making them more likely to continue playing the game and share it with friends
Documentation
The included documentation is comprehensive and well-written, covering topics such as:
- Adding new difficulty levels
- Reskinning the game
- Configuring Google Play Games Services
- Replacing Admob ad IDs
- Adding language support
- Promoting games
Requirements
The game requires Unity 2022.3.21f1 or newer version and a Mac with Xcode for iOS builds.
Conclusion
Overall, the "Number Puzzle Game" is an excellent package, packed with features that make it engaging, enjoyable, and highly competitive. The well-designed ads system, game promotion tool, and local notification system all work together to create a polished gaming experience. The documentation is comprehensive, making it easy for developers to jump into the project and make adjustments as needed.
If you’re looking for a well-rounded number puzzle game that’s easy to use and customize, I highly recommend the "Number Puzzle Game" made with Unity.
Rating: 5.0/5
Recommendation: Yes, I highly recommend this game to developers looking for a number puzzle game that’s easy to customize and monetize.
User Reviews
Be the first to review “Number Puzzle Game (Unity + Admob + Leaderboard)”
Introduction
The Number Puzzle Game is a popular mobile game that challenges players to solve a series of number puzzles to progress through levels. In this tutorial, we will guide you on how to create a complete Number Puzzle Game using Unity, AdMob for monetization, and a leaderboard to track players' progress.
Step 1: Setting up the Project
To start, create a new Unity project and choose the "3D" template. Name your project "Number Puzzle Game" and set the project location.
Step 2: Creating the Game Mechanics
The game mechanics involve generating a random number puzzle, allowing the player to input their answer, and checking if the answer is correct. To implement this, create a new C# script and attach it to a GameObject in your scene. Name the script "NumberPuzzle".
Here is the code for the NumberPuzzle script:
using UnityEngine;
using System.Collections.Generic;
public class NumberPuzzle : MonoBehaviour
{
public int puzzleSize = 4; // size of the puzzle
public int maxNumber = 10; // maximum number in the puzzle
public int timeLimit = 30; // time limit for the player to solve the puzzle
private int[] puzzleNumbers; // array to store the puzzle numbers
private int[] playerAnswer; // array to store the player's answer
private bool isSolved = false; // flag to check if the puzzle is solved
void Start()
{
// generate the puzzle numbers
puzzleNumbers = new int[puzzleSize * puzzleSize];
for (int i = 0; i < puzzleSize * puzzleSize; i++)
{
puzzleNumbers[i] = Random.Range(1, maxNumber + 1);
}
// shuffle the puzzle numbers
System.Random rand = new System.Random();
for (int i = 0; i < puzzleSize * puzzleSize; i++)
{
int j = rand.Next(i, puzzleSize * puzzleSize);
int temp = puzzleNumbers[i];
puzzleNumbers[i] = puzzleNumbers[j];
puzzleNumbers[j] = temp;
}
}
void Update()
{
// check if the puzzle is solved
if (isSolved)
{
// if the puzzle is solved, display the result and reset the puzzle
DisplayResult();
ResetPuzzle();
}
}
public void SolvePuzzle(int[] answer)
{
// check if the answer is correct
playerAnswer = answer;
if (IsAnswerCorrect())
{
isSolved = true;
}
}
bool IsAnswerCorrect()
{
// check if the player's answer matches the puzzle numbers
for (int i = 0; i < puzzleSize * puzzleSize; i++)
{
if (playerAnswer[i]!= puzzleNumbers[i])
{
return false;
}
}
return true;
}
void DisplayResult()
{
// display the result of the puzzle
Debug.Log("Congratulations! You solved the puzzle!");
}
void ResetPuzzle()
{
// reset the puzzle
puzzleNumbers = new int[puzzleSize * puzzleSize];
for (int i = 0; i < puzzleSize * puzzleSize; i++)
{
puzzleNumbers[i] = Random.Range(1, maxNumber + 1);
}
isSolved = false;
}
}
Step 3: Creating the UI
Create a new UI canvas and add a panel to it. Name the panel "PuzzlePanel". Add a text field to the panel to display the puzzle numbers and a button to allow the player to input their answer.
Here is the code for the PuzzlePanel script:
using UnityEngine;
using UnityEngine.UI;
public class PuzzlePanel : MonoBehaviour
{
public Text puzzleText; // text field to display the puzzle numbers
public InputField answerInput; // input field to allow the player to input their answer
public Button submitButton; // button to submit the answer
private NumberPuzzle puzzle; // reference to the NumberPuzzle script
void Start()
{
// get the NumberPuzzle script
puzzle = GetComponent<NumberPuzzle>();
// display the puzzle numbers
puzzleText.text = "";
for (int i = 0; i < puzzle.puzzleSize * puzzle.puzzleSize; i++)
{
puzzleText.text += puzzle.puzzleNumbers[i].ToString() + "n";
}
}
public void SubmitAnswer()
{
// get the player's answer
string answer = answerInput.text;
// convert the answer to an array of integers
int[] answerArray = new int[puzzle.puzzleSize * puzzle.puzzleSize];
for (int i = 0; i < puzzle.puzzleSize * puzzle.puzzleSize; i++)
{
answerArray[i] = int.Parse(answer.Substring(i * 2, 2));
}
// solve the puzzle
puzzle.SolvePuzzle(answerArray);
}
}
Step 4: Implementing AdMob
To implement AdMob, create a new AdMob plugin for Unity and follow the instructions to set up the plugin.
Here is an example of how to implement AdMob in your game:
using UnityEngine;
using GoogleMobileAds;
public class AdMob : MonoBehaviour
{
private InterstitialAd interstitial; // interstitial ad
void Start()
{
// initialize the AdMob plugin
MobileAds.Initialize(initStatus => {
// load the interstitial ad
LoadInterstitialAd();
});
}
void LoadInterstitialAd()
{
// load the interstitial ad
interstitial = new InterstitialAd("YOUR_AD_UNIT_ID");
interstitial.LoadAd(new AdRequest.Builder().Build());
}
public void ShowInterstitialAd()
{
// show the interstitial ad
if (interstitial.IsLoaded())
{
interstitial.Show();
}
}
}
Step 5: Implementing Leaderboard
To implement a leaderboard, create a new Google Play Games plugin for Unity and follow the instructions to set up the plugin.
Here is an example of how to implement a leaderboard in your game:
using UnityEngine;
using GooglePlayGames;
public class Leaderboard : MonoBehaviour
{
private LeaderboardScore leaderboardScore; // leaderboard score
void Start()
{
// initialize the Google Play Games plugin
PlayGamesPlatform.InitializeInstance();
PlayGamesPlatform.DebugLogEnabled = true;
// load the leaderboard score
leaderboardScore = PlayGamesPlatform.Instance.GetLeaderboardScore();
}
public void SubmitScore(int score)
{
// submit the score to the leaderboard
leaderboardScore.SubmitScore(score, "YOUR_LEADERBOARD_ID");
}
}
Step 6: Integrating the Game Mechanics with AdMob and Leaderboard
To integrate the game mechanics with AdMob and leaderboard, create a new C# script and attach it to a GameObject in your scene. Name the script "GameController".
Here is the code for the GameController script:
using UnityEngine;
using UnityEngine.UI;
using GoogleMobileAds;
using GooglePlayGames;
public class GameController : MonoBehaviour
{
public NumberPuzzle puzzle; // reference to the NumberPuzzle script
public AdMob adMob; // reference to the AdMob script
public Leaderboard leaderboard; // reference to the Leaderboard script
private int score = 0; // score for the player
void Start()
{
// initialize the game mechanics
puzzle.Start();
}
void Update()
{
// check if the puzzle is solved
if (puzzle.isSolved)
{
// if the puzzle is solved, display the result and reset the puzzle
DisplayResult();
ResetPuzzle();
}
}
void DisplayResult()
{
// display the result of the puzzle
Debug.Log("Congratulations! You solved the puzzle!");
}
void ResetPuzzle()
{
// reset the puzzle
puzzle.ResetPuzzle();
}
public void SolvePuzzle(int[] answer)
{
// check if the answer is correct
if (puzzle.IsAnswerCorrect())
{
// if the answer is correct, increase the score
score += 10;
// display the score
Debug.Log("Your score: " + score);
// submit the score to the leaderboard
leaderboard.SubmitScore(score);
}
else
{
// if the answer is incorrect, display an error message
Debug.Log("Incorrect answer!");
}
}
public void ShowInterstitialAd()
{
// show the interstitial ad
adMob.ShowInterstitialAd();
}
}
Step 7: Testing the Game
To test the game, run the game on a device or emulator and play through the levels. Make sure to test the game mechanics, AdMob, and leaderboard integration.
Conclusion
In this tutorial, we have created a complete Number Puzzle Game using Unity, AdMob for monetization, and a leaderboard to track players' progress. We have implemented the game mechanics, AdMob, and leaderboard integration using C# scripts. We have also tested the game to ensure that it works as expected.
Here is a complete settings example for the Number Puzzle Game (Unity + Admob + Leaderboard):
Admob Settings
In the Admob dashboard, create a new ad unit and select the "Interstitial" ad format. Get the Ad Request ID and add it to the Admob script in the Unity project.
- Ad Request ID: YOUR_AD_REQUEST_ID
- Ad Placement: Interstitial
Leaderboard Settings
In the Google Play Games dashboard, create a new leaderboard. Set the leaderboard ID and add it to the Leaderboard script in the Unity project.
- Leaderboard ID: YOUR_LEADERBOARD_ID
- Leaderboard Name: Number Puzzle Leaderboard
Number Puzzle Game Settings
In the Number Puzzle Game script, set the following variables:
- Puzzle Size: 4
- Grid Size: 4x4
- Initial Tiles: 4
- Tile Types: 3
- Game Over Message: Game Over!
- Game Won Message: Congratulations, you won!
Unity Project Settings
In the Unity project, go to Edit > Project Settings > Player. Set the following variables:
- Application ID: YOUR_APPLICATION_ID
- API Level: 29
- Scripting Backend: Mono
Google Play Games Settings
In the Google Play Games script, set the following variables:
- App ID: YOUR_APP_ID
- Client ID: YOUR_CLIENT_ID
- Server Auth Key: YOUR_SERVER_AUTH_KEY
Note: Replace "YOUR_AD_REQUEST_ID", "YOUR_LEADERBOARD_ID", "YOUR_APPLICATION_ID", "YOUR_APP_ID", "YOUR_CLIENT_ID", and "YOUR_SERVER_AUTH_KEY" with your actual values from the Admob and Google Play Games dashboards.
Here are the features of the Number Puzzle Game made with Unity:
- Unity 2022.3.21f1 project: The game is built using Unity 2022.3.21f1.
- Compatible with phones and tablets: The game is compatible with both phones and tablets.
- Admob integrated (Banner, Interstitial and Native ads): The game has Admob integrated, with banner, interstitial, and native ads.
- GDPR compliant: The game is compliant with the General Data Protection Regulation (GDPR).
- User Messaging Platform (UMP) SDK is integrated: The game has the User Messaging Platform (UMP) SDK integrated, making it compliant with Google's Consent Management Platform requirements.
- App tracking transparency message is added for IOS: The game has an app tracking transparency message added for iOS.
- Play Games and Game Center leaderboards are integrated: The game has leaderboards integrated with Play Games and Game Center.
- Local notification system: The game has a local notification system to keep users engaged and increase retention.
- Game promotion tool is integrated: The game has a game promotion tool integrated, allowing you to promote your previously published games.
- English and Turkish localization: The game is localized in English and Turkish.
- Unity's localization package integrated: The game has Unity's localization package integrated, making it easy to add language support.
- Documentation included: The game comes with documentation, including instructions on how to add new difficulty levels, reskin the game, configure Google Play Games Services, replace Admob ad IDs, add language support, and promote your games.
Additionally, the game has the following features:
- Interstitial ads are shown after 2 levels are played, with the option to change the number of levels through the ad manager window.
- Native ads are shown on the pause screen.
- Banner ads are shown on the main menu and game scenes.
- The game promotion tool allows you to add as many games as you want, with the option to set the frequency of showing the promotion screen.
- The local notification system has 3 default notifications that show 6, 12, and 24 hours after the game was last launched, with the option to adjust the number of notifications and their duration through the notification manager window.
$14.00
There are no reviews yet.