2011年4月25日 星期一

難道把Server畫出來是一種罪惡…

  做MMO Clinet部份也有七、八年了,但一直以來Server端程式都是黑箱作業(對重視所視即所得的我來說)。這一陣子剛好有機會可以處理這一塊的事務,於是便開啟了Renderable Server的想法。
  由於Server是極為重視效能的AP,似乎把其運算結果畫出來是一種浪費Performace的罪惡,
但Render相關資訊對除錯真的很有幫助。
  有沒有方法可以兩者兼得呢?我也不知道,不過我試著在兩者上尋求一些取得平衡的做法,在此跟有興趣的人分享:
  1. 將上層遊戲邏輯的處理架構抽象化,不直接參考到底層的成像處理函式庫,以便可以輕易地編譯出Renderable及UnRenderable的AP。
  2. 實作一個Back End Viewer的AP,接收Server上所有處理的結果。
Renderable Server Preview:
  • 藍及白色的線、及淡藍色的網格資料為NAV MESH資料(一種3D路徑搜尋的資料),也就是Server跑的是全3D的場景。
  • 紅、綠、藍的軸向物件為NPC,AI的移動處理是使用LUA Script。
  • AI有做3D路徑搜尋處理,也就是不會跑到沒有網格資料的地方(有些看起來好像有走進去,其實是透視問題,鏡頭拉近就知道沒走進去)。
  • 相關影片展示:
  • 較清的版本:http://www.youtube.com/watch?v=pafhaN2fyPs

6 則留言:

  1. a client for rendering with a super user account.
    1. the client just login to the server as normal.
    2. server may send more info to the client.
    3. also the client could test the server's loading.
    4. For saving the network I/O of the server, consider share-memory mechanism. (but need to be on the same computer/device)

    Alan.

    回覆刪除
  2. sorry, my english is a little weak.
    thanks, it's good idea.
    mabye can call this GM account.
    more client just use receive the same scene information architecture. if ther character need to receive other scene information, change other scene which can receive other scene data.
    i think, design a backend viewer to show sever status better than super acount.
    it can pass login process...

    回覆刪除
  3. Yes, backend viewer is nice idea.

    by the way, in my opinion.
    Server should not allow any client pass the verification step when connecting to it.

    Alan.

    回覆刪除
  4. By the way(Server should not allow any client pass the verification step when connecting to it), the backend viewer is lan connecting to game server, for more Security.

    thans for your comments.

    回覆刪除
  5. 呵弄個更複雜的NAVMESH來當DEMO吧,不要只是平面地板打幾個洞,可以試試雙層甚至三層的NAVMESH ;)

    回覆刪除
  6. 這當然沒問題囉!架構本來就有支援,請拭目以待xd.

    回覆刪除