이 마지막 단계에서는 프로젝트를 제작하는 데 사용된 모든 코드를 찾아볼 수 있습니다. 아래의 각 제목은 코드가 존재하는 프로젝트의 파일 이름입니다.
코드를 변경하여 미니게임에 더 많은 기능을 추가하는 방법을 알아내 보세요. 다음은 시작해 볼 만한 몇 가지 아이디어입니다.
캐릭터가 풀어 나갈 레벨을 더 추가합니다.
플레이어가 퍼즐을 푸는 데 걸린 시간이나 캐릭터가 레벨마다 이동한 횟수를 추적합니다.
아이템을 주워 보드에 배치하기 등 캐릭터에 대한 명령을 더 추가하여 한층 복잡한 퍼즐을 만듭니다.
submodules.verse
프로젝트 파일 submodules.verse는 Verse 코드에서 사용할 수 있도록 프로젝트 내 서브모듈 및 에셋의 액세스 레벨을 설정합니다. 자세한 내용은 5단계. UI로 NPC 제어하기 및 Verse에 에셋 노출하기를 확인하세요.
# This file sets the access levels for submodules in the project.
# Specifically, this file is making art assets accessible to the Verse files in the project
# so textures, meshes, and materials can be used in the UI and in the game.
# The submodule Textures.MiniGameUI below is the same as the folder
# Textures/MinigameUI that you can see in the project's Content Browser.
Textures := module:
MiniGameUI<public> := module{}
# The submodule VerseCommander below is the same as the folder
verse_starter_tags.verse
프로젝트 파일 verse_starter_tags.verse에는 Verse 커맨더 캐릭터 NPC 스크립트가 Verse 커맨더 미니게임 장치를 찾아 그 이벤트를 수신하는 데 사용할 수 있는 게임플레이 태그 verse_commander_minigame_tag에 대한 정의가 포함되어 있습니다. 자세한 내용은 1단계. NPC 비헤이비어 생성하기를 확인하세요.
# This file contains the Gameplay Tags for the project.
# You can use Gameplay Tags to tag an object in the island
# and be able to query all objects that have the tag during the game using Verse.
using { /Verse.org/Simulation/Tags }
# The verse_commander_minigame_tag is for the Verse Commander Character NPC script
# to be able to find the Verse Commander Minigame device and listen to its events.
verse_commander_minigame_tag := class(tag){}
commands.verse
서브모듈 VerseCommander 내 프로젝트 파일 commands.verse에는 NPC가 수신할 수 있는 모든 명령의 데이터 표현이 포함되어 있습니다. 자세한 내용은 4단계. 명령 데이터 표현하기를 확인하세요.
# This file contains the data representation of all the commands that the NPC can receive
# and utilities for the data to help with debugging and troubleshooting issues.
# Each type of command that the NPC can perform will be an instance of this class.
# The class has the unique specifier to make instances of the class comparable.
# The class has the computes specifier to be able to instantiate it at module-scope.
# The class has the abstract specifier so it cannot be instantiated directly, and
# requires subclasses to implement any non-initialized functions, like DebugString().
command := class<computes><unique><abstract>:
DebugString():string
gameboard.verse
서브모듈 VerseCommander의 프로젝트 파일 gameboard.verse에는 게임보드 데이터 및 비헤이비어가 포함되어 있습니다. 자세한 내용은 2단계. 게임용 보드 정의하기를 확인하세요.
# This file contains the gameboard structure and how it works.
# The gameboard knows where the NPC is supposed to start on the board
# how many obstacles / barriers there are to getting to the end goal,
# and what the end goal is and when it has been reached.
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Simulation }
using { /Verse.org/Simulation/Tags }
# An obstacle on the gameboard, with an associated set of
ui_manager.verse
서브모듈 VerseCommander의 프로젝트 파일 ui_manager.verse에는 UI의 외관을 만들고 수정하기 위한 코드가 포함되어 있습니다. 자세한 내용은 5단계. UI로 NPC 제어하기를 확인하세요.
# This file contains all the code to create and modify the UI
# in the Verse Commander minigame.
# The UI for the game contains:
# - Buttons that map to commands for the NPC: forward, turn left, turn right.
# - An execute button that tells the NPC to perform the queue of commands.
# - A remove button that removes the last command added.
# - A reset button that resets the current board and clears out the command queue.
# - A dynamic list of commands that grows wider when a player adds commands and shrinks when a player removes commands.
using { /Fortnite.com/Devices }
verse_commander_minigame.verse
서브모듈 VerseCommander의 프로젝트 파일 verse_commander_minigame.verse에는 미니게임을 관리하는 Verse 장치가 포함되어 있습니다. 자세한 내용은 6단계. 게임 루프 관리하기를 확인하세요.
# This device is in charge of managing the minigame.
# In its Details panel in the editor, you can:
# - Define how many gameboards there are
# - The order you play the gameboards
# - All the details of the gameboard such as their obstacles.
using { /Fortnite.com/Devices }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary }
using { /UnrealEngine.com/Temporary/Diagnostics }
verse_commander_character.verse
서브모듈 VerseCommander의 프로젝트 파일 verse_commander_character.verse에는 미니게임의 NPC용 로직이 포함되어 있습니다. 자세한 내용은 1단계. NPC 비헤이비어 생성하기를 확인하세요.
# This file handles the logic for the gameboard NPC. The NPC waits for commands from
# verse_commander_minigame, then executes movement based on those commands using navigation targets.
# It also tracks the NPC's position using a visual arrow that updates after each command.
using { /Fortnite.com/AI }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Assets }