← IGCSE Computer Science Paper 1

Automated systems in gaming

Sensors in a controller or headset send readings to a microprocessor, which changes what the player sees or feels, such as moving the view or making the controller vibrate.

Understanding Automated systems in gaming in IGCSE Computer Science Paper 1

What it does: The headset sensors report the head movement and the microprocessor changes the displayed view to match it. The infra-red sensor gives a position reading, which the microprocessor uses to move the character in the game. The microprocessor processes the readings and decides what to change in the game. An actuator only carries out an action. The vibration motor is an actuator because it is an output that creates movement the player can feel. A sensor is an input. The accelerometer reading is compared with a stored value, and the microprocessor then triggers the action on screen. Sensors send readings in, while actuators receive signals out. The vibration motor makes the controller shake, so it is controlled, not read.

Common mistakes: The variable speed was never created. The accelerometer reading is stored in tilt, so the steering call must use CALL steer_car(tilt). When the player turns their head in a VR headset, the picture must move. It should be CALL move_view(turn), not the vibration motor.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 580–607) and word search (Modules 553–607).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A motion controller is swung like a tennis racket. Which sensor detects the movement?
AccelerometerHumidity sensor
Matches
pressure ← READ(vibration_motor)
↓
A vibration motor is an actuator (an output device), so the microprocessor cannot read from it like a sensor. It should switch it on with something like VIBRATE(1).
Applying
Meanings
Term
gaming automated system
Meaning
Sensors in a controller or headset send readings to a microprocessor, which changes what the player sees or feels, such as moving the view or making the controller vibrate.
Practice
tilt ← accelerometer
Testing
Gaps
shake ← READ()
Check Answer
Spots
2 tilt ← READ_ACCELEROMETER()
3 CALL steer_car(speed)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Elephant' badge — OOP Heavyweight, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A motion controller is swung like a tennis racket. Which sensor detects the movement?
A. Accelerometer ✓
B. Humidity sensor
An accelerometer measures changes in movement and tilt, so the microprocessor can copy the swing on screen.
2. In a games console, which part processes the sensor readings from a controller?
A. Actuator
B. Microprocessor ✓
The microprocessor processes the readings and decides what to change in the game. An actuator only carries out an action.
3. A controller buzzes when the player's car hits a wall. Which part of the system is the vibration motor?
A. Actuator ✓
B. Sensor
The vibration motor is an actuator because it is an output that creates movement the player can feel. A sensor is an input.
4. A VR headset turns the view when the player turns their head. What happens first?
A. The screen changes and then the sensors detect the movement
B. Sensors detect the head movement and send readings to the microprocessor ✓
The order is: sensor reading, then microprocessor processing, then output. The screen only changes after the readings are processed.
5. Which pair of sensors could track where a player is standing in front of a game camera?
A. Infra-red and proximity sensors ✓
B. pH and gas sensors
Infra-red and proximity sensors detect a person's position and distance. pH and gas sensors measure chemical properties, which are not useful here.

Match the Pairs

IF acceleration > 8 THEN SWING_SWORD → A fast movement of the motion controller makes the character swing a sword in the game
IF hit = TRUE THEN VIBRATE(1) → When the game detects a hit, the microprocessor switches on the vibration motor so the player feels it
A VR headset responds to head movement by changing the view the player sees → IF head_turn = LEFT THEN VIEW ← LEFT
An infra-red sensor tracks where the player is so the game can move their on-screen character → pos ← READ_IR() MOVE_AVATAR(pos)
pressure ← READ(vibration_motor) → A vibration motor is an actuator (an output device), so the microprocessor cannot read from it like a sensor. It should switch it on with something like VIBRATE(1).
SCREEN ← head_sensor → The headset sensor must not control the screen directly. Its reading goes to the microprocessor, which processes it and then changes the view.

Key Term

gaming automated system
Sensors in a controller or headset send readings to a microprocessor, which changes what the player sees or feels, such as moving the view or making the controller vibrate.

Fill in the Blanks

1. shake ← READ(accelerometer) IF shake > 8 THEN OUTPUT "Sword swing"
Hint: Type the sensor that detects how a motion controller is moved.
2. dist ← READ(proximity) IF dist < 1 THEN OUTPUT "Move back"
Hint: Type the comparison operator meaning the player is closer than 1 metre.
3. IF hit = TRUE THEN SET motor ← ON ENDIF
Hint: Type the state that makes the vibration motor (the actuator) run.
4. IF head = "left" THEN view ← "turn left" ENDIF
Hint: Type the keyword that follows the condition in a selection statement.
5. player ← READ(infrared) IF player = "left" THEN OUTPUT "Move view left"
Hint: Type the variable that stores the reading from the tracking sensor.

Spot the Error

Question 1
A WHILE game_running = TRUE
B tilt ← READ_ACCELEROMETER()
C CALL steer_car(speed)
D ENDWHILE
Line C — The variable speed was never created. The accelerometer reading is stored in tilt, so the steering call must use CALL steer_car(tilt).
Question 2
A WHILE headset_on = TRUE
B head ← READ_MOTION_SENSOR()
C turn ← head - last_head
D CALL vibrate(turn)
E ENDWHILE
Line D — When the player turns their head in a VR headset, the picture must move. It should be CALL move_view(turn), not the vibration motor.
Question 3
A damage ← GET_HIT_STATUS()
B IF damage ← TRUE THEN
C vibration_motor ← ON
D ENDIF
Line B — An IF condition must compare values using =. The arrow ← is for assigning a value, so the line should be IF damage = TRUE THEN.
Question 4
A player_x ← VIBRATE()
B character_x ← player_x
C CALL draw_character()
Line A — The player's position is tracked by an input sensor. A vibration motor is an output device, so the line should read from the infra-red sensor: READ_INFRARED().
Question 5
A dist ← READ_PROXIMITY()
B warn ← FALSE
C IF dist > 50 THEN
D warn ← TRUE
E ENDIF
Line C — The warning should appear when the player is too close to the wall. The proximity reading must be less than 50, so the test is dist < 50.

Student with a class code? Join your class →