Game Dev — 275 questions
Play ▸- #1 · What does this line likely do in a game loop? player.position += velocity;
- #2 · What does this condition check? if (player.isGrounded) jump();
- #3 · What is the purpose of this call? renderSprite(sprite, x, y);
- #4 · What does this function likely do? loadTexture('player.png');
- #5 · What does this statement update? score += 100;
- #6 · What is the most likely purpose of this call? audio.play('jump');
- #7 · What happens when this condition is true? if (enemy.health <= 0) destroy(enemy);
- #8 · What does this call likely do? showHUD();
- #9 · What does this code check? if (input.isPressed('Space')) jump();
- #10 · What physics concept is applied here? velocity.y += gravity * deltaTime;
- #11 · What effect does this have? sprite.playAnimation('run');
- #12 · What is this condition testing for? if (player.bounds.intersects(enemy.bounds)) onHit(
- #13 · What is the likely purpose of this call? spawnEnemy('orc', x, y);
- #14 · What does this function likely do? saveGame({ level, score, player });
- #15 · Which architecture does this pattern suggest? world.addComponent(entity, new Velocity(2, 0));
- #16 · Why multiply movement by deltaTime? position += speed * deltaTime;
- #17 · What value does this return? x = lerp(a, b, 0.5);
- #18 · What is this algorithm used for? path = aStar(start, goal, grid);
- #19 · What technique is being used here? bullet = bulletPool.get();
- #20 · What optimization does this perform? if (!camera.frustum.contains(obj)) continue;
- #21 · What does wasPressedThisFrame detect? if (input.wasPressedThisFrame('Fire')) shoot();
- #22 · What does applying an impulse do? rigidbody.applyImpulse(direction * force);
- #23 · What does AABB stand for? if (aabbOverlap(a, b)) resolve(a, b);
- #24 · Which pattern manages behavior like this? enemy.state = 'chase';
- #25 · What does this loop implement? while (accumulator >= FIXED_DT) { step(FIXED_DT);
- #26 · Why draw many sprites in a single batch? spriteBatch.draw(all);
- #27 · What does loop: true cause? music.play({ loop: true });
- #28 · What are quaternions commonly used for? transform.rotation = Quaternion.Euler(0, 90, 0);
- #29 · What is the effect of parenting the sword to the hand? sword.setParent(hand);
- #30 · What does this call most likely create? emitter.emit(50);
- #31 · What networking technique is this? applyInputLocally(input); sendToServer(input);
- #32 · What kind of level does a tilemap build? tilemap.setTile(3, 5, 'grass');
- #33 · What does this line do in a coroutine? yield return new WaitForSeconds(2);
- #34 · What does enabling VSync help prevent? settings.vsync = true;
- #35 · What does this line apply over time? velocity += gravity * dt;
- #36 · What is a draw call?
- #37 · What does this compute? float d = Vector2.Distance(a, b);
- #38 · What is a keyframe in animation?
- #39 · What does GetKeyDown detect? if (Input.GetKeyDown(KeyCode.Space))
- #40 · What is object pooling?
- #41 · What does an easing function shape?
- #42 · What does this line do? health -= damage;
- #43 · A finite state machine (FSM) controls what?
- #44 · What is a shader?
- #45 · What does deltaTime represent?
- #46 · What does Lerp do? float y = Mathf.Lerp(a, b, t);
- #47 · What guides the A* search algorithm?
- #48 · What is client-side prediction?
- #49 · What is a prefab?
- #50 · What does this line most likely do? PlaySound(jumpSfx);
- #51 · What does this line do? if (Input.GetKeyDown(KeyCode.Space)) Jump();
- #52 · What does clamping the fall speed model? velocity.y = Mathf.Max(velocity.y, -maxFall);
- #53 · What does a spatial partition like a quadtree speed up?
- #54 · What does culling do?
- #55 · Why pack sprites into a single atlas?
- #56 · Why compress textures for a shipped game?
- #57 · What is a finite state machine used for in games?
- #58 · What does an entity-component-system separate?
- #59 · What does this guarantee? health = Mathf.Clamp(health, 0, 100);
- #60 · What is a HUD in a game?
- #61 · What problem does input buffering solve?
- #62 · What does interpolating between keyframes produce?
- #63 · What is a bounding box used for?
- #64 · What kind of check is this? if (Vector2.Distance(a, b) < radius) Hit();
- #65 · What is serialization in a save system?
- #66 · What does the observer pattern help avoid?
- #67 · Why run physics on a fixed timestep?
- #68 · What does normalizing a vector do?
- #69 · For two unit vectors, what is the dot product?
- #70 · What does A* add over Dijkstra's algorithm?
- #71 · What is object pooling for?
- #72 · What is a scene graph?
- #73 · What does client-side prediction hide?
- #74 · What does double buffering prevent?
- #75 · What is a 'dead zone' on a controller stick?
- #76 · What is a collision 'response'?
- #77 · What does a navmesh describe?
- #78 · What is 'level of detail' (LOD)?
- #79 · What does spatial (3D) audio give you?
- #80 · What does a game's 'tick' refer to?
- #81 · What does clamping a value do?
- #82 · What is a texture's 'UV' coordinate?
- #83 · What is a 'hitscan' weapon?
- #84 · What causes visible frame pacing stutter?
- #85 · What does ForceMode.Impulse apply? rb.AddForce(Vector3.up * jump, ForceMode.Impulse);
- #86 · Which technique best reduces draw calls for identical meshes? // many identical trees drawn each frame
- #87 · How often does Unity call Update by default? void Update() { /* ... */ }
- #88 · Why put physics code in FixedUpdate? void FixedUpdate() { rb.velocity = move; }
- #89 · What does a dot product of normalized vectors give? float d = Vector3.Dot(a.normalized, b.normalized);
- #90 · The cross product of two triangle edges yields what? Vector3 n = Vector3.Cross(edge1, edge2);
- #91 · How does GetKey differ from GetKeyDown? if (Input.GetKey(KeyCode.W)) MoveForward();
- #92 · What pattern avoids constant instantiate/destroy cost? GameObject.Instantiate(bullet); // every shot
- #93 · What removes objects outside the camera view before drawing? // object hidden behind the camera still processed
- #94 · What is the result of Lerp(a, b, 0.5)? float t = Mathf.Lerp(a, b, 0.5f);
- #95 · When is OnCollisionEnter invoked? void OnCollisionEnter(Collision c) { }
- #96 · This enum most likely drives which pattern? enum State { Idle, Run, Jump, Fall }
- #97 · Why use Slerp instead of Lerp for rotations? Quaternion q = Quaternion.Slerp(from, to, t);
- #98 · Which asset stays sharp at any scale for icons? // UI text blurry on high-DPI screens
- #99 · What is Debug.Log mainly used for? Debug.Log("reached checkpoint");
- #100 · What is the main problem with this loop? for (int i=0;i<1000;i++) GetComponent<Rigidbody>()
- #101 · What does PlayOneShot allow that Play does not? audioSource.PlayOneShot(clip);
- #102 · Which technique hides latency by predicting local moves? // player teleports when lag spikes
- #103 · What does this coroutine line do? coroutine: yield return new WaitForSeconds(2f);
- #104 · For many comparisons, what is a faster alternative? float dist = Vector3.Distance(a, b);
- #105 · Which shading model uses metallic/roughness inputs? material.SetFloat("_Metallic", 1f);
- #106 · Which algorithm finds a path around obstacles? // enemy chases player around walls
- #107 · Why use [SerializeField] on a private field? [SerializeField] private int lives = 3;
- #108 · What commonly triggers garbage-collection hitches? // GC spikes cause frame hitches
- #109 · A collider marked 'Is Trigger' does what? void OnTriggerEnter(Collider o) { }
- #110 · What usually controls 2D sprite draw order? // 2D sprites sort incorrectly
- #111 · What does Atan2 compute here? angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
- #112 · Which setting most reduces GPU memory use here? // build ships with 4K textures everywhere
- #113 · What does a raycast primarily do? Physics.Raycast(origin, dir, out hit, range);
- #114 · What is this artefact called? // two coplanar surfaces flicker as the camera mov
- #115 · What are mipmaps? texture.mipMapBias = 0;
- #116 · What does a normal map do? material.SetTexture("_BumpMap", normalTex);
- #117 · What does occlusion culling skip? // a wall stands between the camera and the crowd
- #118 · What does a blend tree do? animator.SetFloat("speed", 0.5f);
- #119 · Where does movement come from now? animator.applyRootMotion = true;
- #120 · What does an easing curve change? t = t * t * (3 - 2 * t);
- #121 · What does nine-slicing preserve? image.type = Image.Type.Sliced;
- #122 · What do UI anchors control? rect.anchorMin = new Vector2(1, 1);
- #123 · What does this prevent? rb.collisionDetectionMode = CollisionDetectionMode
- #124 · How does the body move now? rb.isKinematic = true;
- #125 · What does this matrix decide? // Physics settings > Layer Collision Matrix
- #126 · What is this technique called? if (Time.time - leftGroundAt < 0.1f) allowJump = t
- #127 · What does input remapping give players? bindings["jump"] = KeyCode.Space;
- #128 · What does seeding the generator give you? Random.InitState(12345);
- #129 · Why use Perlin noise for terrain? float h = Mathf.PerlinNoise(x * 0.1f, y * 0.1f);
- #130 · Why store a version in a save file? { "version": 2, "gold": 120 }
- #131 · In an authoritative model, who wins? // the client reports a hit; the server disagrees
- #132 · What is this technique called? musicBus.volume = dialogue.isPlaying ? 0.3f : 1f;
- #133 · What should you reach for first? // frame time spikes every few seconds
- #134 · Why multiply by dt? pos.x += speed * dt;
- #135 · What makes draw calls costly?
- #136 · Where should physics run?
- #137 · What is a broad phase for?
- #138 · Why use a texture atlas?
- #139 · What is input buffering?
- #140 · Why pool audio sources?
- #141 · What is a safe area?
- #142 · Why use a state machine?
- #143 · What does this mean? dot(a, b) == 0
- #144 · What does frustum culling skip?
- #145 · What is animation blending?
- #146 · Why version a save file?
- #147 · What does overdraw cost?
- #148 · Why sort transparent objects?
- #149 · What is a G-buffer for?
- #150 · What causes tunnelling?
- #151 · What does restitution control?
- #152 · Why is a trigger not solid?
- #153 · What is coyote time?
- #154 · Why add a hit stop?
- #155 · What is t normally? lerp(a, b, t)
- #156 · Why use squared distance?
- #157 · Why prefer quaternions?
- #158 · Why reuse instances from a pool?
- #159 · What are LODs for?
- #160 · Why avoid per-frame allocation?
- #161 · What is root motion?
- #162 · What does an IK solver do?
- #163 · What is client prediction?
- #164 · What is interpolation used for?
- #165 · What does ECS separate?
- #166 · Why stream a large level?
- #167 · What is a navmesh?
- #168 · Why cap particle counts?
- #169 · Why anchor UI elements?
- #170 · What breaks GPU instancing?
- #171 · What is shadow acne?
- #172 · Why iterate a solver?
- #173 · What is lag compensation?
- #174 · Why must lockstep be deterministic?
- #175 · Why is the game CPU-bound?
- #176 · Why is cache locality fast?
- #177 · What does a behaviour tree add?
- #178 · Why write saves atomically?
- #179 · Why is movement multiplied by delta time?
- #180 · What does packing sprites into one atlas reduce?
- #181 · What does an input buffer allow?
- #182 · Why keep short sound effects decompressed?
- #183 · What does mipmapping store?
- #184 · What is a nine-slice sprite for?
- #185 · What is a trigger volume?
- #186 · What does triple buffering add over double?
- #187 · What causes tunnelling through thin walls?
- #188 · What does object pooling avoid?
- #189 · What is frustum culling?
- #190 · Why are transparent objects drawn last?
- #191 · What does snapshot interpolation smooth?
- #192 · What is server reconciliation for?
- #193 · What does an animation blend tree do?
- #194 · Why normalise a movement vector?
- #195 · What does the A* heuristic estimate?
- #196 · What do state machines replace in gameplay code?
- #197 · What does a depth pre-pass buy you?
- #198 · What does lag compensation rewind?
- #199 · Why does GPU instancing help crowds?
- #200 · What does continuous collision detection cost?
- #201 · What does back-face culling skip?
- #202 · What is a skybox?
- #203 · What does a bloom effect imitate?
- #204 · What does crossfading two music tracks do?
- #205 · At 60 FPS, about how long is each frame?
- #206 · What is a baked lightmap?
- #207 · What does anisotropic filtering improve?
- #208 · What does tone mapping do?
- #209 · What is a billboard in 3D rendering?
- #210 · In skeletal animation, what do vertex weights set?
- #211 · What does animation retargeting allow?
- #212 · What does the arrive steering behaviour add over seek?
- #213 · Which three rules drive classic boids flocking?
- #214 · Why wrap player actions as command objects?
- #215 · What does interest management limit?
- #216 · What does delta compression send in snapshots?
- #217 · Why do physics engines put resting bodies to sleep?
- #218 · What does the Doppler effect change in game audio?
- #219 · In rollback netcode, what happens when a late input differs from the guess?
- #220 · Why does deferred shading handle transparency poorly?
- #221 · Why should lighting maths run in linear colour space?
- #222 · Why does the direction use w = 0? vec4 dir = vec4(d, 0.0); vec4 pos = vec4(p, 1.0);
- #223 · In a fixed-timestep loop, why clamp the accumulated frame time?
- #224 · For two convex shapes, what does the separating axis theorem say?
- #225 · Why does moving the near clip plane further out reduce z-fighting?
- #226 · In a 2D side-scroller, why do far background layers scroll slower?
- #227 · What are invincibility frames (i-frames)?
- #228 · How does a sprite sheet animate a 2D character?
- #229 · What visual problem does anti-aliasing reduce?
- #230 · What is a decal in a 3D game?
- #231 · In animation, what is "anticipation"?
- #232 · Why do fast action games usually send state over UDP rather than TCP?
- #233 · What defines the shape of a cubic Bezier curve?
- #234 · What does dead reckoning do for a remote player?
- #235 · How does a utility AI decide what to do next?
- #236 · Why use a flow field when a huge crowd heads for one goal?
- #237 · What does SSAO add to a rendered scene?
- #238 · In Phong-style lighting, what does the specular term model?
- #239 · How do cellular automata turn random noise into caves?
- #240 · Why offer a colourblind mode in a game?
- #241 · Why route sounds through mixer groups (buses)?
- #242 · Why leave spare room in UI layouts for translated text?
- #243 · With these weights, how often does "rare" drop? const drops = { common: 70, uncommon: 25, rare: 5
- #244 · What does goal-oriented action planning (GOAP) do?
- #245 · Why split the view into cascaded shadow maps?
- #246 · What is the stencil buffer typically used for?
- #247 · How does wave function collapse generate a level?
- #248 · In position Verlet integration, where does velocity come from?
- #249 · Why can explicit Euler integration make a stiff spring explode?
- #250 · What does premultiplied alpha fix when blending textures?
- #251 · In the MDA framework for game design, what does the A stand for?
- #252 · What is a game's core loop?
- #253 · What is a ragdoll in game physics?
- #254 · Why use the async version of scene loading? SceneManager.LoadSceneAsync("Level2");
- #255 · What does this fragment shader line do? col.rgb = 1.0 - col.rgb;
- #256 · Under Elo, a low-rated player beats a much higher-rated one. What happens?
- #257 · In a fighting game, what is a hurtbox?
- #258 · Why square the trauma value here? float shake = trauma * trauma; offset = maxOffset
- #259 · In a Unity Animator, when does a transition with Has Exit Time enabled fire?
- #260 · What is a common drawback of GPU-simulated particles?
- #261 · What does texture streaming load on demand?
- #262 · In C#, why keep millions of particle records as structs in an array?
- #263 · How does BSP dungeon generation lay out its rooms?
- #264 · Flow theory says players stay engaged when what holds?
- #265 · Which lighting term is d? float d = max(0.0, dot(normalize(n), L));
- #266 · What does this fragment shader line do? if (tex.a < 0.5) discard;
- #267 · What is y? float y = smoothstep(0.4, 0.6, x); // x = 0.3
- #268 · Why can enabling VSync add input lag?
- #269 · What is wrong with this camera follow? void Update() { cam.position = Vector3.Lerp(cam.po
- #270 · Why do some lockstep RTS games use fixed-point maths instead of floats?
- #271 · What does Poisson disk sampling guarantee when scattering trees?
- #272 · What does the Glicko rating system track that plain Elo does not?
- #273 · Why are some jump presses ignored? void FixedUpdate() { if (Input.GetKeyDown(KeyCode.
- #274 · Why give loot drops and level generation separate random streams?
- #275 · Why do huge open worlds periodically shift everything back toward the origin?