wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Object Collision

Total questions: 19

Worksheet time: 10mins

Name
Class
Date
1.

Which statement best defines an object collision in a 2D game?

a)

Two graphic objects overlap on the screen

b)

Two images load on the same Surface

c)

Two Rects have identical width and height

d)

Two sprites move at the same speed together

2.

In PyGame, which structure is commonly used to check whether two objects intersect?

a)

Color tuples that represent pixel values

b)

Surface layers that store background art

c)

Rect objects that track position and size

d)

Coordinate pairs stored in lists

3.

What does a Surface represent when building a simple PyGame scene?

a)

A collision map for physics

b)

A rectangle that stores size only

c)

A coordinate pair for movement

d)

An area where objects are drawn

4.

Which option correctly pairs a term with its primary purpose in PyGame?

a)

Coordinates (x, y) — locate an object on screen

b)

Collision — define frame rate and timing

c)

Rect — render textures and audio data

d)

Surface — detect overlaps between sprites

5.

A player sprite at coordinates (120, 80) and an obstacle have overlapping Rects on the same Surface. What conclusion is most accurate?

a)

A collision has occurred between the two objects

b)

No intersection exists between their boundaries

c)

Only the obstacle has moved off the screen

d)

The sprites share the same image resource

6.

Which parameter in pygame.Rect(x, y, width, height) controls the horizontal screen position of the rectangle’s top-left corner?

a)

y parameter controls horizontal position

b)

width parameter controls horizontal position

c)

x parameter controls horizontal position

d)

height parameter controls horizontal position

7.

In pygame.Rect(x, y, width, height), what do width and height represent?

a)

The collision state between objects

b)

The object’s size in pixels

c)

The object’s starting coordinates

d)

The window’s dimensions in pixels

8.

What does rect1.colliderect(rect2) return when the two rectangles overlap on the screen?

a)

True boolean value

b)

False boolean value

c)

An integer overlap area

d)

A tuple of contact edges

9.

Which code snippet correctly checks for a collision between two Rects named a and b?

a)

if a.colliderect(b): handle()

b)

if colliderect(a, b): handle()

c)

if a.intersects(b): handle()

d)

if a.collide(b) == True: handle()

10.

Two Rect objects are placed so they touch edges without any area overlap. What will colliderect() most likely return?

a)

True only for horizontal edges

b)

True only for vertical edges

c)

True because edges are touching

d)

False because no area overlaps

11.

Which statement best defines a collision event for Rects in PyGame?

a)

Collision occurs when widths are equal

b)

Collision occurs when centers match

c)

Collision occurs when corners align

d)

Collision occurs when areas overlap

12.

If rectA has a smaller y value than rectB, which is typically true about their vertical relationship on a standard screen coordinate system?

a)

rectA appears above rectB

b)

rectA appears below rectB

c)

rectA appears left of rectB

d)

rectA overlaps rectB

13.

Which change will move a Rect 10 pixels to the right without resizing it?

a)

Increase width by 10 units

b)

Decrease x by 10 units

c)

Increase height by 10 units

d)

Increase x by 10 units

14.

A game must trigger a sound only when the player sprite overlaps an enemy. Which approach is most appropriate?

a)

Compare widths of both rectangles

b)

Use colliderect() in the update loop

c)

Check if x and y values are equal

d)

Only test when keys are pressed

15.

Which condition best enforces movement constraints for a player rectangle in a 2D canvas with width W and height H? Assume x,y are the top-left coordinates and w,h are the rectangle size.

a)

Scale position by canvas size every frame update

b)

Reset position to center if x or y becomes negative

c)

Reverse velocity whenever a key is pressed by user

d)

Clamp x and y between 0 and W,H minus w,h

16.

You implement arrow-key movement for a rectangle. What is the most reliable approach to ensure smooth movement?

a)

Track key-down states and update each frame

b)

Move only on keypress events without state

c)

Increase speed when keys are held randomly

d)

Use blocking delays after every key event

17.

Two axis-aligned rectangles A and B should trigger a color change when they collide. Which collision test is correct?

a)

A.area equals B.area at collision moment only

b)

A.left equals B.right or A.right equals B.left exactly

c)

A.right > B.left and A.left < B.right and A.bottom > B.top and A.top < B.bottom

d)

A.center equals B.center in both axes exactly

18.

When moving the target after a collision, which method best prevents spawning partially outside the screen?

a)

Place at fixed corners alternating each score

b)

Random x in [0, W - targetW], y in [0, H - targetH]

c)

Random x and y anywhere in [0, W] and [0, H]

d)

Random x,y then clamp only if off left edge

19.

A rectangle controlled by arrow keys should not pass through walls. Which additional step beyond overlap testing most effectively prevents tunneling at high speeds?

a)

Use per-axis movement with collision resolution after each axis

b)

Increase speed further to cross walls quickly

c)

Detect collisions using object areas only

d)

Only check collision every few frames