Vibe coding 'Junkwars' - a prop hunt deathmatch game #vibejam

By Volo Builds

TechnologyAIEntertainment
Share:

Key Concepts:

  • Vibe Coding: An iterative development process using AI code generation tools, involving frequent switching between tasks and branches.
  • 3js: A JavaScript library used for creating and displaying animated 3D computer graphics in a web browser.
  • Height Maps: A grayscale image used to represent the terrain elevation in a 3D environment.
  • Billboarding: A technique where 2D images are always oriented to face the camera, creating the illusion of 3D objects.
  • WebSockets: A communication protocol that provides full-duplex communication channels over a single TCP connection, often used for real-time applications like multiplayer games.
  • Cloudflare Pages: A platform for deploying static websites with built-in continuous integration and delivery (CI/CD).
  • Vite: A build tool that aims to provide a faster and leaner development experience for modern web projects.
  • Merge Conflicts: Situations that occur when merging different branches of code where changes conflict and require manual resolution.

1. Game Development Progress and Features:

  • Initial Game Height Maps: Successfully implemented height maps for terrain generation, which significantly improved the game's environment compared to previous methods.
  • Shooting Mechanics: Basic shooting functionality was added, allowing the player to fire projectiles.
  • Junk Assets: Various junk-themed assets were created and integrated into the game world.
  • Camera Mechanics: Implemented camera controls, including adjusting the camera angle.
  • Billboarding: Used billboarding to display junk items as 2D images that always face the camera.
  • Skybox: Added a skybox to create a more immersive environment.
  • Textured Floors: Implemented textured floors with variations across different areas of the map.
  • Enemies (NPCs): Added non-player character enemies that the player can interact with.
  • Prop Change Mechanic: Implemented a feature allowing the player to transform into different junk items using the control key, with a 15-second cooldown.
  • Death and Respawn Mechanic: Added a death and respawn system with a UI overlay and random respawn locations.
  • Spawning Immunity: Implemented a period of invincibility and invisibility for the player after respawning.

2. Technical Implementation Details:

  • Height Map Configuration: Using height maps was a "super quick" way to configure the game's land.
  • Lighting Adjustments: Attempted to adjust lighting to emphasize depth near the camera but ultimately reverted the changes due to unsatisfactory results.
  • UI Refactoring: Moved UI elements to a separate playerUI.js file for better organization and future mobile support.
  • WebSockets for Multiplayer: Planned to use WebSockets for real-time communication in the multiplayer version.
  • Vite Integration: Integrated Vite as a build tool to optimize and bundle the game's assets for deployment.
  • Cloudflare Pages Deployment: Deployed the game to Cloudflare Pages using a Git-connected CI/CD pipeline.

3. Vibe Coding Methodology:

  • Parallel Feature Development: Worked on multiple features simultaneously by switching between different code instances (Cursor windows).
  • AI-Assisted Coding: Used AI (Claude in Cursor) to generate code, refactor, and resolve merge conflicts.
  • Iterative Refinement: Continuously refined code based on AI suggestions and testing.
  • Rapid Prototyping: Quickly implemented and tested new features, often reverting changes that didn't work as expected.
  • Dev Log: Maintained a development log in an MD file to track progress and features.

4. Challenges and Solutions:

  • Volume Issues: Addressed initial volume concerns based on user feedback.
  • Texture Issues: Identified and resolved a problem with uniform floor textures.
  • Aiming Logic: Struggled with implementing accurate aiming logic and crosshairs, eventually postponing the feature.
  • Hitbox Inconsistencies: Identified and attempted to fix inconsistencies in hitboxes for different junk items.
  • Merge Conflicts: Resolved merge conflicts resulting from parallel feature development.
  • Deployment Issues: Troubleshooted and resolved deployment issues on Cloudflare Pages, including CORS errors and incorrect canvas sizing.

5. Specific Code Changes and Refactoring:

  • Lighting Refactor: Moved lighting code into a separate file.
  • UI Refactor: Moved UI elements into a dedicated playerUI.js file.
  • Death and Respawn Refactor: Moved death and respawn logic into a death.js file.
  • Vite Integration: Updated asset imports to use Vite syntax.
  • Hitbox Adjustments: Attempted to adjust hitbox dimensions based on junk type but reverted the changes.

6. User Interaction and Feedback:

  • Chat Integration: Integrated chat overlay into the stream.
  • Feedback Solicitation: Actively sought feedback from viewers on game features and design choices.
  • Feature Suggestions: Encouraged viewers to suggest specific junk items for inclusion in the game.

7. Notable Quotes and Statements:

  • "Definitely read up about hyp Maps because that was super quick for me."
  • "This is the true nature of vibe coding you just go with the flow."
  • "You don't need jira see that's not how Vibe coders build software we just we just have a notepad."
  • "Happy little accidents of vibe coding."

8. Data and Statistics:

  • Cooldown on prop change: 15 seconds.
  • Invincibility duration after respawn: 5 seconds.

9. Synthesis/Conclusion:

The video documents a rapid and iterative game development process using AI-assisted coding (Vibe Coding). The developer successfully implemented several key features, including height maps, shooting mechanics, prop changing, and a death/respawn system. Challenges were encountered with aiming logic, hitbox inconsistencies, and deployment, but were addressed through iterative refinement and AI assistance. The game was successfully deployed to Cloudflare Pages, allowing viewers to play a single-player version. The process highlights the potential of AI tools to accelerate game development while also emphasizing the importance of problem-solving and adapting to unexpected issues.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "Vibe coding 'Junkwars' - a prop hunt deathmatch game #vibejam". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video
Vibe coding 'Junkwars' - a prop hunt deathmatch game #vibejam - Video Summary