1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NikAS [45]
2 years ago
5

What happens when you create a variable in a video game program?​

Computers and Technology
1 answer:
gulaghasi [49]2 years ago
7 0

Answer:

A lot can happen, depending on the use of the variable

Explanation:

Lets create a position variable, a common variable in games.

Vector3 position = new Vector3(0, 0, 0);

The above variable initialization creates a new Vector3 object. The Vector3 class contains 3 properties, X, Y, and Z. When you assign the variable 'position' the new Vector3 object, the variable 'position' contains an instance of Vector3 where

X = 0,

Y = 0,

and Z = 0.

The variable 'position' can be used to set the position of a player, or an object.

We can reuse this variable when you want the object or player to move.

position.X = 29

position.Y = -14

position.Z = 47

now the object/player's position is (29, -14, 47).

Variables can be used for basically everything you need in programming, from storing a position, to storing the result of a complex math equation.

You might be interested in
____ is scientifically seeking and discovering facts.
galina1969 [7]

Answer:

I believe it is science, but before you do anything with this answer, research more on it, just in case I'm wrong! :)

Explanation:

3 0
2 years ago
What kind of writing system did the egyptians to develop a system of writing?
kipiarov [429]
The writing system the the Egyptians used to develop a system of writing was hieroglyphics.
4 0
3 years ago
All of the following can cause a fatal execution-time error except: Group of answer choices Dereferencing a pointer that has not
7nadin3 [17]

Answer: Dereferencing a variable that is not a pointer

Explanation:

The execution time also refered to as the CPU time pertaining to a given task is the time that is used by the system to execute a task.

Some of the reasons for a fatal execution-time error include:

• Dereferencing a pointer that has not been initialized properly

• Dereferencing a null pointer

• Dereferencing a pointer that has not been assigned to point to a specific address.

It should be noted that dereferencing a variable that is not a pointer doesn't cause a fatal execution-time error.

6 0
2 years ago
What is CPU<br>and it's functions<br>​
BartSMP [9]

Answer:

CPU is considered as the brain of the computer. CPU performs all types of data processing operations. It stores data, intermediate results, and instructions (program). It controls the operation of all parts of the computer

5 0
2 years ago
Read 2 more answers
Is this good connection to be able to record edit and post videos?
Sholpan [36]

Answer:

The answer to your query is Yes and the details are in explanation section.

Explanation:

The general rule video is

  • if you have 3 MB speed is enough for normal video.
  • 5 MB for HD
  • 25 MB for HDR or 4K

For the above it is clear that yes your connection is good enough for videos.

but it lack in HDR or 4K  videos.

4 0
2 years ago
Other questions:
  • Fordham3 Hardware is known for its consensus buying center culture. Recognizing this corporate culture, someone attempting to se
    8·1 answer
  • Write a program that reads in the length and the width of a rectangular yard.
    5·1 answer
  • Write a Java test program, named TestGuitar, to create 3different Guitars representing each representing a unique test case and
    8·1 answer
  • You will be creating a program that implements the Observer design pattern. This design pattern is utilized in almost all GUI sy
    10·1 answer
  • Which type of fiber-optic connector, containing one fiber-optic strand per connector, is connected by pushing the connector into
    7·1 answer
  • These icons cannot be removed from the Dock. Finder e-mail music player Trash
    14·1 answer
  • What does NBT stand for?​
    11·1 answer
  • In the software development process, which review studies the software design before it is released for coding?
    7·1 answer
  • Aaaaaaaaaaaaaaaaplssssssssssssssssssssssssssssshelpppppppppppppppppppppppp
    11·2 answers
  • For which of the four game elements will you give a detailed description about the challenges that the player will face, such as
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!