Summary of "How to Make a Top Down Shooter in GameMaker Studio 2! (Part 1: Movement and Collision)"
Summary of "How to Make a Top Down Shooter in GameMaker Studio 2! (Part 1: Movement and Collision)"
Overview
- This video is the first episode in a 13-part beginner-friendly series teaching how to create a top-down shooter game using GameMaker Studio 2.
- The series aims to improve viewers’ game development skills with in-depth explanations.
- Videos are released twice a week, with early access and project files available on Patreon.
- The creator is also working on two personal games, including an Action RPG titled Star-Crossed Starcade Special.
Key Technological Concepts & Product Features Covered
1. Project Setup and Asset Management
- Starting a new GameMaker Studio 2 project.
- Cleaning up default folders to reduce visual clutter.
- Creating and editing sprites (player and walls) using the built-in image editor.
- Setting sprite origin points (center for player, top-left for walls) to simplify positioning and scaling.
- Understanding and adjusting collision masks for sprites.
2. Room and Viewport Configuration
- Setting room size to 640x360 pixels (16:9 aspect ratio) for pixel-perfect scaling.
- Adjusting grid size to 16x16 pixels to align objects and sprites.
- Configuring viewports and cameras for pixel-perfect display and scaling the viewport to double size for better visibility on 1080p monitors.
- Explaining the difference between room size and camera/viewport size.
3. Player Object Creation
- Creating a player object and assigning the player sprite.
- Placing player instances in the room using instance layers.
- Explaining how multiple instances of the same object can exist in a room.
4. Player Movement Implementation
- Using the Create event to initialize movement variables:
moveDirection(360-degree movement direction)moveSpeed(default speed set to 2 pixels/frame)xSpeedandySpeedfor directional movement components.
- Using the Step event (runs every frame) to:
- Read keyboard inputs (WASD or arrow keys) using
keyboard_check()function. - Calculate horizontal and vertical input directions (
rightKey - leftKey,downKey - upKey). - Use
point_direction()function to convert input into a 360-degree movement direction. - Use
point_distance()to determine input magnitude (input level). - Clamp input level to avoid faster diagonal movement (normalizing diagonal speed).
- Calculate
xSpeedandySpeedusinglengthdir_x()andlengthdir_y()functions based on speed and direction. - Update player position by adding
xSpeedandySpeedto coordinates.
- Read keyboard inputs (WASD or arrow keys) using
- Explanation of why consistent movement speed in all directions is important for gameplay fairness and player experience, especially in action games and for controller support.
5. Collision Handling
- Creating two types of wall sprites and objects:
- Yellow walls (generic walls, e.g., pits or water that block players/enemies but not projectiles).
- Red solid walls (block everything including projectiles).
- Setting wall sprite origins to top-left for easy placement.
- Player object handles collision detection using
place_meeting()function:- Separately checking X and Y movement for collisions.
- If collision detected on X or Y axis, respective speed is set to zero to prevent movement into walls.
- Introducing GameMaker’s parenting system:
- Making solid wall a child of the generic wall object.
- Allows collision checks against the parent to include all child objects, reducing redundant collision checks and improving performance.
- Explains how this system helps differentiate between collision types (e.g., bullets ignoring pits but colliding with solid walls).
6. Known Limitations and Future Improvements
- Noted that current collision handling can cause small gaps due to speed and collision precision.
- More precise collision handling (e.g., sub-pixel or loop-based collision resolution) will be covered in future episodes once foundational knowledge is solidified.
Additional Notes
- The video encourages beginners to watch the creator’s RPG series for foundational knowledge on GameMaker functions and concepts.
- The tutorial balances simplicity with enough complexity to prepare for controller input and more advanced game mechanics.
- The creator promotes Patreon for early access, project files, and community support.
- Plans for a live stream and additional creative development on the project post-series are mentioned.
- The creator is actively developing and releasing their own games, with links and social media for follow-up.
Main Speaker / Source
- The tutorial is presented by an experienced GameMaker Studio 2 developer and YouTuber (name not explicitly mentioned in subtitles but known from context as "Nixionic").
- The speaker provides clear, step-by-step instructions with explanations of functions, variables, and game design considerations.
Category
Technology