|
1 | | -# Guidelines |
2 | | - |
3 | | -When creating your game, we suggest you follow these guidelines in order to improve both its performance and players experience. |
4 | | - |
5 | | -## Technical Guidelines |
6 | | - |
7 | | -- The game should be noob friendly. Can make a workable AI with a bunch of ifs. |
8 | | -- If it is a game with limited output options per turn, send those options in the protocol (e.g. the first player of chess has 20 possible actions). |
9 | | -- Viewer should be enough to understand most of the rules. |
10 | | -- Gameplay based around rounds/turns. Only perform checks (collision, presence, etc.) at the end of a turn. |
11 | | -- End player’s program when it outputs an unrecognised command. Continue player’s program when it outputs a recognised but invalid command and add error message to summary. |
12 | | -- Stop game early if players aren’t doing anything or are otherwise stalemated. |
13 | | -- Stop game early if the ranking is decided whatever the players may do. |
14 | | -- Always minify png and jpg assets. |
15 | | -- The Referee must not crash, make sure all possible exceptions are caught, especially during the parsing of a Player’s actions, where most errors occur. |
16 | | -- Minimum font size: 36px. |
17 | | - |
18 | | -## Soft Limits |
19 | | - |
20 | | -The following limits will make your game run faster, but they are not strict limitations. |
21 | | - |
22 | | -- Statement length: less than 6k characters |
23 | | -- Total entity creations: less than 200. |
24 | | -- Max total time alloted to the players: 25s. |
25 | | - |
26 | | -## Protocol: |
27 | | - |
28 | | -The following lines will help most players to get into your game. Try to simplify things when possible. |
29 | | - |
30 | | -- Two loops max for input. |
31 | | -- Variables to read per loop: less than 10. |
32 | | -- Stub generator must not exceed: 45 lines of Java. |
33 | | -- If the player is given an ID, it is always 0. |
34 | | - |
35 | | -## Graphics: |
36 | | - |
37 | | -- Privilege the use of Sprites over Shapes (Rectangle, Circle, etc.) |
38 | | -- Use less than 2Mb total for assets. |
39 | | - |
40 | | -## Games with leagues |
41 | | - |
42 | | -- Stubs should, if possible, be the same for every league. |
43 | | -- If a game needs at least 1 data structure to make an AI that doesn’t crash, it needs an easier league. |
44 | | - |
45 | | -## Rules |
46 | | - |
47 | | -When contributing on CodinGame, you must accept and apply these rules: |
48 | | - |
49 | | -- Your game must not contain any kind of inappropriate content. |
50 | | -- Write a stub generator. The documentation can be found in the [CodinGame SDK repository](https://github.com/CodinGame/codingame-game-engine/blob/master/stubGeneratorSyntax.md). Any non-explicit variable must be explained with a comment. |
| 1 | +Guidelines and best practices for coding games can be found in the documentation ["Contributing to CodinGame"](https://www.codingame.com/playgrounds/40701/contribute---help/coding-games#guidelines) |
0 commit comments