# Hyperfy Discord - 2025-08-19

## Overall Discussion Highlights

### Performance Optimization
- **Primitive Rendering Breakthrough**: Ash implemented a significant optimization allowing numerous primitives of different sizes and colors to be rendered in a single draw call, reducing draw calls from ~1000 to ~100.
- **Primitive Performance**: Ash mentioned making primitives "100x more performant" with his own skills.

### AI Integration
- **AI-Generated Content**: Ash demonstrated AI's capability to create interactive elements in Hyperfy, including:
  - Trigger zones
  - Moving objects (planes, orbiting satellites)
  - Networked multiplayer applications
- The AI can generate .hyp files that work directly in the engine with minimal overhead.
- Future plans include voice prompting for AI generation in VR.

### Architecture & Development Practices
- **App Structure**: Apps are a combination of GLB, script, and metadata.
- **Game Logic Organization**: A recommended pattern emerged of using a central "game manager" app for core logic while individual apps handle specific functionalities, communicating via events.
- **Local Development**: Testing on Quest devices can be done using port forwarding without SSL certificates.
- **Security Model**: Scripts are sandboxed using the 'ses' package to prevent malicious code execution.

### Editor Improvements
- **Precision Controls**: New keyboard shortcuts were implemented for finer object positioning:
  - Alt+arrow keys: 0.01 meter steps
  - Regular arrow keys: 0.1 meter steps
  - Shift+arrow keys: 1 meter steps
  - Similar functionality for rotation with appropriate degree values
- Mac users reported issues with the Alt key shortcuts (Option key not working properly).

### Community Dynamics
- Some tension was evident regarding credit for work on the platform, with Ash addressing accusations about profit distribution and contribution recognition.
- The community showed support for the development team, with emphasis on the value of the GPL license and the importance of focusing on the work and community vision.

## Key Questions & Answers

**Q: How can an app spawn a GLB in world space?**  
A: You can use world.add(mesh) which will remove it from its previous parent. After cloning a node, you need to app.remove it and world.add it.

**Q: If I have 50 items in a "kitchen", do they all need to be their own individual app, or can a kitchen app "load" GLBs based on code?**  
A: Everything is apps, but you could have one mega app with all meshes in a single Blender file that the script uses as a buffet of assets.

**Q: How should I structure game logic across multiple apps?**  
A: Use a central "game manager" app for core logic while individual apps handle specific functionalities, communicating via events.

**Q: How can I test networked functionality on Quest without SSL certificates?**  
A: Use port forwarding with Meta Quest Developer Hub: "adb reverse tcp:3000 tcp:3000"

**Q: Is Hyperfy embedding script content or just pointers where the actual code gets installed from?**  
A: Each hyp file contains the script source, and apps are sandboxed using the 'ses' package.

**Q: Can we have finer steps (0.01) when arranging objects in worlds?**  
A: This has been implemented in the latest dev version with keyboard shortcuts: Alt+arrow for 0.01 step, arrow keys for 0.1 step, and Shift+arrow for 1 step.

## Community Help & Collaboration

1. **App Architecture Guidance**:
   - Helper: Ash
   - Helpee: Lastraum
   - Context: Understanding Hyperfy's app architecture for game development
   - Resolution: Explained how to structure apps with a central game manager and specialized apps

2. **Quest Development Support**:
   - Helper: Ash
   - Helpee: mrtzhckr
   - Context: Testing networked functionality on Quest without SSL certificates
   - Resolution: Provided command for port forwarding using Meta Quest Developer Hub

3. **GLB Spawning Technique**:
   - Helper: Shiffty
   - Helpee: Lastraum
   - Context: How to spawn a GLB in world space
   - Resolution: Explained the proper sequence of removing from app and adding to world

4. **Security Model Explanation**:
   - Helper: Shiffty and marcel 🌵
   - Helpee: marcel 🌵
   - Context: Understanding how Hyperfy handles script security
   - Resolution: Explained the sandboxing approach using the 'ses' package

5. **Community Support During Conflict**:
   - Helper: PabloFM
   - Helpee: Ash
   - Context: Defending against public accusations
   - Resolution: Posted a supportive statement emphasizing the value of GPL license and focusing on the work and community

## Action Items

### Technical
- Implement voice prompting for AI generation in VR (mentioned by Ash)
- Explore ways to make AI-generated networked apps more robust (mentioned by Ash)
- Fix Mac compatibility issue with Alt key shortcuts (Option key not working) (mentioned by 𝕽𝖔𝖚𝖘𝖙𝖆𝖓)
- Optimize AI color palette for primitive instancing (mentioned by vox)
- Continue development of Hyperfy platform, focusing on "an epic product" (mentioned by Ash)
- Maintain improvements to primitives codebase (mentioned by Ash)

### Documentation
- Document best practices for structuring game logic across multiple apps (mentioned by Ash)
- Document the new keyboard shortcuts for object positioning and rotation (mentioned by Ash)

### Feature
- Support for AI-generated trigger zones with interactive elements (mentioned by vox)
- Implement point-to-click movement controller ("Hyperscape") (mentioned by shaw)
- Support for dynamic loading of GLBs from external sources (mentioned by Shiffty)