Skip to content

JackFinnis/Alive

Repository files navigation

Alive icon

Alive

An interactive AR experience for Apple Vision Pro. Make your living room come alive with realistic creatures that respond to your gestures, movement, and surroundings.

https://jackfinnis.com/apps/alive

Aquarium

⚠️ Missing Assets

3D models and image assets are not included in this repository due to licensing restrictions. To build and run the app, email jack@jackfinnis.com for access to the asset files, then place them at:

  • Alive/Files/
  • Alive/Resources/Assets.xcassets/
  • Packages/RealityKitContent/Sources/RealityKitContent/RealityKitContent.rkassets/

🌍 Spaces

🐟 Aquarium

Tap to spawn fish — clownfish, sardines, and yellow tangs school around your room using boid flocking. Reach 50 fish and a shark appears. Seaweed and starfish anchor to your walls and surfaces.

🕷️ Cavern

Spiders crawl across your walls and ceiling using pathfinding over spatial mesh surfaces. Hold out your hand and they'll climb onto it. Cobwebs break on contact. Tap to spawn ants.

🦋 Meadow

Butterflies flutter through your space. Point to attract them to your finger. Clap to scatter them. Butterfly bushes bloom on your surfaces.

🏗️ Architecture

Built with RealityKit's Entity Component System (ECS) pattern:

  • Components — Pure data structs attached to entities (e.g. FishComponent, SpiderComponent)
  • Systems — Per-frame logic that queries entities by component (e.g. FishSystem runs boid flocking, SpiderSystem runs pathfinding)
  • Spaces — Immersive views that set up entities, providers, and systems

Three ARKit providers feed real-world data into the ECS:

  • HandProvider — hand joint tracking, gesture detection (pointing, clapping, dropping)
  • DeviceProvider — headset world position
  • MeshProvider — spatial mesh anchors for environment understanding

🧠 Creature Movement Algorithms

Creature Algorithm Key Behaviors
Fish Boid flocking — cohesion, separation, alignment, boundary avoidance Schooling, obstacle avoidance
Shark Seek steering — target selection, obstacle avoidance, scary entity repulsion Appears at 50+ fish, chases them
Spiders RRT pathfinding — rapidly-exploring random tree over spatial mesh graph Crawl on walls/ceiling, climb onto hands
Butterflies Waypoint path-following — sequential target pursuit with landing detection Respond to pointing gestures, scatter on clap

⚡ Performance

  • SpatialGrid for O(1) spatial neighbor lookups
  • Entity recycling: furthest entities removed and respawned closer to the user
  • File enum caches loaded 3D models to avoid redundant I/O

📦 Dependencies

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md and TODO.md to get started.

📄 Licence

MIT — see Acknowledgments for third-party asset licences.

🙏 Acknowledgments

Models

Asset Creator Licence
Clownfish Apple Apple Sample Code
Sardine Apple Apple Sample Code
Yellow Tang Apple Apple Sample Code
Starfish Apple Apple Sample Code
Seaweed Apple Apple Sample Code
Butterfly Apple Apple Sample Code
Shark PeterHappyBoy TurboSquid
Spider Shadocks CC BY 4.0
Ant ergin3d TurboSquid
Butterfly Bush HKhalife Fab EULA

Images

Asset Creator Licence
Eye Freepik Flaticon
Starfish Design Circle Flaticon
Cobweb srip Flaticon
Flower yoyonpujiono Flaticon

Audio

Asset Creator Licence
Underwater wjoojoo CC0 1.0
Cave Sclolex CC0 1.0
Forest Erablo42 CC BY 4.0

About

A unique interactive AR experience for Apple Vision Pro

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages