Show
Ignore:
Timestamp:
04/13/10 17:06:34 (2 years ago)
Author:
Carsten
Message:

a) Changed the format of pts pointfiles to Lua. That is, pointfiles are now true, complete Lua programs:

  • CaBSP has been updated to write pointfiles in the new format as Lua programs,
  • CaWE has been updated to run pointfiles as Lua programs and to look into the generated Points table for the results.

b) Added a new recordPath() console function to the Cafu game client that allows recording the path of the player.

(This functionality has been asked for by Dennis Köhler from the FH Dortmund for running a new set of scientific tests.)
The recored paths are saved in the same pointfile format as those for leaks, and thus can uniformly be loaded into CaWE for visualization!

c) CaWE: Fixed occurrences of wxMessageBox(..., wxOK | wxICON_...) being called without the wxOK constant.

Some open issues for future consideration:
- Allow record-style initialization besides the existing list-style initialization.
- Support setting a custom line color in the pointfile.
- In CaWE, visualize not only the point coordinates, but also the time, heading, comments, ...

Example future pointfile:

Points=
{

-- color="blue", -- Any string that the wxColour() ctor recognizes.

-- Use record-style or list-style initialization.
{ 0; -1695, -498.692, -67.9358; 9874; "" },
{ 5.26625; -1697.05, -482.187, -67.9358; 64250; "" },
{ 5.77412; -1711.62, -364.583, -67.9358; 64250; "" },
{ t=6.30243; x=-1726.45, y=-243.117, z=-67.9358; hdg=64310; comment="" },
{ t=6.80414; -1740.28, -125.456, -43.9358; hdg=64640; "" }, -- mixed...

}

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/Ca3DE/Client/ClientStateInGame.hpp

    r36 r48  
    3838struct CaMouseEventT; 
    3939class  ClientT; 
     40class  PathRecorderT; 
    4041 
    4142 
     
    6061    static int ConFunc_chatPrint_Callback(lua_State* LuaState); 
    6162    static int ConFunc_showPath_Callback(lua_State* LuaState); 
     63    static int ConFunc_recordPath_Callback(lua_State* LuaState); 
    6264 
    6365 
     
    7274 
    7375 
    74     ClientT&                 Client; 
     76    ClientT&               Client; 
    7577 
    76     GameProtocol1T           GameProtocol; 
    77     ArrayT< ArrayT<char> >   ReliableDatas; 
    78     NetDataT                 UnreliableData; 
     78    GameProtocol1T         GameProtocol; 
     79    ArrayT< ArrayT<char> > ReliableDatas; 
     80    NetDataT               UnreliableData; 
    7981 
    80     FontT                    Font_v; 
    81     FontT                    Font_f; 
    82     CaClientWorldT*          World; 
    83     bool                     IsLoadingWorld;    ///< True while the world is loaded, false at all other times. This is relevant only because cf::GuiSys::GuiMan->Yield() is called while loading, which in turn calls our Render() method. 
    84     bool                     WasLMBOnceUp;      ///< The left mouse button must be in the released (non-pressed, up) state after the world has been loaded. This variable is false until this has been the case! 
     82    FontT                  Font_v; 
     83    FontT                  Font_f; 
     84    CaClientWorldT*        World; 
     85    bool                   IsLoadingWorld;      ///< True while the world is loaded, false at all other times. This is relevant only because cf::GuiSys::GuiMan->Yield() is called while loading, which in turn calls our Render() method. 
     86    bool                   WasLMBOnceUp;        ///< The left mouse button must be in the released (non-pressed, up) state after the world has been loaded. This variable is false until this has been the case! 
    8587 
    86     ScrollInfoT              ChatScrollInfo; 
    87     ScrollInfoT              SystemScrollInfo; 
    88     GraphsT                  Graphs; 
    89     unsigned long            ClientFrameNr; 
    90     PlayerCommandT           PlayerCommand;     ///< The player command structure that collects the input until the next call to MainLoop(). 
     88    ScrollInfoT            ChatScrollInfo; 
     89    ScrollInfoT            SystemScrollInfo; 
     90    GraphsT                Graphs; 
     91    unsigned long          ClientFrameNr; 
     92    PlayerCommandT         PlayerCommand;       ///< The player command structure that collects the input until the next call to MainLoop(). 
     93    PathRecorderT*         m_PathRecorder;      ///< Records the path of this client in a pointfile that can be loaded into CaWE. 
    9194}; 
    9295