User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
usermanual:running [2006-10-28 13:40]
Carsten created (from UserManual.tex)
usermanual:running [2013-01-07 12:07] (current)
Line 1: Line 1:
-====== Running ​Ca3DE ======+====== Running ​Cafu ======
  
-In order to start Ca3DE, simply double-click on the ''​Ca3DE.exe''​ executable file. +In order to start Cafu, simply double-click on the ''​Cafu.exe''​ executable file. 
-This file is in the ''​Ca3D-Engine''​ folder that was created during installation.+This file is in the ''​Cafu-x.y''​ folder that was created during installation.
  
  
-===== The Options Dialog ​=====+===== The Main Menu =====
  
-// (The Options Dialog is not yet implemented on Linux. +{{ :​usermanual:​mainmenu.jpg?320}}
-Ca3DE will skip it and apply the default options. +
-You can select other worlds either from the command line, or via the in-game console (see section [[#​The_Command_Console|Command Console]]).) //+
  
-{{ :​usermanual:​optionsdialog.png|The Ca3D-Engine Options Dialog}} +After starting, the //Main Menu// appears as shown in the figure. 
-After starting, the //Options Dialog// appears as shown in the figure. +From here you can configure Cafu's graphic, audio and control options, start new games, join multiplayer games and even host your own multiplayer server. //To start playing immediately just click// <color #​0040B3>​New Game</​color>//​select a map to play and click// <color #​0040B3>​Go!</​color>​ //to play this map on your local machine.// 
-This dialog allows ​you to set up Ca3DE in various ways (detailed below). +For hosting multiplayer games or joining them please read the following sections
-//For your convenienceI preconfigured the dialog settings so that you can, almost always, +<​clear>​ 
-leave them as they are and simply press the ''​OK''​ button.// +==== New Game ==== 
-For a more sophisticated setup, ​please read the rest of this section+{{ :​usermanual:​newgame.jpg?320}}
-It explains the dialog details in greater depth.+
  
-==== Run-Mode ==== +This dialog ​allows ​you to quickly start a new game
-The upper part of the dialog ​asks you to choose which role Ca3DE should play in the network (i.e. your LAN or the Internet)+You can choose ​map from the list on the left side of the screenIf available ​preview screenshot of the map is shown on the right side. 
-I call this role the Ca3DE //​run-mode//​. There are three choices: +To start the game you just have to click on <color #​0040B3>​Go!</​color>​ and the the engine will automatically host local game server ​with the chosen map and connect ​you as a client to it. 
-  * [Client only] Ca3DE acts as Ca3DE-client only. This means that it will connect to a Ca3DE-server,​ reachable ​from within ​the accessible network: usually a LAN or the Internet. +<​clear>​ 
-  * [Server only] Ca3DE acts as a dedicated server only. Other players can run Ca3DE on their computers in "​Client only" run-mode and connect to this server. This is the preferred method ​of setting up an Internet server for Ca3DE. +==== Join Online Game ==== 
-  * [Both Client and Server] This is the dialog'​s default choice, where Ca3DE starts up both server and a client which communicate via the systems //​localhost//​. This run-mode ​is used both for single-player games and for typical multi-player LAN games, where one doesn'​t want to operate an extra computer as the dedicated serverThe current release of Ca3DE actually doesn'​t differentiate between these two cases. Consequently,​ when you start a single-player ​gameyou are actually starting ​multi-player ​game with only one participating person. That game is hosted on your machine, ​and if your network is configured properly, other players can join you in the gameIn this mode, some of the other dialog fields are overridden and therefore grayed-out.+{{ :​usermanual:​joingame.jpg?320}}
  
-==== Client Options ==== +This dialog ​lets you join multiplayer game using the given parameters: 
-This part lets you configure Ca3DE in its role as Ca3DE-client. +  * <color #0040B3>Player name</​color> ​Your player name. Other players see this name when you talk to them. 
-Depending on your choice of run-mode, not all fields will be available here. +  * <color #​0040B3>​Model</​color>​ Your appearance in the game worldClicking on this control cycles through all available ​player ​models (the currently chosen ​model is shown in the preview windows to the right) 
-  * [Player nameYour player name. Other players see this name when you talk to them. +  * <color #0040B3>Remote ​Host Name</​color> ​The name or the IP of the server that you wish to connect to. 
-  * [Configure] This button does not work yetLater, one will be able to configure, load and save player ​profiles here. +  * <color #0040B3>Remote ​Port</​color> ​The port number at which the server is listening on the remote host. 
-  * [Model name] The name of your model. This defines what you look like for others ​in multi-player games. +Clicking <color #​0040B3>​Connect</​color>​ will attempt to connect you to the chosen ​server and the game will start if connecting was successful. 
-  * [Client port number] The local network port number that this client will use for network communication. +<​clear>​ 
-  * [Remote ​hostname or IP] The name or the IP of the server that you wish to connect to. +==== Host Game Server ==== 
-  * [Remote ​port number] ​The port number at which the server is listening on the remote host. +{{ :​usermanual:​hostgame.jpg?​320}} 
-  * [Get Server Info] Retrieves information from the server: such as current world, number of connected players ​and so onNot yet implemented+This dialog lets you start and configure a multiplayer server
-  * [Ping Server] Pings the server. ​Mostly for development purposes, but also interesting as long as there are no other (or automaticping indicators+  * <color #​0040B3>​Map Name</​color>​ The map hosted on the server. ​Clicking on this box cycles through all available maps (a preview of the currently chosen map is shown on the right). 
-  * [Send NOP] Sends a "​NOP"​ packet ​to the server ​(essentially instructing it to do nothing)For development purposes+  * <color #​0040B3>​Local Server Port</​color>​ The port number at which your server will listening for incoming connections.  
-  * [Other options] Currently unused.+  * <color #​0040B3>​Play on this machine</​color>​ This box lets you choose whether you want to play on the server ​yourself or just start a stand alone server. 
 + 
 +The following two options are only relevant if you have chosen <color #​0040B3>​Yes</​color>​ in <color #​0040B3>​Play on this machine</​color>​
 +  * <color #​0040B3>​Player Name</​color>​ Your player name. Other players see this name when you talk to them. 
 +  * <color #​0040B3>​Model</​color>​ Your appearance in the game world. Clicking on this control cycles through all available player models (the currently chosen model is shown in the preview windows to the right). 
 + 
 +Clicking <color #​0040B3>​Go!</​color>​ will start the game server and optionally connect you to it.
  
-==== Server Options ==== 
-This part lets you configure Ca3DE in its role as a Ca3DE-server. 
-Depending on your choice of run-mode, not all fields will be available here. 
-  * [Server port number] The local network port number at which the server is reachable when it is running. 
-  * [World name] As several interesting worlds are included with each demo release, this is usually the most important field when trying out Ca3DE: The combo-box lists all included worlds and lets you easily choose which one you wish to enter. 
-  * [Other options] Currently unused. 
  
  
Line 73: Line 70:
 ^                     ​^ ​                 ^               ^ ^                     ​^ ​                 ^               ^
 | Talk / Chat         | ''​T'' ​           |               | | Talk / Chat         | ''​T'' ​           |               |
-| Toggle Console ​     | ''​^'' ​           |               |+| Toggle Console ​     | ''​F1'' ​          ​|               |
 | Screen-shot ​        | ''​F5'' ​          ​| ​              | | Screen-shot ​        | ''​F5'' ​          ​| ​              |
 | Quit program ​       | ''​ESC'' ​         |               | | Quit program ​       | ''​ESC'' ​         |               |
Line 82: Line 79:
 ===== The Command Console ===== ===== The Command Console =====
  
-In order to activate or deactivate the console, press the accent grave key. +In order to activate or deactivate the in-game ​console, press the ''​F1'' ​key.
-This key is labeled ​''​^'' ​on German keyboard layouts.+
  
-When the console is active, all keyboard input goes to the console ​command line and the mouse input is ignored+The large upper area of the window shows the console ​output of any component or subsystem of Cafu
-That means that you cannot control ​the player while the console ​is active+The "​Close"​ button in the lower right corner closes the console window again, bringing ​you back to the game. Other options to close the console ​window include pressing the ''​F1''​ or ''​ESC''​ key
-The US keyboard layout applies independently from other settings in the operating system.+The "​Clear"​ button clears ​the contents of the console output window.
  
-There are several defined ​console commands and variables, ​but I will only give two examples ​here+The text input field in the lower left is used for entering ​console commands
-<​code>​ +Note that the ''​TAB''​ key command-completion feature is available to facilitate text entry. 
-    help+The up and down arrow keys navigate through the command history for repeating previously entered commands. 
 + 
 +Technically,​ the console interpreter is actually an instance of a [[http://​www.lua.org/​|Lua]] program in interactive mode. The Cafu engine binds its console ​variables ​and functions to that program so that they can be accessed like any other native Lua value. You may want to refer to the [[http://​www.lua.org/​docs.html|Lua documentation]] to learn more about the language Lua and its possibilities. The fact that you can write entire Lua programs at the Cafu in-game console provides great customizability and flexibility for both game developers and users. 
 + 
 +Nonethelessthe Cafu console can also be used without any prior Lua knowledge, or any programming knowledge at all. 
 +Here are some getting-started ​examples ​that demonstrate the basic usage: 
 + 
 +Entering the command 
 +<​code ​lua
 +    help()
 </​code>​ </​code>​
-prints out a short console ​help text, which should be sufficient if you really want to try out the other commands +prints out a short help text with instructions on how to obtain more help and the list of all available ​commands. Note that ''​help()''​ is actually a function call and therefore the brackets are mandatory. 
-(such as changing the video mode or render style). + 
-<​code>​ +<​code ​lua
-    ​rc passwd ca3d +    ​list()
-    rc cl <​filename>​+
 </​code>​ </​code>​
-''​rc''​ is the short form for "​remote console"​.+lists all available Cafu console functions, console variables, and global Lua values. As such, the ''​list()''​ function is useful to look-up the available commands. Note that the ''​TAB''​ key for command-completion serves a similar purpose, but the ''​list()''​ function provides more information about the values and the output is formatted. 
 + 
 +<code lua> 
 +    help("​quit"​) 
 +    list("​cl"​) 
 +</​code>​ 
 +The ''​help("​quit"​)''​ function call provides help specific for the ''​quit''​ console variable, including a description of its purpose. This works analogously with any other console command, too. 
 +The ''​list("​cl"​)''​ call works like the normal ''​list()'',​ but restricts the output to values that begin with the string ''"​cl"''​. 
 + 
 +<code lua> 
 +    screenSuffix="​png"​ 
 +</​code>​ 
 +sets the value of the console variable ''​screenSuffix''​ to ''​png''​. Use this when you want to save your screenshots in ''​png''​ image file format instead of the default ''​jpg''​. Enter ''​help("​screenSuffix"​)''​ for more information about the ''​screenSuffix''​ console variable. 
 + 
 +<code lua> 
 +    rcon("​changeLevel('​filename'​)"​) 
 +</​code>​ 
 +''​rcon''​ is the abbreviation ​for "​remote console"​.
 It means that the rest of the line is not processed by the local client, but rather sent to the remote server console. It means that the rest of the line is not processed by the local client, but rather sent to the remote server console.
-''​cl''​ is the short form for "​change level"​. +Therefore, ​this line instructs ​the server to initiate a level (world) change. 
-Therefore, ​the first line introduces you as the super-user at the server+ 
-The second line instructs it to initiate a level (world) change. +Pressing ​the ''​F1''​ key deactivates the console ​and brings you back to the game. 
-For quick tests, however, it is much easier to leave the game with the ''​ESC''​ key and + 
-then to choose a new world from the world list in the options dialog.+ 
 +==== The config.lua File ====
  
-Pressing ​the ''​^'' ​key deactivates ​the console and brings ​you back to the game.+When ''​Cafu.exe''​ starts up, it automatically processes ​the ''​config.lua'' ​file. 
 +The ''​config.lua''​ file is located in the Cafu base directory. 
 +It is run in the context of the in-game ​console and can therefore contain any statement that you could also enter interactively as described above. 
 +Because the ''​config.lua''​ file is processed early during engine initialization,​ it is the ideal place to 
 +set default values and to keep any console statements that you find yourself entering over and over again. 
 +You can also define new functions or convenient abbreviations,​ and in fact, a complete, full-featured Lua program can be written into this file, either by the user, the game developer, or both. 
 +Just have a look into the ''​config.lua''​ file in the Cafu base directory to see some examples.
  
usermanual/running.1162035644.txt.gz · Last modified: 2013-01-07 12:07 (external edit)