AI coding Minecraft from scratch (day 3)
By corbin
Key Concepts Blockmind, Cursor AI Agent, Google AI Studio, Physics Engine, Collision Detection (AABB, Voxel Grid), Texture Packs, Creative Mode, Survival Mode (Standard Mode), Player Model/Character Mechanics, World Generation (Infinite Flat World, Chunk System), GitHub (Commits, Branches, Rollbacks), Rust (Tech Stack), AI Hallucination, Shader Effects, Bunny Hopping.
Project Overview and Goals
The YouTube video documents Day 3 of an ambitious project to build a Minecraft clone, dubbed "Blockmind," entirely from scratch using AI. The core premise is to demonstrate the feasibility of developing complex applications with AI agents, starting from "absolutely zero lines of code." The project is part of a larger stream series, currently on stream day 13 or 14. The immediate goal for this session was to establish fundamental player physics and interaction with blocks on a basic "dirt world" platform before expanding into more complex world generation. The speaker emphasizes that the challenge is no longer about capability but about effectively leveraging AI.
AI-Driven Development Workflow
The development process heavily relies on AI tools:
- Cursor AI Agent: This serves as the primary coding environment, capable of researching, generating, and refactoring code based on natural language prompts. It was used to implement physics, player movement, and code restructuring.
- Google AI Studio: Utilized for generating various game textures, such as stone, coal, and iron ore, based on descriptive prompts.
- ChatGPT: Mentioned as a general AI interaction tool, potentially for research or broader queries.
The workflow is iterative:
- Problem Definition: Identify a specific feature or bug (e.g., player flying through blocks).
- AI Prompting: Provide clear, specific instructions to the Cursor AI, often referencing Minecraft's existing mechanics (e.g., "make the movement feel like Minecraft").
- Code Generation & Research: The AI researches relevant solutions (e.g., "Minecraft player movement physics code") and generates code.
- Testing & Feedback: The speaker tests the generated code in the local web application, providing immediate feedback to the AI for refinement (e.g., "hitbox is too big," "movement too fast").
- Refinement: The AI adjusts the code based on feedback, sometimes requiring persistent prompting ("don't stop coding till you achieve this") to overcome issues like AI hallucination.
Player Mechanics and Interaction
A significant portion of the stream focused on developing core player mechanics:
- Collision Detection: Initially, the player could pass through blocks. The AI was tasked with creating a physics engine to enable collision, with the AI suggesting an "AABB versal grid" approach for "fast and performance" collision detection.
- Player Size and POV: The player's camera perspective felt too large, leading to an adjustment of the player's size to "one block" for better interaction.
- Movement Controls:
- Walking/Running: Implemented basic movement (W, A, S, D). Initial speeds were either too fast ("zoom") or too slow, requiring iterative adjustments to
walk_speedandsprint_speedvariables within theplayer.core.rsfile. - Jumping: Enabled jumping, which resulted in a "bunny hopping" effect reminiscent of CS:GO, adding an unexpected but fun dynamic.
- Fly Mode: A toggleable "fly mode" (activated by 'F' key) was successfully implemented, allowing the player to move freely without gravity, similar to Minecraft's creative mode.
- Sneak Mode: Implemented (Shift key) for slower movement.
- Walking/Running: Implemented basic movement (W, A, S, D). Initial speeds were either too fast ("zoom") or too slow, requiring iterative adjustments to
- Gravity: Successfully added gravity physics, causing the player to fall when not in fly mode.
- Cursor Confinement: A crucial fix was implemented to prevent the mouse cursor from leaving the game window during gameplay, which was causing disorientation.
- Block Interaction:
- Placing Blocks: Right-click was enabled to place blocks. Initially, these blocks were red, but the AI was later instructed to place stone texture blocks.
- Breaking Blocks: Left-click was enabled for breaking blocks.
- Player Model: An attempt was made to add a "low poly arm" for better POV context, though it wasn't fully realized in this session. The AI successfully restructured player-related code from a single file to six separate files (e.g.,
player.rs,input.rs,camera.rs,state.rs,physics.rs,renderer.rs), generating "800-900 lines of code" from one prompt, demonstrating scalability.
World and Texture Generation
- Initial World: The project started with a simple "dirt world" platform.
- Texture Creation: Google AI Studio was used to generate various block textures:
- Dirt
- Stone (refined to "smoother" and "Call of Duty camo" style)
- Coal (refined to be "bigger" and "more obvious")
- Iron Ore (refined to "more of a beige color" and "darker")
- Smooth Stone, Wood, and Tree Leaf textures were also generated, though not immediately implemented due to complexity (e.g., grass requiring more frames).
- Infinite Flat World: An attempt to generate an "infinite flat world" using a "chunk system" for optimization was made to provide a larger testing ground for player movement. This initially caused issues (infinite loading, platform disappearance) but was eventually resolved.
- Shader Effects: Shadows were added to the game to improve "depth perception" and make the world look less flat, significantly enhancing the visual quality.
Code Management and Debugging
- Rust Tech Stack: The game is being built using Rust, a systems programming language known for performance. The speaker, primarily a React developer, is learning Rust through this project.
- GitHub for Version Control: GitHub is integral for managing code changes.
- Commits: Regular commits (e.g., "player can move and fly") are made to save progress.
- Branches: Development occurs on specific branches (e.g., "world build").
- Rollbacks: The speaker demonstrated the critical importance of rolling back to previous stable commits when the AI introduced breaking changes (e.g., the platform disappearing), emphasizing "checkpoints are fundamental."
- Debugging AI Output:
- Confirmation: Explicitly asking the AI to "confirm it works by going to the app" helps prevent AI hallucination.
- Variable Identification: Asking the AI "what file has the walk speed and what I can adjust" helps locate relevant code sections.
- Testing Extreme Values: Setting variables to extreme values (e.g.,
walk_speedto 3000) helps confirm if they are actually affecting the game. - Hard Refresh: Frequently performing a hard refresh of the browser ensures the latest code changes are loaded.
Key Insights and Challenges
- AI's Potential: The project strongly supports the idea that AI agents like Cursor can significantly accelerate game development, even for complex projects like Minecraft. The AI's ability to search, generate, and refactor large amounts of code from high-level prompts is a "massive unlock."
- Prompt Engineering: The success of AI-driven development heavily relies on precise and contextual prompting. The speaker learned that referencing existing products (e.g., "build this character exactly like how Minecraft builds their character") yields better results.
- AI Limitations: AI can "hallucinate" or take "too much initiative" (e.g., adding unnecessary features like "set spawn" buttons), requiring constant user oversight and correction.
- Iterative Learning: Both the AI and the developer learn iteratively. The speaker, new to game development and Rust, gains understanding as the AI builds the application.
- Foundational Importance: Building the "skeleton" and core mechanics first is crucial for scalability and future feature integration.
Conclusion and Future Outlook
By the end of Day 3, the "Blockmind" project successfully established a movable character with walking, jumping, sprinting, and toggleable fly modes, complete with gravity and collision physics. The ability to place and break blocks was implemented, and initial textures for dirt, stone, coal, and iron ore were generated. Crucially, shader effects were added for depth perception, and the player controls were integrated into an in-game escape menu. The project demonstrated the power of AI agents in rapidly prototyping and building game mechanics, albeit with challenges related to AI accuracy and the need for careful debugging and version control. The speaker plans to continue this "marathon" project, focusing next on refining player interaction with blocks (e.g., mining animations) and optimizing world generation for larger scales, acknowledging that the project could take "90 days" or "half a year."
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

Docker Explained in 6 Minutes (for beginners)
corbin

Ultimate GitHub Copilot CLI tutorial for beginners
GitHub

How Mapping Could Help With Climate Change
Forbes

Building long-running AI agents with ADK
Google Cloud Tech

API Explained in 5 Minutes (for beginners)
corbin

Claude Mythos 5 Is Not for You. Here's Why...
Zubair Trabzada | AI Workshop

Anthropic Just Dropped Fable 5: Everything You Need To Know
Jono Catliff