iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

Quiz

Game dev track quiz: 10 questions on loops, physics, math, performance.

Game dev — track quiz

EXAMPLE
# 10 questions. Pass: >= 7.

# ===== Q1 =====
# In a fixed-timestep game loop, physics runs:
# A) Once per frame
# B) At a fixed rate (e.g. 60 Hz) independent of FPS
# C) Only on collision
# D) On user input only

# ===== Q2 =====
# What is delta time?
# A) Time since game launched
# B) Time elapsed since the last frame
# C) Time to next frame
# D) Frame number

# ===== Q3 =====
# AABB collision means:
# A) Axis-Aligned Bounding Box (rectangular collision check)
# B) Asynchronous Binary Bit comparison
# C) Always Bouncing Back
# D) Animation Blend Buffer

# ===== Q4 =====
# Dot product of two unit vectors gives:
# A) Their cross product
# B) The cosine of the angle between them
# C) Always 0
# D) Their sum

# ===== Q5 =====
# To smoothly rotate by 90 degrees over 1 second, you use:
# A) Set rotation = 90 instantly
# B) Interpolate (lerp / slerp) over the duration
# C) Apply impulse force
# D) Use a coroutine that sleeps

# ===== Q6 =====
# A quadtree is useful for:
# A) Rendering text
# B) Spatial partitioning to speed up collision checks
# C) AI pathfinding
# D) Networking

# ===== Q7 =====
# In Unity, MonoBehaviour.Update is called:
# A) Once per frame
# B) Once per physics tick
# C) On collision only
# D) At a fixed 60 Hz

# ===== Q8 =====
# Object pooling helps because:
# A) Reduces garbage collection by reusing objects
# B) Saves disk space
# C) Improves load times
# D) Prevents bugs

# ===== Q9 =====
# Frame-rate independent movement is:
# A) speed = constant
# B) speed * deltaTime per frame
# C) speed / framerate
# D) Position += 1 per frame

# ===== Q10 =====
# Game state machine is good for:
# A) AI behaviour (idle -> chase -> attack -> retreat)
# B) Saving graphics
# C) Networking only
# D) UI animation only

# ===== Answers =====
# 1. B — fixed-step physics decoupled from FPS
# 2. B — time since last frame
# 3. A — axis-aligned bounding box
# 4. B — cosine of angle (for unit vectors)
# 5. B — interpolation over time
# 6. B — spatial partition
# 7. A — Update once per frame
# 8. A — reduce GC by reusing objects
# 9. B — velocity * deltaTime
# 10. A — FSM for AI / enemy behaviour

# ===== Patterns to internalise =====
# - Fixed timestep + interpolated render
# - Vector math: dot/cross, normalisation, lerp
# - Spatial partitioning (quadtree / grid) for big worlds
# - Object pooling for spawned entities (bullets, particles)
# - FSM for AI; behaviour trees for richer logic

Why it matters

Quiz takeaway: fixed timestep + delta time + AABB + dot/cross + lerp + quadtree + pooling + FSM are the daily reflexes. The same patterns work across Unity / Godot / Phaser / Bevy — only the surface syntax changes.

Tip: Tweak the snippet with Try it Yourself », then sit the quiz at the bottom of the page.

Example

Example
// 3 questions per lesson.
Try it Yourself »

Discussion

Loading…