BLOOMIVERSE
Bloomiverse | MR魔法园艺冒险游戏
Bloomiverse 是一款MR园艺冒险游戏。玩家扮演拥有魔法的园丁,通过神秘传送门从异世界收集种子,使用铲子、浇水壶、花盆等工具在真实环境中培育植物,同时需要击破随机出现、威胁植物生长的邪恶泡泡来保护幼苗。游戏的终极目标是通过喂养成熟植物产出的能量水晶,培育出传说中的"白色植物之王"。
项目类型: MR(混合现实)游戏 / 5人团队 / 一个月
我的角色: 王尊(Zun Wang)— 主策划(基础玩法与系统设计、主程序开发)
个人贡献:
负责游戏核心玩法、各类植物技能体系设计及开发工作。为突破技术瓶颈,快速自学AR开发技术工具,通过Excel确定团队分工,协同程序、美术人员优化开发。针对原生工具缺陷,自研带交互提示的手部抓取交互系统,打通上层功能脚本参数传递逻辑,设计开发异世界传送门与种子获取核心机制,运用stencil shader技术实现场景无缝空间切换。
成功解决Unity MR Toolkit交互功能无法定制的技术难题,完善了游戏AR交互体系。新增的传送门玩法激发玩家探索与移动意愿,改善游戏环境互动薄弱,提升AR沉浸式体验与可玩性,顺利完成全套玩法落地与版本开发,保障项目顺利完成。
I am Zun Wang. In this MR project, I was responsible for design of basic gameplay and mechanicsm, and foundational programming development, including:
A selective rendering system related to stencil-based portals;
Generation of portals and objects in special spatial environments;
Grab interactions;
Plant-related mechanics such as seed acquisition, planting, and growth..
Brief of Project Concept
+ Overview
Project Concept
Bloomiverse is an AR gardening adventure where players take on the role of a magical gardener. Through mystical portals, players collect seeds from another world and use tools like shovels, watering cans, and flowerpots to grow plants in their real-world environment. Players must also defend their seedlings by popping evil bubbles that appear randomly to threaten the plants. The ultimate goal is to cultivate the legendary White Plant King by feeding it energy crystals produced by mature plants.
How It Meets the Brief
1. Immersive AR Gameplay
Bloomiverse utilizes AR technology to seamlessly blend the real and virtual worlds. The area outside the portal combines the player’s real-world environment with augmented virtual elements, such as plants, tools, and bubbles, creating an interactive magical garden.
The interior of the portal, however, transports players to a fully virtual world, offering a stark contrast and emphasizing the portal’s mystical nature.
Players use a right-hand controller for precise and intuitive interactions, eliminating the need for complex gesture recognition while ensuring accessibility.
2. Innovative Interactions
The gameplay includes intuitive controls for selecting and using tools such as shovels, watering cans, and flowerpots.
A dynamic bubble-popping mechanic adds an exciting layer of defense, making the experience more engaging and tactile. This combination of tools and mechanics creates a well-rounded interactive experience.
3. Unique and Challenging Objectives
The gameplay balances calm, meditative gardening activities like planting seeds and nurturing plants with active challenges like protecting seedlings from evil bubbles.
Growing the White Plant King, which requires careful management of resources and energy crystals, provides a satisfying long-term goal, encouraging strategic planning and creativity.
4. Engaging Visual and Audio Design
The project incorporates custom 3D modeling and artwork to create a magical and whimsical visual atmosphere, including the intricate design of the portal, tools, and plants.
A carefully composed soundtrack featuring mystical and calming melodies enhances the magical ambiance, immersing players in the fantastical world of Bloomiverse, both in the augmented real-world garden and within the fully virtual portal world.
Related material
We gained insights into AR project setup in Unity from the Bilibili video series 《[硬核的XR王师傅的个人空间-硬核的XR王师傅个人主页-哔哩哔哩视频]》, which provided valuable knowledge on configuring the environment. Additionally, the YouTube channel Valem Tutorials, particularly the videos “[Mixed Reality Scene Information with Meta MR Utility Kit - Unity Tutorial]” and “[How to make a Portal Effect in Mixed Reality - Unity Tutorial]”, introduced the use of the MRTK toolkit and the implementation of virtual portal effects. These resources were instrumental in the successful development of the core functionalities of our project.
DEVELOPMENT 程序开发
用于自动为场景中的物体挂载 ARObject 脚本,确保所有存在的以及后续动态生成的物体都具备正确的传送门交互逻辑,避免遗漏配置。
单例管理:采用单例模式(Singleton),保证全局唯一实例,并通过 DontDestroyOnLoad 确保在场景切换时不被销毁,便于跨场景统一管理。
延迟批量挂载:游戏启动后延迟1秒(等待场景物体加载完成),通过协程遍历场景中所有已存在的物体,自动为其挂载 ARObject 脚本。
过滤机制:挂载前会跳过特定物体,例如带有"IgnoreScript"标签、"MainCamera"标签,或 hideFlags 被标记为 NotEditable / HideAndDontSave 的物体,避免误挂载到系统物体或不应处理的对象上。
重复挂载保护:挂载前检测目标物体是否已拥有 ARObject 组件,若已存在则跳过,避免重复添加。
支持动态生成物体:对外暴露 TryAddScript 方法为 public,使得后续动态生成的物体(例如传送门中随机生成的植物、道具等)也能在生成时调用该方法补挂 ARObject 脚本,保证系统的可扩展性与一致性。
PortalObjectManager 脚本:从预设的预制体(Prefab)列表中随机选取物体,并在传送门周围指定半径内实例化生成;将每个生成的物体与对应传送门关联,实现物体与传送门之间的无缝交互与状态同步;在初始化时播放传送门相关音效,增强沉浸感。
PortalSpawnRandom 脚本:在用户自定义的最小/最大时间间隔内随机生成传送门;在圆形区域内随机化传送门生成位置,增加玩法的多样性;在生成新传送门前自动销毁已存在的传送门,维持性能并减少场景中的冗余物体。
Stencil System 选择性渲染系统
基于可配置的 Stencil ID 实现选择性渲染,用于控制物体的可见性,支撑传送门内外的无缝渲染与特殊空间效果。负责该系统的逻辑设计、渲染性能优化,并确保与 URP(Universal Render Pipeline)的兼容性,通过动态管理复杂环境中的物体可见性来增强沉浸感。
This script implements a stencil-based selective rendering system. It utilizes a configurable Stencil ID to control object visibility, enabling features like seamless portal rendering and special spatial effects. My contribution includes designing the stencil logic, optimizing rendering performance, and ensuring compatibility with the Universal Render Pipeline (URP). This system enhances immersion by dynamically managing object visibility in complex environments.
Portal Interaction System 传送门交互系统
ARObject 脚本:根据物体处于虚拟空间内/外的状态,动态更新其 Layer 与 Tag,保证渲染与交互逻辑无缝衔接;通过定位玩家视口(如 Center Eye Anchor)动态更新物体可见性与行为;使用协程(Coroutine)高效地循环检测与更新物体状态,保证复杂环境下的运行流畅度。
PortalTrigger 脚本:玩家与传送门交互时切换虚拟空间状态,正确更新门内外物体;实现冷却机制以防止传送门被重复触发,提升交互稳定性;在必要时清理物体并重置传送门状态,保证系统资源效率与沉浸感的维持。
This system manages dynamic object behavior and transitions between virtual and real spaces through portals. It consists of two key components:
ARObject AR物体
This script handles object state updates and interactions based on the portal's context.Dynamic Layer and Tag Updates: Objects dynamically change their layer and tag based on whether they are inside or outside the virtual space. This ensures seamless integration with rendering and interaction logic.
Eye Anchor Initialization: The system locates the player’s viewport (e.g., the center eye anchor) and updates object visibility and behavior accordingly.
Coroutine-based Optimization: Coroutines are used to repeatedly check and update object states efficiently, ensuring smooth performance in complex environments.
PortalTrigger
This script facilitates transitions and interactions triggered by the portal itself.Virtual Space Switching: Toggles the virtual space state when a player interacts with the portal, ensuring objects inside and outside the portal are correctly updated.
Cooldown Mechanism: Implements a cooldown to prevent repeated triggering of the portal, enhancing stability during interactions.
Portal Cleanup: Cleans up objects and resets the portal state when necessary, ensuring the system remains resource-efficient and maintains immersion.
AR Object auto-attaching AR Object 自动挂载管理器
This system handles the spawning and management of objects in the portal environment, adding dynamic and immersive interactions. It is composed of two main components:
PortalObjectManager Script
This script is responsible for spawning objects and linking them to the portal.Random Object Spawning: Objects are randomly selected from a predefined list of prefabs and instantiated within a specified radius around the portal.
Portal Linking: Each spawned object is associated with the portal to enable seamless interaction and state synchronization between the object and the portal.
Audio Integration: Adds immersion by playing portal-related sound effects during initialization.
PortalSpawnRandom Script
This script adds an additional layer of randomness by dynamically spawning portals at random intervals and positions.Time-based Portal Spawning: Portals are generated at random time intervals, with user-defined minimum and maximum limits.
Position Randomization: Portals are spawned within a circular area, ensuring variety in gameplay experiences.
Lifecycle Management: Automatically destroys existing portals before spawning a new one to maintain performance and reduce clutter in the scene.
Portal object management 传送门内物体生成与管理系统
This system handles the spawning and management of objects in the portal environment, adding dynamic and immersive interactions. It is composed of two main components:
PortalObjectManager Script
This script is responsible for spawning objects and linking them to the portal.Random Object Spawning: Objects are randomly selected from a predefined list of prefabs and instantiated within a specified radius around the portal.
Portal Linking: Each spawned object is associated with the portal to enable seamless interaction and state synchronization between the object and the portal.
Audio Integration: Adds immersion by playing portal-related sound effects during initialization.
PortalSpawnRandom Script
This script adds an additional layer of randomness by dynamically spawning portals at random intervals and positions.Time-based Portal Spawning: Portals are generated at random time intervals, with user-defined minimum and maximum limits.
Position Randomization: Portals are spawned within a circular area, ensuring variety in gameplay experiences.
Lifecycle Management: Automatically destroys existing portals before spawning a new one to maintain performance and reduce clutter in the scene.
ContactGrabber System 抓取交互系统
作为管理物体抓取、释放、高亮等交互行为的核心组件,提供直观且沉浸式的交互机制。
抓取与释放:玩家按下抓取键时,系统将范围内最近的可交互物体吸附至玩家手部,停止其物理模拟并使其跟随玩家手部运动,同时提供粒子特效与音效反馈;针对植物、铲子等特殊物体设有专门的处理逻辑。释放抓取键时物体被分离,并根据手柄运动状态还原其速度与旋转,营造真实的物理效果。
物体高亮:处于交互范围内的可交互物体会被高亮显示,为玩家提供视觉提示;脚本动态管理高亮状态,在目标切换或高亮移除时正确重置材质。
音效与视觉反馈:通过音效增强交互体验,并在物体交互时触发撞击粒子特效。
位置动态更新:通过插值(Interpolation)平滑更新被抓取物体的位置与旋转,使其与玩家手部动作保持一致。
基于碰撞的交互判定:进入触发区域时评估周围物体的可交互性,判断其是否可被抓取;并对特定物体(如"EvilBubble")在接触时进行销毁处理,同时触发相应音效。
The ContactGrabber script is a core component designed to manage object interactions, such as grabbing, releasing, and highlighting. It enhances gameplay by enabling intuitive and immersive interaction mechanics.
Grabbing and Releasing Objects
Grabbing:
When the player presses the grab button, the script attaches the nearest interactable object to the player's hand, stopping its physics and allowing it to follow the player's movements.Visual and audio feedback is provided upon grabbing, including particle effects and sound playback.
Specialized handling is implemented for unique objects such as plants or shovels.
Releasing:
On releasing the grab button, the object is detached, and its velocity and rotation are restored based on the controller's motion, creating a realistic effect.
Object Highlighting
Interactable objects are highlighted when in range, providing visual cues to the player.
The script dynamically manages highlights by detecting the player's target and resetting the material when the highlight changes or is removed.
Audio and Visual Effects
Includes sound effects to enhance the interaction experience.
Implements an impact particle system, which is triggered upon object interactions.
Dynamic Position Updates
The script smoothly updates the grabbed object's position and rotation to align with the player's hand, using interpolation for smooth transitions.
Collision-based Interactions
On entering the trigger area, the script evaluates the interactability of nearby objects and determines whether they can be grabbed.
Destroys specific objects, such as "EvilBubble," upon contact, triggering appropriate sound effects.
项目反思
设计层面
Bloomiverse 的核心构想,是让玩家在一个视觉上引人入胜的虚拟世界中培育生命。设计上注重易用性与参与感,力求让新手与资深玩家都能顺畅上手。种植种子、培育植物、与生态系统互动等系统被设计得自然流畅,在创造性与游戏进程推进之间取得平衡。视听反馈是增强沉浸感的关键——植物成长过程中的动画、音效与粒子系统营造出成就感;挖土、种植、养护等任务之间的过渡被设计得直观顺畅,让玩家能够专注于创造性与策略性目标,不被多余的操作干扰打断。
开发层面
从技术角度看,Bloomiverse 采用了模块化、可扩展的系统架构,以支撑动态且富有响应性的玩法。ContactGrabber 是实现直观VR物体操作的核心组件,配合协程与基于物理的触发机制,保证了种植、生长等事件处理的流畅性。对粒子特效、动画、物理交互等资源密集型功能进行优化,是维持VR体验高帧率的关键。Unity 的灵活性也支持了迭代式开发,不断打磨玩法机制并实现新的交互功能——例如 BubbleSpawner 等环境细节的加入,进一步强化了"活的生态系统"这一体验感。
未来改进方向
项目已具备扎实的基础,但仍有可拓展、丰富玩家体验的空间。其中一项关键改进是将现有的"邪恶泡泡"机制替换为会啄食植物的鸟类,使其作为更具代入感、更生动的对抗性角色,让干扰玩家进程的行为显得更加"鲜活"。此外,计划在产出能量水晶的植物之外,拓展更多具有功能性的植物种类,例如可以攻击鸟类、或吸引鸟类作为诱饵的植物,为玩法增添策略深度——将重心从单纯的视觉成长,转向融入更多战术性决策,打造更丰富、更具成就感的种植体验。
Reflection on Bloomiverse
The creation of Bloomiverse was a journey that blended creative design with technical problem-solving to deliver an immersive VR experience centered on nature and growth.
Design Perspective
The core concept of Bloomiverse was to let players nurture life in a visually captivating virtual world. The focus was on accessibility and engagement, ensuring both new and experienced players could enjoy the game. Systems like planting seeds, growing plants, and interacting with the ecosystem were designed to flow naturally, offering a balance between creativity and progression.
Visual and audio feedback were pivotal in enhancing immersion. Growing plants included animations, sound effects, and particle systems, creating a sense of accomplishment. The gameplay was designed to be intuitive, with seamless transitions between tasks such as digging, planting, and nurturing. This ensured players could easily focus on their creative and strategic objectives without unnecessary distractions.
Development Perspective
From a technical standpoint, Bloomiverse utilized modular and scalable systems to enable dynamic and responsive gameplay. The ContactGrabber was a cornerstone for intuitive VR object manipulation, while coroutines and physics-based triggers ensured smooth event handling, such as planting seeds and growing plants. Optimizing resource-intensive features like particle effects, animations, and physics interactions was crucial to maintaining a high frame rate for an optimal VR experience.
Unity’s flexibility allowed for iterative development, refining gameplay mechanics and implementing interactive features. For example, environmental details, such as the BubbleSpawner, added dynamic world-building elements, further enhancing the feeling of a living ecosystem.
Future Improvements
While the game provides a solid foundation, there are areas we aim to expand to enrich the player experience. A key improvement is replacing the current EvilBubble mechanic with birds that eat plants. These birds will serve as more relatable and dynamic antagonists, making their role in disrupting the player’s progress feel more alive and engaging.
Additionally, we plan to expand the variety of plants beyond those that provide energy crystals. Functional plants, such as those that can attack the birds or attract them to act as decoys, will add strategic depth to the gameplay. This enhancement will shift the focus from purely visual growth to incorporating tactical decisions, creating a richer, more rewarding planting experience.