# Hyperfy Discord - 2025-05-13

## Overall Discussion Highlights

### Asset Optimization
- **WebP Compression Success**: Developers reported significant file size reductions using WebP compression, reducing 3MB PNG skyboxes to 300KB.
- **3D Model Optimization**: A monorail model was optimized from 80MB to 6MB with only 18 draw calls through material combining and mesh simplification.
- **Performance Considerations**: Ashxn noted that optimized worlds could handle >100 users, while poorly optimized avatars would limit capacity to around 10 users.
- **Optimization Tools**: Several users recommended tools including InstaLOD for automated optimization and v-hacd for collision mesh generation.

### Technical Implementations
- **VR Controls**: DevStarlight shared a solution for mapping VR controller buttons to interactions using a combined approach for detecting button presses.
- **Water Effects**: Vox detailed a UV scrolling implementation for water effects that works with skybox buildings by cutting and modifying a sphere mesh.
- **Clickable Objects**: Solutions were shared for making objects clickable with hyperlinks using either direct event handlers or action components.
- **Audio Looping**: Seamless audio looping issues were addressed with recommendations for proper file preparation and testing tools.

### Platform Development
- **UI Toggling Changes**: Discussion about the Z key now toggling all UI elements (including custom UI and reticles), which impacts some gameplay designs.
- **Reconnection Handling**: Plans to implement auto reconnect with exponential backoff capped at 20-30 seconds for handling connection drops.
- **Version Control**: Developers discussed workflows for development and production worlds, noting that app scripts require manual tracking in git repositories.

### Community Building
- **Community Call Announcement**: Upcoming community call hosted by two members.
- **Project Showcases**: Several community worlds were highlighted including TattedAlien.club and Project 89's lore building using Hyperfy.
- **Token Utility**: Questions raised about utility for the Hyper token, though no concrete answers were provided.

## Key Questions & Answers

**Q: Is there version control?**  
A: The world folder stores everything so you can back it up, share it etc. For app scripts you have to manually keep track of changes in your own git repo. (Ashxn)

**Q: Are controls in VR working, or I have to do something in the apps?**  
A: Interact button just isn't mapped yet. (Ashxn)

**Q: Can I make the transition of a looping audio a tiny bit more seamless?**  
A: You can test and do seamless crossfading using drumbot.com/projects/looper. (Ashxn)

**Q: Is there code I can add to an existing GLB model that will make it a clickable hyperlink to a new tab?**  
A: Yes, use `app.onPointerDown = () => world.open("https://foo.com", true)` or create an action component. (Ashxn)

**Q: Would it make sense to let users configure the LiveKit roomId?**  
A: That ServerLiveKit system runs once per world instance. All clients connect to a single server that gives the room id in the initial network snapshot. The token already has the room id embedded in it and LiveKit Client automatically handles it all. (Ashxn)

**Q: Was this water app ever released publicly?**  
A: The simple water plane that ash demonstrated is probably better. Super easy to set up too, don't think there was ever a hyp for it even. (Shiffty)

**Q: Is there any place to download sample projects of hyperfy v1?**  
A: I recommend against coding anything for v1, ancient unsupported code. Have you visited https://docs.hyperfy.xyz/? Hyperfy v2 is the way to go. (maximus)

**Q: How do I make my onscreen UI not toggleable with the new Z key?**  
A: UI is all one thing, and Z is meant to hide it all for screenshots or cinematics. (ash)

## Community Help & Collaboration

### VR Implementation Support
DevStarlight shared code for VR button mapping to help other developers implement interactions:
this.btnDown = this.control.keyE.down || this.control.touchB.down || this.control.xrRightBtn2.down || this.control.xrLeftBtn2.down

### 3D Asset Optimization
Vox helped ~/drdoge.eth optimize a monorail model from 18MB to 6MB with 18 drawcalls by suggesting specific techniques for material combining and mesh simplification. Multiple users shared resources for texture atlasing and collision mesh generation.

### Water Effect Implementation
Vox shared a detailed implementation approach for water effects using UV scrolling:
1. Cut a sphere mesh around skybox buildings
2. Shrink it slightly to avoid z-fighting
3. Apply UV scroll material with normal maps
4. Use script to manipulate texture coordinates over time

### Audio Troubleshooting
Ashxn helped vox troubleshoot audio looping issues by providing a tool (drumbot.com/projects/looper) for testing seamless crossfading and identifying that the problem was with the MP3 file preparation.

## Action Items

### Technical
- Implement VR controls for grabbing and moving items using raycasting (DevStarlight | Numinia)
- Optimize assets using WebP compression for significant file size reduction (Ashxn)
- Implement version control for app scripts (Ashxn)
- Implement auto reconnect with exponential backoff capped at 20-30 seconds (HypPrivakos)
- Optimize monorail model further to reduce file size and draw calls (~/drdoge.eth)
- Create automated 3D model optimization tool as a one-button solution (Ashxn)
- Develop collision generator tool for simplified collision meshes (vox)
- Create water effect using plane with normal map and UV scrolling script (Ashxn)
- Implement UV scrolling water that works with skybox buildings (vox)

### Documentation
- Document performance limits based on CPU, memory, graphics load and server usage (DevStarlight | Numinia)
- Create documentation for raycast implementation in VR (᲼~/^b0gie-(.*)$/)
- Develop resources for non-coding scene element definition (carlosmu)

### Feature
- Add text-based scene description for placing models without using visual editor (carlosmu)
- Integrate AI-powered VRM creation from images (jin)
- Implement SOL token authentication and conditional access (Agent12)
- Implement "Believe app" style launches for marketing and funding (Akuma)
- Develop utility for the hyper token (Spook_Handy)
- Add more configurable UI toggling options to selectively hide/show UI elements (0mka)
- Implement separate chat toggle functionality independent from other UI elements (0mka)