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/CaWE/GameConfig.cpp

    r36 r48  
    8181            wxMessageBox("Entity class definitions script could not be processed,\n"+ 
    8282                         wxString(lua_tostring(LuaState, -1))+".\n", 
    83                          "Error while initializing game configuration \""+Name+"\"", wxICON_ERROR); 
     83                         "Error while initializing game configuration \""+Name+"\"", wxOK | wxICON_ERROR); 
    8484 
    8585            lua_pop(LuaState, 1); 
     
    129129            { 
    130130                wxMessageBox("Non-string entity class name in EntityClassDefs table.\n", 
    131                     "Error while initializing game configuration \""+Name+"\"", wxICON_ERROR); 
     131                    "Error while initializing game configuration \""+Name+"\"", wxOK | wxICON_ERROR); 
    132132                throw InitErrorT(); 
    133133            } 
     
    220220    } 
    221221 
    222     // wxMessageBox(out, "Entity Classes Overview", wxICON_INFORMATION); 
     222    // wxMessageBox(out, "Entity Classes Overview", wxOK | wxICON_INFORMATION); 
    223223    wxLogDebug(out); 
    224224#endif