kbengine mmo源碼(完整服務端源碼+資源+完整用戶端源碼),kbenginemmo
本項目作為kbengine服務端引擎的用戶端示範而寫 更新kbengine外掛程式庫(https://github.com/kbengine/kbengine_unity3d_plugins): * 使用git命令列,進入到kbengine_unity3d_warring目錄執行: git submodule update --init * 或者使用 TortoiseGit(選擇菜單): TortoiseGit -> Submodule Update: * 也可以手動更新kbengine外掛程式 git clone https://github.com/kbengine/kbengine_unity3d_plugins.git 外掛程式源碼請放置在: Assets/plugins/kbengine/kbengine_unity3d_plugins建立AssetBundles unity3d(菜單上)->Publish->Build Pulish AssetBundles - autoAll 期間可能一直出現"Moving file failed", 需要點擊"try again"讓其繼續, 這可能是unity3d在移動檔案時檔案被佔用造成的。 執行完畢後檢查 Assets->StreamingAssets是否有內容。產生服務端尋路資料: 先將Assets\Plugins\cai-nmgen-rcn(generate navmesh).zip解壓放目前的目錄下並重啟unity3d編輯器, 然後執行如下步驟: unity3d資源總管中選中(非菜單): Assets->Nav_build->xinshoucun->NavmeshBuild->Build & Bake, 等待產生完成之後 unity3d資源總管中選中(非菜單): Assets->Nav_build->xinshoucun->CAIBakedNavmesh->Save, 將其中srv_xxx.navmesh放到服務端kbengine\demo\res\spaces\xinshoucun中 (注意: 產生完畢後建議刪除cai-nmgen-rcn(generate navmesh).zip解壓出來的檔案,會造成無法匯出遊戲的錯誤,原因未知。)配置登入IP地址(如果服務端在本機則無需改變): kbengine_unity3d_warring\Assets\Plugins\kbengine\clientapp.cs -> ip測試是否可運行: 先開啟服務端,unity3d中選擇Assets\scenes\go情境然後點擊編輯器運行按鈕,如果無意外應該可以登入遊戲進入到情境中了。匯出WebPlayer項目:unity3d File->Build Settings->Scenes In Build選擇scenes/go.unity->Platform選擇Web Player->Build。 在瀏覽器運行遊戲:Web伺服器部署檔案夾結構: ->(伺服器根目錄) - StreamingAssets (建立AssetBundles產生的檔案夾) - ui (Assets下的ui檔案夾可以直接拷貝過來) - crossdomain.xml - initLogo.png - initProgressBar.PNG - initProgressFrame.PNG - index.html - Unity3d.unity3d (在unity3d編譯時間產生的檔案) - Unity3d.html (在unity3d編譯時間產生的檔案)1. 啟動kbengine服務端http://www.kbengine.org/docs/installation.html2. 瀏覽器訪問localhost如不清楚請下載編譯打包好的demo,並按照其中的檔案夾結構放置並看壓縮包內文檔教程如何啟動:https://sourceforge.net/projects/kbengine/files/日誌:Windows XP: C:\Documents and Settings\username\Local Settings\Temp\UnityWebPlayer\logWindows Vista/7: C:\Users\username\AppData\Local\Temp\UnityWebPlayer\log <ignore_js_op><ignore_js_op> <ignore_js_op> <ignore_js_op> <ignore_js_op> <ignore_js_op> <ignore_js_op>
|
源碼下載:http://code.662p.com/view/8231.html
詳細說明:http://ios.662p.com/thread-2070-1-1.html