Code With Me
Code With Me
• 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);
• https://studio.code.org/projects/gamelab/
eK7RCAKFxX9LIgxjm3O8CZAW2CCv0C85RhBROfbJx
The Promise of Chang’an
General’s Lady
• tale of nine tailed