# Hyperfy Discord - 2025-07-18

## Overall Discussion Highlights

### Server Deployment & Hosting
- Roustan shared an updated guide with extra tips for setting up a free Hyperfy server on Fly.io
- Various hosting options were discussed including Fly.io (free for basic servers), AWS, Hertzner (used by Play Sandbox), and Spaceship.com
- Fly.io was highlighted as suitable for low storage needs with easy scalability
- A tweet was shared about someone successfully using Xsebga's tutorial for setting up a Fly.io account

### UI Development
- Developers discussed methods for obtaining screen dimensions to create full-screen UI elements
- Solutions included using `app.control()` to access screen width/height
- UI positioning challenges were noted, particularly for mobile devices
- Safari was reported to have refresh issues when UI elements extend beyond the viewport
- Plans to add viewport dimensions as global properties were mentioned

### 3D Assets & Optimization
- Discussion about Kitbash 3D models revealed they require significant optimization for Hyperfy due to high poly counts
- HiroP advised looking for low-poly models on platforms like Fab or Artstation as alternatives
- Creating low-poly versions of high-detail models and projecting textures onto them was suggested
- Untitled's MOCA builds were recommended as CC0-licensed architectural models

### Technical Issues
- A critical bug was identified where the "world clean" script deletes asset files but not their database entries
- This causes worlds to become inaccessible or stuck at loading screens
- The issue appears when running world clean on live worlds without restarting the world server afterward
- Users emphasized the need for better error handling so worlds can still load with broken elements

## Key Questions & Answers

**Q: How do I get screen width/height in a Hyp app for screen space UI?**  
A: You can use `screen.width` and `screen.height` via `app.control()` (answered by 0mka)

**Q: Can we load an app using `world.load()`?**  
A: Not apps, but you can use it to load GLBs from remote sources (answered by Ashxn)

**Q: Is this a public server or just on the local computer?**  
A: It's a public server. It's worth setting up and exploring. Costs you nothing. (answered by Roustan)

**Q: What are good/cheap servers to use for Hyperfy?**  
A: The hosting section in docs lists several providers; it should cost less than $6 to run a basic Hyperfy server. Fly.io offers a free tier. (answered by maximus)

**Q: If I buy the Kitbash Neo Tokyo 3D building Kit for Hyperfy city building, will it be a waste of money for a non-pro 3D designer?**  
A: Kitbash models will be difficult to get working smoothly in Hyperfy due to high poly counts and textures, requiring significant optimization work (answered by hiroP)

**Q: What's the core issue with world clean?**  
A: World clean is removing hyps files from assets folder but not DB entries, causing loading issues (answered by HowieDuhzit)

## Community Help & Collaboration

### UI Development Assistance
- 0mka helped shmoji with creating full-screen UI elements by providing code examples using app.control()
- Ashxn explained UI positioning techniques using pivot, offset and position properties
- Ashxn committed to adding world.viewportWidth and world.viewportHeight properties to simplify UI sizing

### Server Setup Guidance
- Maximus provided documentation links and hosting options to TheMattEmpire who was looking for server options
- 0mka recommended Fly.io for low storage needs and mentioned Spaceship.com, noting easy upgrades
- Roustan created and shared an updated guide for setting up a free Hyperfy server via Fly.io

### 3D Design Advice
- HiroP provided detailed technical advice to Fibelius about Kitbash models, explaining their limitations for Hyperfy
- HiroP suggested alternatives like low-poly models from Fab/Artstation or creating custom low-poly versions
- HiroP recommended checking Untitled's MOCA builds for CC0-licensed architectural models

### Bug Investigation
- Ash investigated the world clean issue reported by 0mka and HowieDuhzit
- Ash suggested the problem might be related to running world clean on live worlds without restarting afterward
- .hyp shaman helped analyze the file deletion issue, identifying that random files were being deleted/not saved

## Action Items

### Technical
- Fix world clean script to ensure DB entries are deleted along with files (mentioned by 0mka)
- Implement error handling for missing files so worlds can still load with broken elements (mentioned by HowieDuhzit)
- Add warning or automatic restart after world clean to prevent loading issues (mentioned by ash)
- Implement UI responsiveness for different screen sizes (mentioned by 0mka)
- Fix Safari refresh issue when UI elements extend beyond viewport (mentioned by 0mka)
- Implement animation layers for features like guns (mentioned by Ashxn)
- Add support for emissiveMap in models (mentioned by .hyp shaman)
- Set up a Hyperfy free server via Fly.io using the updated guide (mentioned by Roustan)
- Finalize and post about Hyperfy on X (Twitter) within a week (mentioned by Roustan)
- Support X posts about Hyperfy (mentioned by Xukonth)

### Documentation
- Document the need to restart world server after running world clean (mentioned by ash)
- Check Untitled's MOCA builds for CC0-licensed architectural models (mentioned by hiroP)

### Feature
- Add world.viewportWidth and world.viewportHeight for UI sizing (mentioned by Ashxn)
- Consider adding device as a global object for touch device detection and VR mode (mentioned by Ashxn)
- Create an ecosystem for Hyperfy Spartan projects (like Virtual) with stakes and active social media (mentioned by Xukonth)