9 | | ==Strategy== |
10 | | Don't reinvent the wheel - try to copy and modify as much code from other gametypes as possible. |
11 | | #Know what kind of gametype you want to create. |
12 | | #Play existing gametypes and check which parts you want to adopt. |
13 | | #Search in the concerning source files for code you can adopt. |
14 | | #Start with the basic concept and add features later. (A Todo-List for the features would be nice.) |
| 9 | == Strategy == |
| 10 | Don't reinvent the wheel - try to copy and modify as much code from other gametypes as possible.[[BR]] |
| 11 | 1. Know what kind of gametype you want to create.[[BR]] |
| 12 | 2. Play existing gametypes and check which parts you want to adopt.[[BR]] |
| 13 | 3. Search in the concerning source files for code you can adopt.[[BR]] |
| 14 | 4. Start with the basic concept and add features later. (A Todo-List for the features would be nice.)[[BR]] |
16 | | ==Gametype-Level== |
17 | | *Level are stored in "../data/levels". You need a level to test your gametype. |
18 | | *For testing purposes just copy an existing Level and rename it. |
19 | | *Don't forget to set "gametype = YourGameType" in the <level> tag. |
20 | | *Put "create a level for my new gametype" on your todo list :-) Later you should try to create a level that is optimized for your new gametype. |
| 16 | == Gametype-Level == |
| 17 | * Level are stored in __../data/levels__. You need a level to test your gametype. |
| 18 | * For testing purposes just copy an existing level and rename it. |
| 19 | * Don't forget to set __gametype = YourGameType__ in the __<level>__ tag. |
| 20 | * Put "create a level for my new gametype" on your todo list :-) Later you should try to create a level that is optimized for your new gametype. |
22 | | ==Change the AI-behaviour== |
23 | | *The concerning file is in "../src/orxonox/controllers", called "ArtificialController.cc". |
24 | | *You can make the bots stop shooting at certain targets by adding some lines of code in the "bool ArtificialController::sameTeam"-function as displayed above. The function should return true, if a bot shouldn't attack a certain target. (Since the AI-player is in the same "team".) |
| 22 | == Change the AI-behaviour == |
| 23 | * The concerning file is in __../src/orxonox/controllers__, called "ArtificialController.cc". |
| 24 | * You can make the bots stop shooting at certain targets by adding some lines of code in the "bool ArtificialController::sameTeam"-function as displayed above. The function should return true, if a bot shouldn't attack a certain target. (Since the AI-player is in the same "team".) |
26 | | ==Miscellaneous== |
27 | | *Don't forget to add your gametype to the CMakeLists.txt or it won't compile. |
28 | | *Compiling with the terminal. Go to the folder of your orxonox branch. The command for compiling is |
29 | | {{{ |
30 | | cmake -j3} |
31 | | }}. |
32 | | *Don't forget to backup your code via svn. Open a terminal, go to your orxonox branch-folder and type |
33 | | {{{ |
34 | | svn ci -m "reason for commitment or summary of latest changes" |
35 | | }}} . |
36 | | *Gamecommands: to add 2 new bots enter "addbots 2", to remove one of them enter "killbots 1". To display the scoreboard hit "F2". |
| 26 | == Miscellaneous tips - Useful at the beginning == |
| 27 | * Don't forget to add your gametype to the CMakeLists.txt or it won't compile. |
| 28 | * Compiling with the terminal. Go to the folder of your orxonox branch. The command for compiling is __cmake -j3__. |
| 29 | * Don't forget to backup your code via svn. Open a terminal, go to your orxonox branch-folder and type __ svn ci -m "reason for commitment or summary of latest changes__ . |
| 30 | * Gamecommands: to add 2 new bots enter __addbots 2__, to remove one of them enter __killbots 1__. To display the scoreboard hit __F2__. |