Halo-Craft - Building a Minecraft-Halo Mashup Game with Three.js and AI Assistance
My journey creating Halo-Craft, an immersive browser-based game that combines Minecraft's voxel mechanics with Halo's combat systems, built primarily using AI assistance.
When Minecraft Meets Halo: A Web-Based Gaming Experiment
As a lifelong Halo fan, I’ve always been fascinated by the franchise’s rich universe and satisfying combat mechanics. When I discovered a YouTube tutorial series by Dan Greenheck on building a Minecraft clone from scratch using JavaScript and Three.js, I immediately saw an opportunity to merge two of my favorite gaming worlds.
The result is Halo-Craft - a browser-based game that combines Minecraft’s block-building mechanics with the combat elements and aesthetic of the Halo universe.
Building the Game with AI Assistance
What makes this project especially interesting is that it was largely built with AI assistance. Using tools like Claude, Cursor, and GPT-4, I was able to expand upon the foundation of the Minecraft tutorial and implement Halo-inspired features that would have otherwise been far more complex to develop independently.
The AI assistants were particularly helpful with:
- Designing the combat system - Creating energy weapons with projectile physics, adding shield mechanics, and implementing the health system
- Generating enemy AI - Implementing patrol, chase, and attack behaviors for Covenant-inspired enemies
- Creating the space environment - Crafting the iconic Halo ring that orbits in the distance
- Implementing special effects - Adding bloom effects for energy weapons and particle effects for explosions
- Designing the HUD and UI - Creating a Halo-inspired interface with shield/health indicators and radar
Core Features and Gameplay Elements
Minecraft Elements
The game preserves the core building mechanics that make Minecraft so compelling (from Dan Greenheck’s project):
- Procedural World Generation with various biomes (Tundra, Temperate, Jungle, Desert)
- Realistic Physics with collision detection
- Terrain Chunking for optimized performance
- Save/Load game state with localStorage (F1/F2)
Halo FPS Elements
What sets Halo-Craft apart is the integration of classic Halo gameplay elements:
- Covenant-inspired Enemies with AI patrol, chase, and attack behaviors
- Plasma Weapons with projectile physics
- Health and Shield System (shields recharge after 5 seconds)
- Radar System displays nearby enemies
- Enhanced Movement with higher jumps and faster running
- Space Environment featuring a Halo ring orbiting in the distance
- Post-processing Effects including bloom for energy weapons
Technical Implementation: Under the Hood
Looking through the codebase, you can see how the game is structured into modular components:
Core Systems
- World Generation (
world.js
,worldChunk.js
) - Creates the procedural voxel terrain with different biomes - Player Controller (
player.js
) - Handles movement, weapons, and player state - Physics System (
physics.js
) - Manages collisions and movement constraints - Enemy AI (
enemies.js
) - Controls enemy behavior and combat interactions
Halo-Specific Features
Some of the most interesting technical aspects are the Halo-specific features:
The Halo Ring
The iconic Halo ring is created in haloTextures.js
and rendered as a large torus in the distance:
1
2
3
4
5
6
7
8
9
// Creating the Halo ring with Earth-like texture
const ringGeometry = new THREE.TorusGeometry(1200, 200, 32, 200);
const ringMaterial = new THREE.MeshStandardMaterial({
map: ringTexture,
emissive: 0x3366cc, // Blue-tinted emissive for atmosphere glow
emissiveIntensity: 0.2
});
const haloRing = new THREE.Mesh(ringGeometry, ringMaterial);
haloRing.position.set(32, 200, 32);
Energy Weapons and Projectiles
The plasma weapons and projectiles are implemented in projectiles.js
with effects like:
- Glowing projectiles using emissive materials
- Point lights attached to projectiles for dynamic lighting
- Particle effects for explosions
- Trail effects behind projectiles
Shield System
The shield recharging mechanics in player.js
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
updateShield() {
if (this.isDead) return;
const now = Date.now();
// Only recharge shield after delay from last damage
if (this.shield < this.maxShield && now - this.lastDamageTime > this.shieldRechargeDelay) {
const rechargeAmount = this.shieldRechargeRate / 60;
this.shield = Math.min(this.maxShield, this.shield + rechargeAmount);
// Update HUD when shield changes
this.updateHUD();
}
}
Cortana Interface
One of my favorite touches is the Cortana hologram interface (cortana.js
) that appears at game start with dialogue that sets the stage:
1
2
3
4
5
6
7
const cortanaDialogue = [
"Spartan, welcome to Installation 04.",
"I'm detecting Covenant activity in this sector. Proceed with caution.",
"Your mission is to eliminate hostile forces and secure this area.",
"I'll remain in your neural interface to provide tactical support.",
"Good luck, Chief. I'll be monitoring your progress."
];
I feel like there’s a lot of potential for Cortana, possibly integrating with a live LLM somehow.
CI/CD and Deployment
The game is automatically built and deployed using GitHub Actions. Every commit to the main branch triggers a workflow that:
- Sets up the build environment
- Installs dependencies
- Builds the project with Vite
- Deploys to GitHub Pages
This allows for rapid iteration and easy sharing of the latest version.
Challenges and Learnings
Building Halo-Craft wasn’t without its challenges:
- Performance Optimization - Balancing visual fidelity with performance, especially with the bloom effects and enemy AI
- Enemy Pathfinding - Creating intelligent enemy movement in a voxel world
- Projectile Physics - Implementing satisfying projectile behavior and collision detection
- Space Environment Integration - Making the Halo ring visible from anywhere in the world
Working with AI tools taught me to be precise with my requirements and intentions. Sometimes the AI would misinterpret what I wanted, and making a bit of a mess of things, which lead me to always work in feature branches and when it finally figured out what I wanted (sometimes better than expected, eve), I would ask for the precise prompt it would need to one-shot the feature. This was a decent pattern to follow. The ability to quickly iterate and experiment with different approaches made development much faster than it would have been otherwise and sometimes the AI’s would give me much better than expected results.
Try It Yourself!
You can play Halo-Craft right now in your browser: https://jmcdice.github.io/halo-craft/
Controls
- WASD - Move
- SHIFT - Sprint
- SPACE - Jump
- MOUSE - Look around
- MOUSE CLICK - Shoot plasma bolts
- U - Toggle UI controls
- R - Reset camera
Next Steps
This project is an ongoing labor of love. Some features I’m considering for future updates:
- Campaign mode in addition to battle royal
- Additional weapon types beyond the plasma rifle
- Vehicles from the Halo universe
- More interactive environment elements
Conclusion
Halo-Craft represents what’s possible when combining established game mechanics, modern web technologies, and AI assistance. What started as a learning exercise based on a tutorial and exiting project evolved into a unique gaming experience that pays homage to two iconic franchises.
I’d love to hear your feedback and suggestions!
Special thanks to Steven Lambert for his excellent Minecraft tutorial series that provided the foundation for this project, and to the AI assistants (Claude, GPT-4, and others) that helped bring the Halo elements to life.