|
|
Excel/OpenOffice as Gamedesign tool
#173693
12/19/07 00:15
12/19/07 00:15
|
Joined: Jan 2003
Posts: 4,305
Damocles
OP
Expert
|
OP
Expert
Joined: Jan 2003
Posts: 4,305
|
A very nice (and more professional) approach to manage your gamedesing is to use an external tool to create data for your project. To be more flexible than editing everything in long "define scripts", (some people even hardcoe that directly into the code) you can use a Table calculation Program such as Excel or Calc (Open Office) as gamedesign tool.
You can insert any kind of data, such as file-names of the models, properties of units (like HP in an RTS) and also all String-lines used in character dialogues.
Using Excel for example is much more flexible, and easyer to use than entering that data into an SQL Database. For a good workflow in larger Projects you should think about to link all your game-desing editings that are prone to many changes into such a table.
To get the information into 3dgs, you can export a table into the simle csv format. In this, alls entries are seperated by commas, or ";". This can be read into 3dgs, and inserted into your data-arrays, or string arrays.
Here and example c-script code, to load Strings and Variables from the file:
/*
Loader: read Database-Entry tokens from a ".cvs" type file (like csv export from OpenOffice) (does not operate with Excel without adaptation)
entries are seperated by comma, or linereturn Strings are indicated by quatationmarks
loader_openFile(filename) : opens file loader_readToken() : insert numeric values to loader_readVar; Strings to load_fileString loader_closeFile() : close the file after reading
loader_endOfFile-> if 1, file has no more content
loader_isString = 1 ; is 1 when a String (not var) was read as Token */
string load_fileString; var loader_readVar; var loader_filehandle; var loader_endOfFile; string loader_readString; string loader_partString; var loader_isString;
function loader_openFile(load_fileString){loader_filehandle=file_open_read(load_fileString);loader_endOfFile=0;} function loader_closeFile(){file_close(loader_filehandle);} function loader_readToken() { var loadCheck; var length; loader_isString=0; if(loader_endOfFile){loader_closeFile();return;} loadCheck=file_str_read(loader_filehandle,loader_readString); //read a token if(loadCheck==-1){loader_endOfFile=1;} //"-1" -> end of file reached if(loader_endOfFile){loader_closeFile();return;} //end of file already reached! length= str_len(loader_readString); //check if String or numeric entry: if(length>0) { str_cpy(loader_partString,loader_readString); //copy to temporyry String str_trunc(loader_partString,length-1); //only leave first char if(str_to_asc(loader_partString)==34) //is a quatotaion mark -> " = 34 ASCII { str_trunc(loader_readString,1); //remove end quatotaion str_clip(loader_readString,1); //remove beginning quatotaion loader_isString=1; //indicate that a String (not Var) was read } else //is a numeric entry { loader_readVar=str_to_num(loader_readString); //convert to a var (numeric entry) } } }
|
|
|
Re: Excel/OpenOffice as Gamedesign tool
[Re: Damocles]
#173701
12/19/07 17:01
12/19/07 17:01
|
Joined: Aug 2002
Posts: 681 Massachusetts, USA
Ichiro
User
|
User
Joined: Aug 2002
Posts: 681
Massachusetts, USA
|
For EoW (and others), we use Excel all the time. Typically, we'll have a Python script convert that data into something more directly C-Script readable (or even into C-Script, HTML, etc.). It's not a bad approach when used judiciously.
|
|
|
|