Football (AR and Non-AR) — Unity Asset
Football/Soccer (AR and Non-AR) — cross-platform Unity Asset in the sport arcade genre with realistic physics of football net, goal movement and the target movement inside the goal, advanced scoring & audio systems.
During an encounter with the Football Goal, a player may kick the ball by:
- clicking/tapping any point on the screen (by default);
- flicking/swiping the object from the bottom of the screen up toward the target.
Both modes form different speed and throw direction based on the last position of finger or mouse cursor, what makes the game even more interesting. Kick the Ball and Try to Get the Best Score without touching the Ground!
Contents
Game Modes: AR and Non-AR
You can choose Game Mode on the Demo Scene before the start:
- Non-AR Mode (all tested platforms support it) with 3 Camera Control Modes:
- 2 for Desktop: WASD Keys or Right Mouse Button.
- 1 for Mobiles: Sensor Camera (docs).
- AR Mode (if it’s available, user can see a button to activate it) with the next features using the AR Foundation (ARCore, ARKit) — Augmented Reality engine:
- Real Plane Detection (includes tutorial, visual plane confirmation/resetting, placing the game around the player).
- AR Safe Zone. The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone.
- AR Onboarding UX with Transparent Video Manuals & AR States.
- AR Shadows & Light Estimation: estimates light data in the real world and applies it to game space.
Package Contains
- Unified Demo Scene for Both Modes (AR and Non-AR).
- Throw Control (docs).
- Sensor Camera (docs).
- Menu Scene.
- Permission Scene with Camera Permission Request using free Native Camera.
- Loading Screen to switch scenes seamlessly.
Check the Map of Unity Assets to choose the product that best suits your needs.
Basketball (docs).
Features of Football Game 3D
Shoot like a Pro with your amazing Game or App:
- 1 Bonus: Target Growing (Big Ring).
- 2 Difficulties: Goal Movement, Target Movement inside the Goal.
- 2 Throwing Modes with Throw Control (docs): “Click” (Easy) & “Flick/Swipe” (Hard).
- 100+ Customizable Parameters (Points, Throwing, Bonuses, Sounds, Delays, etc.).
- Realistic Physics of a Football Net.
- Dissolving (Fading) VFX for All Game Objects.
- Dynamic Sound System: play Sounds based on speed, pitch, and volume factors of the Ball when it collides with Target Ring, Ring Net, Goal Posts, Floor.
- Directional Arrow that points to the Current Target.
- Advanced Scoring System with Combos & Accounting Distance to Goal.
- UI Animations and Sounds: Clear Ball, Best Score, Current Score, Fail.
- Simulation of Player Breathing (Desktop).
- Mobile Optimizations:
- Object Pool for Throwing Objects to manage the memory.
- Caching for Visible Game Objects before Game Start.
- TextMesh PRO for Texts to update them when really needed.
Bonuses & Difficulties
The Objective of a Football Penalty Game is to Get the Best Score by Hitting Targets without touching the Ground (Football Pitch/ Soccer Field) for as long as possible.
During Shooting, you can Get a Bonus or Difficulty with 1 Scored Ball or with a Combo (several balls scored in a row). Balls Count in Combo can be set in the Unity Editor in the $ game object.
Bonus: Target Growing (Big Ring)
Ring Growing happens when the player scores 1 Clear Ball (without touching of Ring).
This bonus blocks difficulties.
When the Limit of Goals with Big Ring will be reached, then the ring will be returned to the Normal Size and the difficulties will be unlocked.
Difficulties: Movements
2 Movements happen at the same time when the player scores 1 Normal Balls (not clear), the target shows VFX with Explosion, Game Objects Dissolve (Meshes & Shadows):
- Goal Movement. It contains 2 independent parts that can be customized in the GoalParent game object:
- Rotation Around Camera (Player) by a Random Angle in a given range.
- Changing of local Z position by Random Step in a given range.
- Target (Ring) Movement inside the Goal: changing of local X & Y positions to random values inside RingMovementBounds game object. The bounds are described by 3 vertices of an imaginary rectangle: X & Y values of separate game objects. The bounds are already set to their maximum values to avoid gameplay disrupting. You can narrow the bounds as you wish.
User Input
Desktop
In addition to controlling the gameplay via Mouse, you can use the Keyboard on the next scenes:
- Menu:
- Space (Go to Play),
- R (Reset Data),
- Escape (Quit the Game).
- Demo:
- Space (Start Game),
- Escape (Go to Menu),
- W, A, S, D (Rotate Camera).
Mobiles
In Non-AR Mode, Football Game Template uses a Motion Sensor (Gyroscope or Accelerometer) via Sensor Camera asset to control the Player’s Camera. So you need to rotate your phone to set the camera rotation in addition to setting the throw direction by the touch position of your finger (Throw Control).
In AR Mode, AR Foundation controls the Player’s Camera, but you will get the same experience.
The combination of such user input systems allows you to make the most accurate throw at different angles and speeds.
Tutorial
This tutorial is relevant for Football/Soccer 3.0+.
Tutorial for the previous version can be found only in the asset folder.
Getting Started with Football Game 3D
Folders & Files in the package by default:
- Makaka Games;
- XR.
Steps
If you have any issues with the first launch, then just Reach Support with Invoice Number and Get Help.
If you read this tutorial from PDF, first check the latest docs online to get actual information.
- Create a New Unity Project with Unity 2022.3.20 & “3D” Template.
- File > Build Settings > Windows, Mac, Android, iOS, WebGL > Switch Platform.
- Next Packages must be manually installed with Git & Unity Package Manager:
- Download and import Football Game into Unity.
- Warning Windows:
- Click “Import” to overwrite the Project Settings with predefined ones.
- Click “Install/Upgrade” for Package Manager Dependencies.
- Click “No” when enabling the backends for the new input system.
- Warning Windows:
- Next Packages are provided with Unity Package Manager, and they are already installed for this Asset by default. If packages are missing (Warning Window did not appear) then install them again with Package Manager (advanced settings enabled: “Pre-release Packages”):
- TextMesh Pro 3.0.8:
- Always Required: Window > TextMeshPro > Import TMP Essential Resources.
- AR Foundation 5.1.3;
- Apple ARKit XR Plugin 5.1.3;
- Google ARCore XR Plugin 5.1.3;
- Input System 1.7.0.
- TextMesh Pro 3.0.8:
- Reopen Unity Project.
- Open Scene: Makaka Games > Football Game > Scenes > Demo.
- Test in the Unity Editor or Build.
Each Unity Asset included in the Football Game has its own documentation in the target folder or on the website (the latest docs).
“$” Game Object
It’s a Game Controller. Here you can find the main control scripts.
How to Set Balls Count & Throwing Mode?
All the information about throwing you can find in the “Throw Control” Documentation.
Testing and Building
All tested platforms support Non-AR Mode.
If AR Mode is available, user can see a button to activate AR Mode on the Demo Scene before the start.
iOS, Android: AR & Non-AR
Test in the Unity Editor with AR Foundation > XR Simulation.
macOS, Windows: Non-AR
You can test immediately in the Unity Editor from the box, but to Make a Build, you need to Uncheck the Next Flags in the Edit > Project Settings > XR Plug-in Management > Windows/Mac settings:
- Initialize XR on Startup.
WebGL: Non-AR
Learn the Article called WebGL and Unity about Building and Testing Unity games and apps for WebGL.
Tested with Platforms
- Mobile Platforms:
- AR & Non-AR: iOS on iPhone XS Max;
- AR & Non-AR: Android on Samsung Galaxy A71;
- Non-AR: WebGL in Google Chrome.
- Desktop Platforms (Non-AR):
- Windows;
- macOS;
- WebGL in Google Chrome.
Support
First, read the latest docs online.
If it didn’t help, get the support.
Changelog
Check the current version of Football Game on Asset Store.
The latest version will be added as soon as possible.
3.0:
Features:
- AR Mode for iOS & Android: AR Foundation (ARCore, ARKit) + Plane Detection (includes tutorial, visual plane confirmation/resetting, placing the game around the player):
- AR Safe Zone. The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone.
- AR Onboarding UX with Transparent Video Manuals & AR States.
- AR Shadows & Light Estimation: estimates light data in the real world and applies it to game space.
- Editor Testing with AR Foundation > XR Simulation.
- “Select Mode” Panel (on the Demo Scene before the start, you can choose Game Mode):
- AR Mode (if it’s available, user can see a button to activate it),
- Non-AR Mode (all tested platforms support it).
- Using of Native Camera to check Camera Permission before the main scene.
Improvements:
- Unity 2022.3.20.
- Throw Control 6.0 (docs).
- Sensor Camera 2.1 (docs).
- Cashing of Game Objects to avoid freezes at the very 1st start of the game.
2.1:
Improvements:
Fixes:
- C# Warnings when Building for Mobiles.
2.0 (New Platforms):
Features:
- Support for Mobile Platforms using Sensor Camera (docs):
- iOS,
- Android,
- WebGL Support via HTTPS: Android.
- Check information about iOS in the Limitations section of Sensor Camera.
- Keyboard Control on Desktop (in addition to “Mouse only”):
- Menu Scene Buttons can also be clicked using Keyboard:
- Space (Go to Play),
- R (Reset Data),
- Escape (Quit the Game).
- Demo Scene Buttons can also be clicked using Keyboard:
- Space (Start Game),
- Escape (Go to Menu).
- Menu Scene Buttons can also be clicked using Keyboard:
- 3 Flags in Unity Editor to Control the Goal and Ring Movements:
- is Rotation On (Goal),
- is Setting Of Pos Z On (Goal),
- is Ring Movement On (Ring).
- Dissolving for Goal Net.
Improvements:
- Unity 2022.3.11.
- Reorganize Game Objects in the Hierarchy Window based on Order of Execution for Scripts.
Fixes:
- UI Animation of Best Score and Fail for Current Score.
1.0:
- Release for Unity 2022.3.10 and Desktop Platforms: Windows, macOS, WebGL (Google Chrome).