AI coding Minecraft from scratch (day 2)

By corbin

Share:

Key Concepts

  • AI-Assisted Game Development: Leveraging Cursor AI (agent mode) and Google AI Studio for coding and asset generation.
  • Rust Programming Language: Chosen for its performance, described as "C++ on crack," and offering a "First Mover Advantage" for new developers in game development.
  • WebGL Framework: Used for browser-based development, with a long-term goal of a native Rust application.
  • Texture Atlas: A single image file containing multiple smaller textures, arranged in a grid, used for efficient texture management.
  • 3D Cube Rendering: The fundamental challenge of correctly rendering solid, textured cubes for the game world.
  • Creative Mode: An early game mechanic allowing the player to fly and navigate the world freely for development purposes.
  • Repository Scalability and Organization: Emphasizing structured folders and reusable code logic for long-term project growth.
  • Procedural World Generation: The goal of creating expansive, potentially infinite game worlds.
  • Game Physics and Collision Detection: Essential mechanics for player interaction with the game world.
  • Freelancing and Entrepreneurship: Advice on using platforms like Upwork, setting up an LLC, and pricing contract work.
  • Community-Driven Development: Plans for an open-source Git repository, accepting pull requests (PRs) from viewers, and community voting on game features.
  • AI in Game Mechanics: Conceptualizing local LLMs for AI enemies (e.g., "The Note" creature leaving GBT-generated messages).

Introduction to the "Blockmind" Project

The stream, "Day 2" of building Minecraft from scratch and "Stream Day 13" overall, focuses on creating a Minecraft-like game called "Blockmind" using advanced AI coding tools. The host, Corbin, emphasizes that this is a serious endeavor, not a joke, made possible by the "new agent mode and cursor" capabilities of AI, which have taken development to the "next level." Streams are scheduled randomly between 6-7 PM PST due to personal routines. The project is live-streamed across YouTube, Twitch, and X, with a strong emphasis on engaging viewers through unique thumbnails and the hashtag #blockmind. Corbin also briefly mentions recent movie watches like "Salt Tron" and an upcoming Predator film.

Setting Up the Development Environment

Corbin details the technical foundation of "Blockmind." He has integrated WebGL to enable development directly within a web browser, streamlining the iteration process by avoiding constant native application installations. However, the ultimate goal remains a 100% native application built entirely in Rust. He praises Rust, describing it as "C++ on crack," highlighting its performance and modern capabilities. The development philosophy is to tackle "one thing at a time when building a repo." Initial tasks included removing placeholder text ("Block Mine") and eliminating black borders to ensure the game view fills the entire screen. Currently, the game allows basic W, A, S, D movement, and the Escape key hides the cursor, but the blocks are simple and untextured.

Developing the Core Game Element: The Dirt Block

The primary objective of this stream was to create a textured dirt block.

  1. Texture Generation with Google AI Studio:

    • Corbin decided to focus on a dirt block, aiming for a "cookie cutter" block design that could be reused for various materials (wood, stone, diamond) later.
    • Cursor AI provided specific requirements for the texture: PNG format, 256x256 dimensions (or multiples of 16), and a texture atlas layout (a grid of 16x16 tiles, each 16 pixels).
    • Using Google AI Studio (specifically "nano banana"), Corbin prompted it to "make a pixel dirt texture and fill the whole square," emphasizing custom generation to avoid copyright issues and mimic Minecraft without direct copying.
    • He briefly used Photoshop to refine the AI-generated texture, blending out unwanted marks, and saved it as block_dirt.png.
    • Freelancing/Cold Outreach Advice (Tangent): During this process, Corbin shared advice on cold outreach for new developers, recommending local targeting and using personalized one-minute Loom videos in cold emails to demonstrate initiative. He also advised setting up a single-member LLC via LegalZoom for business legitimacy and financial separation, even for solo entrepreneurs.
  2. Refining the 3D Cube Rendering:

    • After adding the block_dirt.png to the source, the AI successfully rendered textured blocks. Corbin expressed excitement, noting the "instant click" moment when the texture appeared.
    • However, the initial rendering resulted in blocks that were "2D or hollow" panels rather than solid 3D cubes. Corbin instructed the AI to "Keep coding until the dirt texture makes a cube. Notice how each one is just 2D or hollow."
    • Community Collaboration: A viewer named "Bonds" provided a crucial insight: "The render pipeline was calling away faces that were facing away from the camera. The mesh generation was also skipping faces based on neighbor checks." This indicated an over-optimization issue in the rendering process.
    • Breakthrough: Based on Bonds's suggestion, the AI corrected the rendering, successfully creating a solid, textured 3D dirt cube. Corbin celebrated this as a significant milestone, acknowledging the learning process involved in 3D and Rust development.

Implementing Basic Game Mechanics

  1. Creative Mode and Controls:

    • Corbin decided to prioritize a "creative mode" for easier world building, allowing the player to fly. This was successfully implemented, leading to an excited "We're in creative mode. Clip it. Clip it." moment.
    • A "back to game" button was added to the escape menu, with instructions to disable movement when active and lower its opacity for better visibility.
    • A small crosshair cursor was added to the center of the screen to aid in orientation.
    • The code was committed to the master branch with the message "we in creative mode" as a development checkpoint.
  2. Repository Organization for Scalability:

    • Recognizing the need for a structured codebase, Corbin instructed the AI to "make this repository scalable" by creating relevant folders and reusing logic for other cubes.
    • The AI demonstrated advanced capabilities by automatically renaming dirt_blockmind.png to dirt.png and organizing it into assets/textures/dirt.png, which Corbin praised as "amazing" for its foresight in file management.
    • A new branch, world_build, was created for further development.

Exploring Advanced Concepts and Future Plans

  1. World Generation and Optimization:

    • Corbin pushed the AI to create a 20-block flat platform, which initially had "holes" but was subsequently fixed.
    • The ultimate goal is to implement "infinite world generation" with a one-layer block floor to test optimizations and rendering capabilities for large-scale worlds.
    • A viewer, Mantis, suggested focusing on "Generation" as it's "very vital to Minecraft performance, appearance, and everything."
  2. AI Integration for Game Elements:

    • Corbin envisions integrating AI into game mechanics, such as using local LLMs (Large Language Models) for enemies. This would allow for dynamic, creepy behaviors, like a creature called "The Note" leaving GBT-generated messages in the player's house, without incurring API costs.
  3. Open-Source Vision and Community Contributions:

    • A long-term goal is to make the "Blockmind" Git repository public, allowing viewers to submit pull requests (PRs) for new features, such as different types of mobs or enemies. The community would then vote on whether to integrate these contributions into the game.
    • Corbin also discussed the possibility of creating a Discord server for the community, acknowledging the need for moderation as the project grows.

Entrepreneurial Insights and Career Advice

Throughout the stream, Corbin shared valuable advice for aspiring developers and entrepreneurs:

  • Freelancing and Contract Work: He strongly advocates for using platforms like Upwork to gain experience and earn income. He advises against hourly rates, preferring flat rates per project with clear deliverables and deadlines.
  • Business Setup: Emphasizes the importance of establishing a single-member LLC early on (e.g., through LegalZoom for about $300), obtaining a virtual address, and setting up dedicated business bank accounts and credit cards.
  • Skill Compounding: Encourages taking on contracts even if only 70% of the required skills are known, as it forces learning the remaining 30% and compounds expertise.
  • Low Overhead: Highlights that software development generally has low overhead costs, making it an attractive business venture.
  • Importance of Physical Health: Stresses the paramount importance of regular exercise (even short gym sessions) for boosting mood, productivity, and cognitive function, especially given the often sedentary nature of coding.

Conclusion and Next Steps

The stream concluded after two hours, having successfully created a solid, textured dirt cube and a flat dirt platform. Corbin expressed immense satisfaction with the progress, especially the collaborative problem-solving that led to the 3D cube rendering. The next stream will focus on adding physics to the game, allowing the character to jump and walk on the platform, and further developing the escape menu UI for toggling between creative and normal modes. Corbin plans to continue streaming daily, with potential for longer "marathon" streams as the project gains more attention, and will continue reacting to viewer Cameos at the end of each session. He believes that with continued effort, "Blockmind" can evolve into a truly unique and playable game.

Chat with this Video

AI-Powered

Load the transcript when you're ready to chat so the initial page stays lighter.

Ready to summarize another video?

Summarize YouTube Video