GDScript Tutorial Notes
GDScript Tutorial Notes
Use Memory
● read/write memory operations are happening as you are
using the allocated memory
● Assigning and changing variable values in your script/code
Release Memory
● When variable(s) are no longer in use release the entire
memory so that it is freed and can be used to allocate new
memory
● *Dependds on the programming language you are using
whethe this is done manually or automatically
General Tip for Memory
● The less memory you use the better in general
● For games using less memory takes into consideration the
performance for users who are using lower size rams in
computers
Going over Allocacted Memory
● If there is enough space the os will allocate more memory
from ram to your app/game
● If you go over the ram limit the os will start allocating
memory to the hdd/sdd
● Using hdd/sdd for memory is slower than using ram
●
●
● Godot version
●
Operands
● Operands are numerical, text, and boolean values that
a program can manipulate
● Operands can also be object values
● 1 + 2 (operands are 1 and 2)
● X - y (operands are x and y
Operators
● Operators are symbols used to manipulate and check
operand values
● 10 + 20 (operators are +)
● X -1 (operators are -)
Comparison Operators
● A comparison operator compares its operands and returns a
logical value based on whether the comparison is true
● To see if 2 operands are equal use the equal operator (==)
● To see if 2 operands are not equal use the not equal
operator ( !=)
● To see if the left operand is greater than the right operand
use the greater than operator pointing to the right ( >)
● To see if the right operand is greater than the left operand
use the greater than operator pointing to the left (<)
● To see if the left operand is greater than or equal to the right
operand use the greater than or equal to operator pointing
toi the right (>=)
● Opposite the top note (<=)
Logical Operators
● GDScript has 3 logical operators
● &&, ||, !
&&
● The logical AND operator is denoted by the 2 && or the word
“and”
● It will return fals as long as any of the operands can be
converted to false starting from the left most operand