Anda di halaman 1dari 14

Scripting for Computer

Games
Task 01
Programming
Programming is a creative process done by programmer to
instruct a computer on how to do a task. The process of
developing and implementing various sets of instructions to
enable a computer to do a certain task.

Languages of programming used


for games

C++ - C++ is middle level language. C++


is used for forming hardware speeded games,
apps for mobile, desktop software, it is also used
operating system like Windows. C++ is an old
language and is the best language for developing
AAA game& it is used for some game engine
like Cry engine, Unity3D which are made by
C++. C++ is also used for developing games on
other platforms like PC, iOS, Ps 4, Mac etc. C++
was the choice for high-performance for games.
For e.g.-Word of tanks, Prince of Persia 2D,
Unreal engine was created from C++ for
creating Batman Arkham City, etc.

C#- C# also known as c sharp is a modern


language. It is a object- oriented programming
language developed by Microsoft Windows. C# is
easy to learn, produces efficient programs,
compiled on variety of computer platforms.
Unity 3D is made with C++ But the scripting is
written in C#. This language is not used by AAA
game companies for developing games AAA
games companies does not C# for developing
games because C# is a high level language
which means high optimization effort for game, it
is slower than C++.C# is used for developing
good graphic game from Unity3d. For e.g.
Neverwinter Nights 2, Star Wars: The Old
Republic ,etc. There is a book which
describe :

There are some other languages used for developing


games C, Java Script, Action Script, Python, Java ,
etc. ,

General Purpose of programming


A general-purpose programming language is a
programming language designed to be used for writing
software in a wide variety of application domains (a general-
purpose language) & set a valid instructions to computer.

References :

Application protocol Interface


Application protocol interface or API is a set of
commands, functions and protocols which
programmers can use when building software for a
specific operating system. APIs are also used by video
game consoles and other hardware devices that can
run software programs. I have used some code for my
game Push the Box. In this game I have written
movement of box, hole, etc. script.
Codes are used in the game:
OntriggerEnter2D
Gameobject.tag
Boxcollider2d
Raycast2d

Integrated development environment


Integrated development environment or IDE is a
software application that provides facilities to computer
programmers for software development.
Interface Software & Non-Interface Software
i. Interface Software Interface Software describes
as Unity 3D .This means the software which help user
to interact with interface for work. Unity 3D is used
mostly for programming then other software by
beginners for developing games. As explained before
Unity is interface software and for programming it goes
easy to program for e.g. If User created a box and
wants to put a collider to box he can put by using
Unity menu, user did not have write script for
collider which means Unity does not have to
specify everything by writing scripts .This
example shows that Unity is depended on
interface which is help user to work smoothly
and get faster response by Unity 3D.

ii. Non-Interface Software - Non- Interface software


describes as Eclipse. Eclipse is an integrated
development environment (IDE). Eclipse is written
mostly in Java and its primary use is for developing Java
applications. Eclipse is non interface software because
every action done by programming has be
implemented by script for e.g. - If User created a
box and wants to put a collider he has to write
script program to work which means Eclipse has
to specify every single action by writing scripts.
This example shows that Eclipse is not depended
on interface and user has to explain everything
by programming.

Libraries
Libraries is a collection of files which can be used by a
program. In Push the box game I have use sprites (box,
hole, arrow keys, wall) & font style .

Compiler
A compiler is a computer program or a set of
programs that transforms source code written in a
programming language into another computer
language.

Source of Support (For Unity)


Unity has support like:
1. Unity Community- Community helps user to
solve their problem related to audio, scripts,
graphics, physics, multiplayer networking,
animation etc.

2. Unity wiki Unity wiki is a part of Unity


community and is a place to share Unity
Knowledge.

3. Unity Script Reference- Unity help user to find


script references for writing codes.
Basic programming concepts used for
game
i. Class- Class is a blueprint of an object. Game Fill the
Hole has some class like box, hole & brick are the class
and operations can be performed on such an object.
ii. Variable- Variable are used to store information to be
referenced and used by the program. As in my game Fill
the Hole script has many variable and User can use any
word like name, places, etc. It does not affect the script.
a. Integers Integer is a numeric data .In
programming Integer is written as int without a
decimal point. FOR e.g. Game fill the hole has
certain level with different difficulty pushing
the box into hole & for going to the next
level user have to give a number It can be
seen as +1 or some other no. as progress.
b. Float Float is a decimal number. For e.g. Game
fill the hole has certain time limit to push
the box into hole for that user has to write a
time limit. It can be seen as (4.0f) or some
other no. as time.

Data Type
i. Store Data- Store data means storing data of game
with programming .For e.g. My game fill the hole
has scoring when the box is pushed into the hole
score generates ,these types of data is stored .
ii. Subject to change as vary It means the
variable vary changes ,while programming user
variables vary and in fill the hole game in script
variable vary changes.
iii. Types
String String means alphabet used while writing
script .In fill the hole game. User explains writing
script to define string Player, etc.
Boolean Boolean means statement give true or false
.For e.g.- In Fill the hole game box movement decides
by true or false as when box should be moved or
destroyed in some direction the it should be define as
true or false.

Task 02

GAME IDEA
i. Game Concept-Game Fill the Hole is a 2D puzzle
game for the PC. The game Core mechanic is to fill the
hole by moving the box to hole.
You are a gamer. One day you are invited by your
friend to gaming night and you play game to fill the
hole by box.
Fill the hole by pushing the box in the hole.
Complete 10 levels.
Brick help the movement of box to hole in different
levels.
Moving box in wrong direction can end the game by
losing the level.
Project Planning
i)Key task Create a game Fill the
Hole on Unity
ii)Schedule tasks
Date Task Task difficulty remark
done
17-2-16 Create a 20-2-16 How to Abid sir told
game import to check the
sprites and slicesprites
with the in Unity proportion
reference and use Psd
of sprites
22-2-16 Create 24-2-16 What Abid sir told
document topics us to create
should be proper
written in format of
documen document
t
25-2-16 Create 10 27-2-16 How to Abid sir told
level of create us to check
game difficulty the game
according level
to level difficulty
29-2-16 Changes 8-3-16 How to Abid sir told
in change us to write
Document things in things in
documen detail
t
9-3-16 Start 19-3-16 How to
Programmi clear
ng errors

iii) Project Plan


a) Creating level from reference game
Game has 15 level .I have to take a
reference with game mechanics.

b)Sketch 10 levels-Sketch 10 level


where I created levels difficulty according to
levels .Using box to move in hole and in
some levels colliding with bricks and then
pushing box into hole.
1-6 levels
c) Make document- Create Scripting
document where mention about
programming what is programming?
purpose of programming, Concepts of
programming,etc.Document also have level
sketches, reference level everything in
detail which give an Idea about
programming used in game.
d)Create sprites for game( Box,
hole, Wall, arrow for direction)- Create
sprites in Photoshop in Psd format which
give assets for game -box, hole ,wall &
arrow key. These assets helps create a
game.
e) Import sprites In Unity-Importing
Sprites and then slicing sprites creates
single assets for box, wall, hole and arrow
key which used for game.
f) Programming in Unity-After
creating sprites create scripts and write
code of box movement ,hole ,Wall .These
scripts help to move the box inside the hole.
Creating more script like-level manager
,score detect, etc by usingC# develop the
game.

Box Movement
Hole Script

Task 03

Unity3D for developing game

Unity 3D is a freeware game engine (Personal Edition)


Unity 3D supports multiplatform - iOS, Android,
Windows, PS3 &PS4, Xbox One, Oculus Rift, etc.
Language used for scripting C# & Java Script
Unity 3D provides good Rendering Quality
Unity provides Asset store which help the user to
download animation, 3D models, lighting packs,
sound, etc.
Community helps user to find answers to his problem
faced while working in Unity 3D on some topics like
scripting, animation, lighting etc. User ask
question, clear queries etc., with the community expert
helps the user in finding solution to their problem.

Source used for programming

http://c2.com/cgi/wiki?
PurposeOfProgramming
https://en.wikipedia.org/wiki/General-
-purpose_programming_language
Reference Game Fill the Holes
-http://www.lessmilk.com/games/5/
Forum.unity3d.com

Develop for Pc

I am creating my game for PC because Pc has


more user then other platform so, lots of user can
play the game.

Object Oriented Programming

Object Oriented also known as OOP means programming is


to create an object, in code, that has certain properties and
methods. As explained before game Fill the Hole has
certain object like box, hole, & wall. These objects has
certain properties.

Anda mungkin juga menyukai