# Hyperfy Discord - 2025-03-16

## Overall Discussion Highlights

### Development & Technical Implementation
- **Item System Development**: Detailed discussions about creating consumable items like food with effects, player interactions, and hooks between client and server. Code examples were shared showing implementation of the hooks.call() system that connects client and server functionality.
- **Interactive Objects**: Several developers shared implementations of interactive elements including:
  - A projector with on/off switch and sound controls
  - Drum pads with sound effects
  - Physics-based contraptions
- **Authentication Approaches**: Comparison of authentication methods for web applications, including stateful sessions vs. stateless tokens, and web3 vs. traditional auth methods. Step-by-step process for implementing wallet-based authentication with JWT was shared.
- **Random Avatar Assignment**: Implementation of functionality to auto-assign random avatars to new users entering Hyperfy worlds, which persists between sessions using the storage feature. This prevents everyone from entering as the default Hyperfy bot.

### 3D Design & Optimization
- **Realistic Environment Techniques**: Ashxn shared a method for creating grass that blends into the ground by forcing grass normals upward, allowing PBR materials to correctly respond to lighting while preventing shadow casting issues.
- **Large-Scale Environment Optimization**: Discussion about building city environments using optimization techniques like atlasing and instancing to maintain performance while preserving visual quality.
- **Modular Asset Development**: TheMattEmpire is developing modular road components with plans to release them on the marketplace once Collections and payments are implemented.

### Platform Compatibility & Features
- **Apple Vision Pro Compatibility**: Confirmation that Hyperfy v1 worked on Apple Vision Pro, and v2 should work with potential tweaks.
- **Hyperfy "Unlocked" Branch**: Information about a special branch that exposes Three.js completely, including CSS3DRenderer and CSS3DObject.
- **VR Mode Issues**: Users reported problems with VR mode not fully loading despite environments running well on mobile and PC.

### Community & Events
- **Web3 Pop Up Shop + Fashion Show**: VTATV hosted a successful live event with 175 attendees, featuring music performances and a fashion show.
- **Tutorial Series**: Announcement of an upcoming tutorial session with an open-stage format for participants to ask for help.

### Token Discussion
- Brief price speculation about the Hyperfy token, noting price hasn't increased despite Solana's movements.

## Key Questions & Answers

**Q: Does the mesh need to have colliders for this to work?**  
A: No colliders needed (answered by Ashxn)

**Q: Is it possible to access Hyperfy from Apple Vision Pro?**  
A: People have tried on v1 and it worked, v2 is untested but should be possible with tweaks if developers have access to one (answered by Ashxn)

**Q: Did you use the database directly or just downloaded avatars from the site?**  
A: For now downloaded, but want to integrate with the database next (answered by Omka)

**Q: How does hooks.call() work in the item system?**  
A: hooks.call('useEnd') on client calls server.useEnd() and vice versa, acting as a wrapper around app.send() (explained by Ashxn)

**Q: What does "unlocked" mean for Hyperfy?**  
A: It means Three.js is completely exposed, including CSS3DRenderer and CSS3DObject (explained by Omka)

## Community Help & Collaboration

1. **Item System Implementation**
   - Ashxn explained to bear how hooks.call() works in the item system, clarifying that it acts as a wrapper around app.send() to facilitate client-server communication.

2. **Plugin System Conversion**
   - Ashxn helped peezy convert mods into a plugin system by explaining how to add systems in createClientWorld/createServerWorld and provided code examples.

3. **Web3 Authentication**
   - peezy provided devilsadvocate.sol with a step-by-step process for implementing wallet-based authentication with JWT.
   - mattimus explained differences between stateful sessions and stateless tokens for authentication.

4. **Random Avatar Assignment**
   - peezy created and shared functionality to auto-assign random avatars from a station when users first login, with persistence between sessions.

5. **3D Design Techniques**
   - Ashxn shared techniques for creating realistic grass that blends with ground using forced upward normals, PBR materials, and custom shadow properties.
   - 𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎 explained using atlasing and instancing techniques for optimizing city environments.

6. **World Building Guidance**
   - maximus helped Zen understand world hosting features and directed them to resources for building without extensive coding.

## Action Items

### Technical Tasks
- Implement file syncing to allow developers to use external IDEs (mentioned by bear)
- Improve colliders and add visual feedback for drum pad activation (mentioned by cru)
- Fix sound loop delays in projector implementation (mentioned by cru)
- Implement direct database integration with opensourceavatars.com (mentioned by Omka)
- Implement loading random avatars from URLs to reduce .hyp file size (mentioned by peezy)
- Investigate VR mode loading issues on shared 3D environments (mentioned by 𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)
- Implement grass blending technique with forced upward normals (mentioned by Ashxn)
- Create Y intersection road component (mentioned by TheMattEmpire)
- Develop modular/seamless road components (mentioned by TheMattEmpire)
- Package assets into collections for marketplace (mentioned by TheMattEmpire)

### Documentation Needs
- Add links to docs, website, and playable demo in GitHub repo README (mentioned by jin)
- Update "What is Hyperfy" page (mentioned by Omka)
- Create a comprehensive list of Hyperfy v2 URLs (mentioned by devilsadvocate.sol)
- Create tutorials for building optimization techniques (mentioned by 𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)

### Feature Requests
- Create a landing page that directs to v1, v2, playworld, docs, and marketplace (mentioned by Omka)
- Implement chocobo racing (mentioned by Ashxn)
- Test and ensure compatibility with Apple Vision Pro v2 (mentioned by Ashxn)
- Build proper car applications with good physics and sounds (mentioned by 𝚟𝚘𝚡𝚟𝚒𝚎𝚗𝚗𝚎)
- Billboard hyps that can load images from web (mentioned by TheMattEmpire)
- Add fences, billboards, and seats to asset collection (mentioned by TheMattEmpire)