programming

core principles

HTML- language of the web

JavaScript- *REMEMBER: no wrap <head> opt.*

CSS- makes websites look nicer

complex text is known as a string and is written in quotation marks so the computer knows not to treat this as code.

JSFiddle notes:

keyword: var (variable) w/ [INSERT TEXT] = “string”

alert ([INSERT TEXT])

you can also add variables together.

var number1 = 10

var number2 = 5

alert(number1 + number2) will display 105 if the numbers are in “

text box:

var x = prompt (“question?”)

*user types*

alert(“ok.”)

Using Unity

what tool in unity could be utilised by myself?

I did media in school and have a rather wide knowledge of cinematic shots and storytelling, so using tools like timeline and cinemachine’s camera tools, I could create cutscenes and compelling story elements for games.

Pseudocode

Pseudocode is a simplified code that lacks a specific syntax only meant to display an intention and design.

Syntax

Syntax is the order and terminology of coding language, like the rules of the english language. “Me speak good english” is incorrect, and the correct term would be “I can speak good english.”

it’s the same with code, adding ; at the end of each line, and using { and }.

breakpoint

breakpoint is a marked place for the program to start debugging.

a list of operators

+, -, =, ==, !=

keypress code^

wittled down the errors in the code that Chris set us from 50 to 30, there are still mistakes but I will be fixed in the future.

//= comment, to make a string of code unreadable to the computer.

creating a list:

A list, like an array, can store any type of object as long as we specify what type of object we wish for our list to store.

Creating a list of favourite videogame characters:

this script declares some of my favourite videogame characters, the script NOT in green declares my second favourite and the green would declare my first favourite.
pop-up in the console feed in Unity after attaching the code to an object– a camera was the object I used as the camera spawns in default when loading a level you are designing.
The list will appear in the console feed if the code is deemed correct and there are no errors. The list is from the top to bottom.

making a randomly spawning object:

code script for the randomised spawn locations
screen clip of unity

creating a loop:

A loop is a way to execute statements multiple times.

a while loop will loop as long as a set condition is true.

an infinite loop is sometimes caused by an error in the code, and lacks an exit.

this is an infinite loop that, if connected to a game object, will crash unity if the right exit is not taken. Since there are two “infinite” commands in this code, the MouseOnDrag and while will clash and cause the program to fold.
solution from tutor
this is a while loop, it will cause 4 notifications in the console box with the same message 4 times every time play is pressed. If you add something along the lines of “if CupsInTheSink = 0 debug.log(“CUPS CLEAN”)
solution from tutor

We were tasked with fixing a loop of llamas appearing on the game scene, which required a similar fix to the one above. We had to have only 10 llamas spawn instead of the millions.

for loop:

a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly. … For-loops are typically used when the number of iterations is known before entering the loop.

Design a site like this with WordPress.com
Get started