### Unreal Material Flipbook Node Setup Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-unreal Connect the Flipbook material function's UV output to the Texture Sample's UV input. Then connect the Texture Sample color into the material's color output, and the Texture Sample alpha into Opacity or Opacity Mask depending on your Blend Mode. ```Unreal Material Editor Texture Sample Color -> Material Color Texture Sample Alpha -> Opacity/Opacity Mask Flipbook UV -> Texture Sample UV ``` -------------------------------- ### Blueprint Nodes for Flipbook Animation Control Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-unreal These Blueprint nodes are used to manage Paper Flipbook Components in Unreal Engine. Use 'Set Flipbook' to change animations, 'Set Play Rate' to adjust speed, and 'Play from Start' to restart playback. ```blueprint Set Flipbook Set Play Rate Play from Start ``` -------------------------------- ### Set Specific Animation Speed Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-game-maker Override the sprite's base animation speed at runtime using `sprite_set_speed()`. This example sets the animation to play at exactly 10 FPS. ```gml // Set animation to play at exactly 10 FPS (matching Gamelab metadata) sprite_set_speed(sprite_index, 10, spritespeed_framespersecond); ``` -------------------------------- ### Gamelabs Studio MCP Server Configuration Source: https://gamelabstudio.co/blog/gamelabs-studio-vs-retro-diffusion Configure Gamelabs Studio's SSE-based MCP server. Ensure you replace 'your_api_key' with your actual API key. ```json { "mcpServers": { "gamelab-mcp": { "type": "sse", "url": "http://api.gamelabstudio.co:8765/sse", "headers": { "X-API-Key": "your_api_key" } } } } ``` -------------------------------- ### Load Spritesheet at Runtime Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-game-maker Load sprites dynamically at runtime using `sprite_add()`. The image must be in a horizontal strip format. Specify the number of sub-images, transparency, edge smoothing, and origin coordinates. ```gml // Create Event — load a Gamelab spritesheet at runtime spr_loaded = sprite_add("sprites/warrior_idle_strip8.png", 8, false, false, 64, 64); sprite_set_speed(spr_loaded, 10, spritespeed_framespersecond); sprite_index = spr_loaded; // Clean Up Event — prevent memory leaks sprite_delete(spr_loaded); ``` -------------------------------- ### Retro Diffusion MCP Server Configuration Source: https://gamelabstudio.co/blog/gamelabs-studio-vs-retro-diffusion Configure Retro Diffusion's HTTP-based MCP server using bearer token authentication. Replace 'YOUR_API_KEY' with your actual API key. ```json { "mcpServers": { "retrodiffusion": { "url": "https://mcp.retrodiffusion.ai/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` -------------------------------- ### Gamelab MCP Server JSON Configuration Source: https://gamelabstudio.co/blog/mcp-setup-guide Use this JSON configuration to add the Gamelab MCP server in Cursor or VS Code. Ensure you replace 'your api key here' with your actual API key. ```json { "mcpServers": { "gamelab-mcp": { "type": "sse", "url": "http://api.gamelabstudio.co:8765/sse", "headers": { "X-API-Key": "your api key here" } } } } ``` -------------------------------- ### Set Naming Template for Sprites Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-unreal Use a naming template to organize extracted sprites. The `{0}` placeholder will be replaced by the sprite's index, ensuring they sort correctly for animation. ```text Robot_Run_{0} ``` -------------------------------- ### Pixel Lab MCP Configuration Source: https://gamelabstudio.co/blog/gamelabs-studio-vs-pixellab Configure Pixel Lab's HTTP-based MCP server, including bearer token authentication. ```json { "mcpServers": { "pixellab": { "url": "https://api.pixellab.ai/mcp", "headers": { "Authorization": "Bearer YOUR_API_TOKEN" } } } } ``` -------------------------------- ### Switching Sprite Animations in GameMaker Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-game-maker Use a switch statement in the Step Event to manage different player states and update the sprite_index accordingly. Reset image_index to 0 when changing sprites and adjust image_speed for specific animations like attacks. ```gml switch (state) { case PLAYER_STATE.IDLE: if (sprite_index != spr_warrior_idle) { sprite_index = spr_warrior_idle; image_index = 0; } break; case PLAYER_STATE.RUN: if (sprite_index != spr_warrior_run) { sprite_index = spr_warrior_run; image_index = 0; } break; case PLAYER_STATE.ATTACK: if (sprite_index != spr_warrior_attack) { sprite_index = spr_warrior_attack; image_index = 0; image_speed = 1.5; // play attack faster } break; } ``` -------------------------------- ### Gamelabs Studio MCP Server URL Source: https://gamelabstudio.co/blog/mcp-setup-guide This is the server URL required for MCP integration. Ensure this URL is correctly entered into your editor's MCP settings. ```text http://api.gamelabstudio.co:8765/sse ``` -------------------------------- ### Play Animation at Runtime in Godot Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-godot This script plays a specified animation on an AnimatedSprite2D node when the scene is ready. Ensure the AnimatedSprite2D node is correctly referenced and the animation name matches one defined in the SpriteFrames resource. ```gdscript extends CharacterBody2D @onready var _sprite = $AnimatedSprite2D func _ready(): _sprite.play("run") ``` -------------------------------- ### Rename PNG for Strip Import Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-game-maker Rename your spritesheet PNG file to include the '_stripN' suffix, where N is the total number of frames. This allows GameMaker to automatically detect and split the animation. ```text warrior_idle.png → warrior_idle_strip8.png ``` -------------------------------- ### Gamelabs Studio Authentication Header Source: https://gamelabstudio.co/blog/mcp-setup-guide The authentication header includes your personal API key, which is essential for authenticating requests to the Gamelabs MCP server. Keep this key private and ensure it's correctly formatted. ```text X-API-Key: ``` -------------------------------- ### Switch Between Sprites Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-game-maker Switch between different sprite animations in the Step Event by changing `sprite_index`. Reset `image_index` to 0 when switching sprites to prevent visual glitches. ```gml // Step Event var _target_sprite = spr_warrior_idle; if (abs(hspeed) > 0) { _target_sprite = spr_warrior_run; } if (sprite_index != _target_sprite) { sprite_index = _target_sprite; image_index = 0; } ``` -------------------------------- ### Play Godot Animations Based on Direction Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-godot Use this GDScript snippet to play different animations on a SpriteFrames node based on the character's movement direction. Ensure animations like 'walk_right', 'walk_left', 'walk_up', and 'walk_down' are pre-defined in the SpriteFrames editor. ```gdscript func update_animation(direction: Vector2): if direction.x > 0: _sprite.play("walk_right") elif direction.x < 0: _sprite.play("walk_left") elif direction.y < 0: _sprite.play("walk_up") elif direction.y > 0: _sprite.play("walk_down") else: _sprite.stop() ``` -------------------------------- ### Godot CharacterBody2D Script to Play Animation Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-godot This script plays a specified animation from the AnimationPlayer node when the scene is ready. Ensure the AnimationPlayer node is correctly referenced. ```gdscript extends CharacterBody2D @onready var _anim = $AnimationPlayer func _ready(): _anim.play("run") ``` -------------------------------- ### Calculate Flipbook Speed Multiplier Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-unreal Use this formula to calculate the speed multiplier for the Animation Phase to match Gamelab's FPS. Ensure the spritesheet's Columns × Rows equals the actual Frame Count for accurate playback. ```Formula Speed = FPS / Frame Count ``` ```Example Speed = 12 / 24 Speed = 0.5 ``` -------------------------------- ### Set Normal Animation Speed Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-game-maker Set the animation speed to normal playback using the `image_speed` variable in the Create Event. This uses the Frame Speed defined in the Sprite Editor. ```gml // Create Event image_speed = 1; // normal playback (uses Sprite Editor FPS) ``` -------------------------------- ### Control Player Animation Speed in Unity Source: https://gamelabstudio.co/blog/how-to-ai-spritesheet-unity This C# script retrieves the Animator component and sets a float parameter 'Speed' based on horizontal input. Attach this script to a GameObject with an Animator component. ```csharp using UnityEngine; public class PlayerAnimation : MonoBehaviour { Animator _anim; void Start() { _anim = GetComponent(); } void Update() { float move = Input.GetAxis("Horizontal"); _anim.SetFloat("Speed", Mathf.Abs(move)); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.