0% found this document useful (0 votes)
16 views

Code With Me

Uploaded by

sania
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Code With Me

Uploaded by

sania
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 67

• We will go to github there is a link we will clown entire file into git.

• In github we have to again download boiler plates it’s a long procedure.n generate the
github link .
• we do all this by using just simple commands in git.
• 2 kinds of repository , local & global.
• If many people r using then when changes should be made it should be made in global
repository.
• By using github more people can work on it.
• We r working on git , its working area.
• In staging area all changes are merged.
• Pwd - Present working directory.
• Directory- set of files.
• isStatic is an attribute , its imp for giving option whether we r moving r keeping it stationrey.
• var options {
• isStatic:false;
• }
• In function draw we will update our engine
• Engine.update(engine);
• The benefit of making a seprate class , class is a blueprint/design .rather than creating many objects again n again , we can crate a class and object and use it to create
multiple objects.
• In constructor we initialize the properties.
• Options we can get dynamics n real life effects , we can put it in a body.
• Inheritance – when someone inherit some properties from someone.
• Generalisation-when we go from lower side to upper side.it’s a general class.
• Specialisation-when we go to up to down . It’s a special peroperties which are added.
• overriding .
• Super – it refers to thr baseclass.
• Github we don’t have to write , everything is graphical.
• Iin cui kind of interface is git.
• Github is gui.
• Boiler plate we download the files.
Fling at convenience storetore

• We are giving –(6 3*score/100) – so that the score increase along with the velocity and speed of the object.
• We should give the gravity for the obj so that the object jumps and return back = obj.velocityY=obj.velocityY+0.8
• We can give lifetime as (-1) so that it never reaches 0.
• Algorithms-what steps we want to follow is algorithms , and then we
• Translate it to any programming languages we want.
• Boiler plate is a container in which everything is present.
• Physics engine will help us to real time effect can be added in our program& helps us to use physics related concepts in
program.
• Physics engine is a library.matter.js is a physics engine.
• Engine,world and body present in matter.js
• To assign in center , rectMode(CENTER)
• Nickname for code is called name spacing.
• Variable varies
• Const which is constant does not vary/change for matter.js.
• Const Engine=Matter.Engine; and so on……
• We take a var say engine
• engine-=Engine.create()
• World=engine.world;
• Algorithms.& Ui and ux design
• Induntation- select the text and press tab key.
• Modulus operator-gives remainder
• Lifetime – for freeing memory space and not wasting memory & giving it a life time .
• Switch- it’s the best option when we want to deal with number of conditions , rather than
using if so many times or nested if else condition& not be understandable so much.
• We use break in switch function bcoz if do not write break the other conditions will also be
executed , so we give break after writing case:1 n so on…
• We assign var , it will be stored in memory so that whenever we write abouit the obj comp will
understand.
• Framecount%any no ==0;
• Rather than writing the same code again and again , we can write a different function for that n
call that function whenever needed , how many ever times needed.
• Concatination- joining- score+math.round(random(1,4));
• Three Gamestates – serve
• play
• end/over
• If condition – is for conditional programming.
• Or we can also use if …..then…. Else…..
• Collider – its like a membrane , covering the objects.
• Obj.setCollider(“circle”,0,0,40);

the centre if the collider is on the obj centre.


if we keep 30 the centre of the obj will be 30 distance away from collider.
If we want the collider to be seen then
Obj.debug=true;
Artificial intelligence – when we feed the instructions to machine and make them artificial intelligence.
Variables can be global or local . Global will be declared above all functions.local will be inside function.
Framecouunt-is when we start the game , how many frames have passed through.
Framerate-is per unit time that is 1 min how many frames have passed divided by a no gives u s the score
Visual studio – can use when no internet , offline
Function we create – r user created.
-it helpStyle.csss us to make the website more attractive r stylish.
The sound files/library or picture library should be present in index.html.we should provide the links in it.
If we download our program in p5- it will be in compressed form but we ahpould right click in the progerm then click on show in folder then click on that
program then click on extract all
200 ok server
Github to publish links for our games.
createCanvas ( windiwWidth,windowHeight); we use it so that our game is adjusted to the screen width n height of the device.
In array we can keep different things , character , numerical , for exam.A=[1,2,3] or b=[“sania”, “taruvar”]
Array is special data structers where we can store no of things.
Indexing : we can index the element sy for ex([“1,2,3,4] then index of 1 is 0 , 2 is 1 , 3 is 2 , 4 is 3.
Length is referred to number of elements present in it ,length of array is calculated this way.
We write play and end gamestate in caps , bcoz we r saying that state is constant.
P5
editor
Pong game
game1
Game
2
Game -
3
Game-4
Game-5
Links of the class – videos
we learned java script.
• Class1-https://youtu.be/KddaKPydV7w
• Class2-https://youtu.be/F8k42ebTHAc
• Class3-https://youtu.be/GA3-QttYloU
• Class4- https://youtu.be/_lXzX2GP67I
• Class 5-https://youtu.be/BA6MBN7OVoA
• Class6-https://youtu.be/uhh3kdCqjog
ping pong
game
Xxxxxxxxxxxxxxx
• Worlds hardest game-
https://studio.code.org/projects/gamelab/
eK7RCAKFxX9LIgxjm3O8CZAW2CCv0C85RhBROfbJx
Ro

• https://studio.code.org/projects/gamelab/
eK7RCAKFxX9LIgxjm3O8CZAW2CCv0C85RhBROfbJx
The Promise of Chang’an
General’s Lady
• tale of nine tailed

You might also like