2D Game Development 2D Game Design and Development 2 — Questions and Answers
Question 1: In a 2D game, what does the term 'sprite' refer to?
- A 2D bitmap image or animation integrated into a scene (Correct answer)
- A physics constraint between two bodies
- A scripting language for game logic
- A type of audio compression format
Correct answer: A 2D bitmap image or animation integrated into a scene
A sprite is a 2D image or animation that represents a game object on screen.
Question 2: What is a 'tilemap' commonly used for in 2D game development?
- Building levels from a grid of reusable tile images (Correct answer)
- Mapping controller input to actions
- Storing player save data
- Generating procedural audio
Correct answer: Building levels from a grid of reusable tile images
A tilemap arranges small reusable tiles in a grid to construct large levels efficiently.
Question 3: Which coordinate typically increases downward in most 2D screen coordinate systems?
- The Y axis (Correct answer)
- The X axis
- The Z axis
- The W axis
Correct answer: The Y axis
In screen space, the Y axis usually increases downward from the top-left origin.
Question 4: What is the main purpose of a 'sprite sheet' (texture atlas)?
- To pack multiple sprites into one image for fewer draw calls (Correct answer)
- To store the game's source code
- To define collision physics
- To compress background music
Correct answer: To pack multiple sprites into one image for fewer draw calls
Packing sprites into one image reduces texture swaps and improves rendering performance.
Question 5: In 2D animation, what does 'frame rate' (FPS) measure?
- How many frames are displayed per second (Correct answer)
- The number of sprites on screen
- The resolution of textures
- The size of the game window
Correct answer: How many frames are displayed per second
Frame rate is the number of frames rendered or shown each second.
Question 6: What is 'parallax scrolling' used to achieve in 2D games?
- An illusion of depth by moving background layers at different speeds (Correct answer)
- Faster collision detection
- Smaller file sizes for sprites
- Synchronized multiplayer movement
Correct answer: An illusion of depth by moving background layers at different speeds
Background layers moving at different speeds create a sense of depth in 2D scenes.
Question 7: Which data structure is most commonly used to represent a 2D level grid?
- A 2D array (Correct answer)
- A binary search tree
- A linked list
- A hash set
Correct answer: A 2D array
A 2D array maps naturally to rows and columns of a tile grid.
In a 2D game, what does the term 'sprite' refer to?