Advanced Multiplayer Game Template 教學Advanced Multiplayer Game Template 是一套支援 Unity 的多人連線遊戲開發模版,快速製作類似 GTA5 的遊戲。
Master Server / Game Server / Sub Server System提供穩定與強大的主伺服器、遊戲伺服器和子伺服器系統,允許您的玩家創建自己的子伺服器,子伺服器創建後將顯示在您其他玩家的伺服器清單中,並且可以輕鬆加入。
玩家資料儲存系統配備了安全且強大的保存系統,可儲存玩家帳戶數據、統計數據和一般數據,例如擁有金錢、物品、金驗值、放置的構建物品,安全加密在主伺服器上,並且無需使用 MySQL 資料庫伺服器。
玩家註冊與登入系統包括強大且安全的註冊和登入系統,允許玩家建立帳戶並登入遊戲,主伺服器會自動將玩家的所有資料儲存到玩家的帳戶。
Vehicles 載具包括完整的多人車輛系統與重要的強大元件,車輛系統包含以下功能:
背包系統與物品Various item types are available in the template, including weapons, ammunition, consumables, outfits and companion items. Items can be easily added thanks to the powerful scriptable item system included in the template. The powerful inventory system allows your players to easily select, move, split, drop and equip items after collecting, earning or purchasing them in the item shop. 提供了各種物品類型,包括武器、彈藥、消耗品、服裝和配套物品。由於模板中包含強大的可編寫腳本的專案系統,可以輕鬆新增專案。強大的庫存系統允許玩家在物品商店收集、賺取或購買物品後輕鬆選擇、移動、分割、掉落和裝備物品。
Weapons and AmmunitionWeapons can be equipped by your players, and used with the required ammunition. Each weapon contains adjustable variables, such as damage value, acquisition value, sale value, required ammunition, firing sound, weapon type, firing rate, model, inventory icon and rarity. In the template are weapons types, such as pistols, rifles and rocket launchers. Weapons can cause damage to other players and vehicles, especially explosive weapons, like the rocket launcher, because the projectiles have an individual explosion radius on impact. 武器可以由你的玩家裝備,並使用所需的彈藥。每個武器都包含可調整的變量,例如傷害值、獲取值、銷售值、所需彈藥、射擊聲音、武器類型、射速、型號、庫存圖示和稀有度。模板中包含武器類型,例如手槍、步槍和火箭發射器。武器可能會對其他玩家和車輛造成傷害,尤其是火箭發射器等爆炸性武器,因為彈體在撞擊時具有單獨的爆炸半徑。
Outfits / Skins模板中包含服裝與皮膚系統,玩家可在商店購買服裝、物品,以便更改遊戲角色的外觀。
Companions / Pets裝備同伴或寵物後,就會出現並在玩家身邊,跟隨玩家行動。
Consumables消耗品可用於增加玩家的數值,例如 HP、EXP 經驗值等。
NPC此模板帶有智慧 NPC 系統,允許 NPC 進入汽車、偷竊和駕駛汽車。並允許 NPC 對玩家做出反應,例如當玩家拔出槍或瞄準 NPC 時,可以造成武器和車輛的傷害或受到攻擊。
商店包含完整的物品商店系統,可讓您的玩家購買物品,物品可以輕鬆上架到商店。
Build System 與 Plot/Property SystemThe template comes with a powerful build and plot/property system that allows your players to own their own plot/property and build on it. The build system allows players to purchase, sell, place and edit build items. Build items can be easily added thanks to the scriptable build item system. 配備了強大的構建和情節/財產系統,允許您的玩家擁有自己的情節/財產並在此基礎上進行構建。建造系統允許玩家購買、出售、放置和編輯建造項目。借助可編寫腳本的建置項系統,可以輕鬆新增建置項。
Player Health and NutritionEach of your players has a health and nutrition bar, which can be increased by consumable items. If your players take damage, either from a strong collision with a vehicle or a projectile from a weapon, the health value will decrease. If one of your players has taken too much damage, so that his health value has decreased to zero, he will die and as a result a ui will appear, which contains a timer that tells the player when he will respawn. After respawning, his health value will be fully filled. 每個玩家都有一個 HP 和營養欄,可以透過消耗品來增加。如果你的玩家受到傷害,無論是與車輛的強烈碰撞還是武器的彈體,生命值都會降低。如果你的一個玩家受到了太多傷害,以至於他的生命值下降到零,他就會死亡,結果會出現一個使用者介面,其中包含一個計時器,告訴玩家他何時重生。重生後,他的生命值將被完全填滿。
Player Experience 玩家體驗The template contains a whole experience/level system that allows your players to gain experience points and level up. Each level has higher experience point requirements, the higher the level the more experience points are needed to reach that level. The template also allows you to unlock certain items for your players after they reach a certain level. 包含一個完整的經驗/等級系統,可讓您的玩家獲得經驗值並升級。每個等級都有較高的經驗值要求,等級越高,達到該等級所需的經驗值越多。該模板還允許您在玩家達到一定級別後為他們解鎖某些物品。
Emote Wheel 表情轉盤提供玩家可以透過 Emote Wheel 選擇顯示的表情,例如手勢、舞蹈等動作。
Chat 聊天線上玩家們可透過 Server Chat 伺服器聊天進行交流。
行動裝置相容性The template allows to move all included controllers and perform gameplay functions via UI elements to create an advanced multiplayer video game also for mobile devices. 允許移動所有包含的控制器並透過 UI 元素執行遊戲功能,以創建也適用於行動裝置的高級多人視訊遊戲。
Networking 網路連線使用排名第一的免費開源的 Mirror 遊戲網路解決方案,讓您創建強大且穩定的多人遊戲。
伺服器設定步驟首先介紹 Advanced Multiplayer Game Template 基本設定步驟,您需要安裝以下模組。
匯入 Advanced Multiplayer Game Template 資源包時將會出現以下警告訊息。
匯入資源包後請再匯入 Dedicated Game Server (DGS) Compatibility 資料夾內的資源包。 此資源包的內容是相關的腳本。 開啟 MainScene 場景。 此時 Console 視窗將會出現錯誤訊息,而且無法執行,需要建置伺服器。 執行 Advanced Multiplayer Template > Build > Windows (x64) > Master Server 若出現 Windows Defender 防火牆的安全性警訊,請選擇允許存取。 執行 Advanced Multiplayer Template > Build > Windows (x64) > Server 執行剛才建置完成的伺服器。 若出現 Windows Defender 防火牆的安全性警訊,請選擇允許存取。 1470~1471 進入遊戲。 背包系統,玩家裝備武器。
|