When creating 2D side-scrolling games, the animations of vivid protagonists or monsters are composed of sequences of individual sprites. In practice, generating these directly using AI can be challenging; using Grok to create videos is a more effective approach for maintaining consistency in character features and ensuring fluid motion.

Set up the characer
Let's start by having Grok generate a basic character concept; here, we’ve created a Skeleton King suitable for a wide variety of games.

Character Animation
Once that is done, we will use this image to create a video in Grok. For the prompt used in this step, you can refer to the link below; the creator has compiled prompts specifically for generating characters suitable for 2D side-scrolling games.
https://irisogli.com/how-to-build-a-2d-game-asset-pack-with-free-ai
We have rewritten the action-oriented part of it as...
Idle → shout → eyes flash → summon → green aura appears around the body → return seamlessly to the starting pose. This creates a continuous animation sequence featuring a shout, flashing eyes, and the summoning of other skeletons.
Once generated, you get a short video lasting about six seconds that features rich, dynamic movement.
Handy tool for automatic image cropping and background removal.
Once created, how do you slice the output into individual sprites? Here is a free tool for slicing images and removing backgrounds; please use it to transform your video into vivid 2D sprites with transparent backgrounds.

After opening the webpage, select the video frame background-removal mode at the top and load your video into the tool; then, adjust settings such as frame rate, image size, and X/Y offsets to achieve the desired animation state.
Once the settings are configured, you can generate multi-frame PNG files with transparent backgrounds, ready for use in the game.

⚔️ Launch the online image slicing and alignment tool now (free to use) ➜
Making games this way is so much faster!
