Presiding Officer Training module 2024 lok sabha elections
unity gaming programing basics for students ppt
1.
2. Introduction
What Is Unity
Installing
Unity Basics
Graphics
Physics
Scripting
Contents
Multiplayer And Networking
Audio And Animation Navigation
Assets
Platform
Build
3. Unity is a cross-platform game engine initially released
by Unity Technologies, in 2005.
The focus of Unity lies in the development of both 2D
and 3D games and interactive content.
Unity now supports over 20 different target platforms
for deploying, while its most popular platforms are the
PC, Android and IOS systems.
Unity features a complete toolkit for designing and
building games, including interfaces for graphics,
audio, and level-building tools, requiring minimal use
of external programs to work on projects.
4. Game engine
3D Objects/ Lighting/ Physics/ animation/ scripting
Accompanying script editor
MonoDevelop( win/mac )<<RECOMMANDED TO USE
Can also use visual Studio (Windows)
3D terrain editor
3D object animation manager
GUI system
Executable exporter many platforms:
Native application / web player / iPhone / Android
/ Will
5. System Requirements
Windows: XP Sp2 or later.
Mac OS X: Intel CPU & “Snow Leapard” 10.6 or later.
Note That Unity was not tested on server versions of windows and OS x.
Graphics card with Direct 9 level capablities. Any card made since 2004
should work.
Using Occlusion Culling requires GPU with Occlusion Query support.
Installation
1. Download the latest Unity Distribution from https://unity.com/
2. Run the installer with default settings.
3. Run Unity for the first time. It may open the demo project, or it will ask you to
create a project. Open the demo or create a new project without changing any
settings.
4. Register online, fill out your email address and just use the free/ indie licence.
5. Go to file > Open Project
6. When your project will be loaded, it will open in unity. More on next slide
6. Unity is equally suited to creating both 2D and 3D games. When you
create a new projects in Unity, you have the choice to start in 2D or 3D
mode.
The choice between starting in 2D or 3D mode determines some
setting for the Unity Editor, such as wheather images are imported as
textures or sprites.
Full 3D
Orthographic 3D
Full 2D
2D gameplay with 3D graphics
2D gameplay and graphics, with a perspective camera
7. As you can see in the screen shot that the graphics are realistic. See how the
shadow of tree is accordingly to the sun light and the rest of graphics are also
giving it a realistic view.
Unity offers
amazing visual
fidelity,
Lighting
Cameras
Materials
Shaders
&Textures
Particles %
Visual Effects
Much more.
8. To have convincing physical behaviour,
An object in a game must accelerate correctly and be affected by conllsions,
gravity and other forces.
Unity’s built-in physics engines provide components that handle the physical
simulation for you. With just a few parameter settings.
You can create objects that behave passively in a realistic way. By controlling the
physics from scripts, you can give an object the dynamics of a vehicle, a
machine, or even a piece of fabric.
For example, there is right body components for 3D Physics and an analogous
Right body 2D for 2D Physics.
9. Unity implements a MONO compiler
Scripts can be written in…
JavaScript
C#
In Unity, select from the menu Assets->Sync Visual Studio Project
Find the newly created.
Open that file with Visual Studio Express.
In Unity, go to Edit->Preferences, and make sure that Visual Studio is
selected as your preferred external editor.
Double click a C# file in your project. Visual Studio should
automatically open that file for you.
You can edit the file, save, and switch back to Unity.
You can now edit all your script files, and switch back to Unity to use
them.
10. Multiplayer Networking is inherently detailed and
complex.
There are particular issues and difficulties associated with
synchronizing and communicating between multiple
instances of a project which are often running on different
machines that could be in different and distant parts of the
world.
Unity's built-in Multiplayer Networking and the associated
High Level API (HLAPI), we hope to make creating
Multiplayer projects easier to use.
11. Unity's Audio features include full 3D spatial sound, real-time mixing
and mastering, hierarchies of mixers, snapshots, predefined effects and
much more.
A game would be incomplete without some kind of audio, be it
background music or sound effects. Unity's audio system is flexible and
powerful
Unity's Animation features include retargetable animations, full
control of animation weights at runtime, event calling from within the
animation playback, sophisticated state machine hierarchies and
transitions, blend shapes for facial animations, and much more.
Unity's animation system is based on the concept of Animation Clips,
which contain information about how certain objects should change
their position, rotation, or other properties over time.
12. The navigation system allows you to create characters that can
intelligently move around the game world, using navigation meshes
that are created automatically from your Scene geometry.
NavMesh is a data structure which describes the walkable surfaces of
the game world and allows to find path from one walkable location to
another in the game world.
NavMesh Agent component help you to create characters which avoid
each other while moving towards their goal. Agents reason about the
game world using the NavMesh and they know how to avoid each other
as well as moving obstacles.
Off-Mesh Link component allows you to incorporate navigation
shortcuts which cannot be represented using a walkable surface.
NavMesh Obstacle component allows you to describe moving obstacles
the agents should avoid while navigating the world. A barrel or a crate
controlled by the physics system is a good example of an obstacle.
13. Asset Store
Unity's Asset Store is home to a growing library of free and commercial
assets created both by Unity Technologies and also members of the
community.
A wide variety of assets is available, covering everything from textures,
models and animations to whole project examples, tutorials and Editor
extensions. The assets are accessed from a simple interface built into
the Unity Editor and are downloaded and imported directly into your
project.
You can open the Asset Store window by selecting Window-Asset Store
from the main menu. On your first visit, you will be prompted to create
a free user account which you will use to access the Store subsequently.
14. •The extension of a unity file is .unity. You can make games on unity for
different platforms that include Android and iOS.
This screen shot is showing the
platforms on which you can export
your .unity file.
So now you see the unity is a huge
tool if you are interested in game
development.
However, in these slides we will only
cover Unity for PC games.
Unity is a freeware software. Bur it is
now freeware if you want to use it
for commercial purpose.
15. From the menu bar select
File -> Build Settings
1. Select Scenes to Build.
2. Select Platform
3. Click Build And Run