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

🌍 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 TODO.md for a list of ideas and improvements. Pick one and open a pull request, or create an issue to discuss.

🙏 Acknowledgments

Models

Images

Audio

About

A unique interactive AR experience for Apple Vision Pro

Resources

Stars

Watchers

Forks

Contributors

Languages