This is a documentation for Board Game Arena: play board games online !

ผลต่างระหว่างรุ่นของ "Studio file reference"

จาก Board Game Arena
ไปยังการนำทาง ไปยังการค้นหา
(Created page with " This is a quick reference for the files used to implement a game. For more information, edit the file and read the introductory comment. === 'img' directory === This direct...")
 
 
(ไม่แสดง 13 รุ่นระหว่างกลางโดยผู้ใช้ 4 คน)
บรรทัดที่ 1: บรรทัดที่ 1:


This is a quick reference for the files used to implement a game. For more information, edit the file and read the introductory comment.
This is a quick reference for the files used to implement a game. For more information, follow the wiki links.


=== 'img' directory ===
=== img/ ===


This directory contains the images for your game:
This directory contains the images for your game (the game art).
* game_box.png is displayed on the main site on the game description page and when creating a table (280x280 px)
 
* game_icon.png is the icon displayed in the lists of games and tables (50x50 px)
See [[Game art: img directory]]
* publisher.png is the logo of the publisher of the game, displayed on the game description page (width: 150 px)
 
* and other images that you need. You should use [http://www.w3schools.com/css/css_image_sprites.asp CSS sprites] for better web performance.
=== gameinfos.inc.php ===
 
In this file you describe the meta-information for your game: game name, publisher name, number of player, game categories, etc...
 
See [[Game_meta-information:_gameinfos.inc.php]].


=== dbmodel.sql ===
=== dbmodel.sql ===


File for creating specific database tables that you will need to persist data during the game (for example a table for cards).
File for creating specific database tables that you will need to persist data during the game (for example a table for cards).
See [[Game database model: dbmodel.sql]]


=== gameoptions.inc.php ===
=== gameoptions.inc.php ===


File for describing your game options (= game variants)
File for describing your game options (or game variants).
 
See [[Game options and preferences: gameoptions.inc.php]].


=== <gamename>.action.php ===
=== <gamename>.action.php ===


File used to describe methods that can be called from the client interface through javascript, get parameters and call the appropriate game functions.
File used to describe methods that can be called from the client interface through javascript, get parameters and call the appropriate game functions.
See [[Players actions: yourgamename.action.php]].


=== <gamename>.css ===
=== <gamename>.css ===


CSS styles specific to your game.
CSS styles specific to your game.
See [[Game interface stylesheet: yourgamename.css]].


=== <gamename>.game.php ===
=== <gamename>.game.php ===


This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify changes to the client interface.
This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify changes to the client interface.
 
See [[Main game logic: yourgamename.game.php]].


=== <gamename>.js ===
=== <gamename>.js ===
บรรทัดที่ 35: บรรทัดที่ 49:
* which actions on the page will generate calls to the server
* which actions on the page will generate calls to the server
* what happens when you get a notification for change from the server and how it will show in the browser.
* what happens when you get a notification for change from the server and how it will show in the browser.
See [[Game interface logic: yourgamename.js]].


=== <gamename>.view.php and <gamename>_<gamename>.tpl ===
=== <gamename>.view.php and <gamename>_<gamename>.tpl ===


Files used to set up the page layout ('view') for the game.
Files used to set up the page layout ('view') for the game.
See [[Game layout: view and template: yourgamename.view.php and yourgamename yourgamename.tpl]].


=== material.inc.php ===
=== material.inc.php ===


File used to describe all the game material (cards with their description, dices, tokens...). You can also use it to define game constants.
File used to describe all the game material (cards with their description, dices, tokens...). You can also use it to define game constants.
See [[Game material description: material.inc.php]].


=== states.inc.php ===
=== states.inc.php ===


This file describes the states your game will iterate over, and the transitions to get from one state to another.
This file describes the game states machine of your game (all the game states properties, and the transitions to get from one state to another).
 
See [[Your game state machine: states.inc.php]].


=== stats.inc.php ===
=== stats.inc.php ===


File used to list statistics that you want to update during the game to be presented to players at the end of the game.
File used to list statistics that you want to update during the game to be presented to players at the end of the game.
See [[Game statistics: stats.inc.php]].
=== version.php ===
Don't edit this file. It is used internally by the build system.
=== modules/ ===
Modules directory can contain additional php files which can be included in main game.php via include or require. This directory is checked in version control.
=== misc/ ===
Directory containing files you would like to keep with project but not needed on production server. This directory is checked in version control. Total limit is 1 Mb for this directory.
=== <other files> ===
You can use other files but they won't be checked in source control and published in production. That includes any additional .js or .php files. If you need them use modules/ directory.

รุ่นแก้ไขปัจจุบันเมื่อ 14:45, 6 มกราคม 2561

This is a quick reference for the files used to implement a game. For more information, follow the wiki links.

img/

This directory contains the images for your game (the game art).

See Game art: img directory

gameinfos.inc.php

In this file you describe the meta-information for your game: game name, publisher name, number of player, game categories, etc...

See Game_meta-information:_gameinfos.inc.php.

dbmodel.sql

File for creating specific database tables that you will need to persist data during the game (for example a table for cards).

See Game database model: dbmodel.sql

gameoptions.inc.php

File for describing your game options (or game variants).

See Game options and preferences: gameoptions.inc.php.

<gamename>.action.php

File used to describe methods that can be called from the client interface through javascript, get parameters and call the appropriate game functions.

See Players actions: yourgamename.action.php.

<gamename>.css

CSS styles specific to your game.

See Game interface stylesheet: yourgamename.css.

<gamename>.game.php

This is the main file for your game logic. Here you initialize the game, persist data, implement the rules and notify changes to the client interface.

See Main game logic: yourgamename.game.php.

<gamename>.js

This is the main file for your game interface. Here you will define:

  • which actions on the page will generate calls to the server
  • what happens when you get a notification for change from the server and how it will show in the browser.

See Game interface logic: yourgamename.js.

<gamename>.view.php and <gamename>_<gamename>.tpl

Files used to set up the page layout ('view') for the game.

See Game layout: view and template: yourgamename.view.php and yourgamename yourgamename.tpl.

material.inc.php

File used to describe all the game material (cards with their description, dices, tokens...). You can also use it to define game constants.

See Game material description: material.inc.php.

states.inc.php

This file describes the game states machine of your game (all the game states properties, and the transitions to get from one state to another).

See Your game state machine: states.inc.php.

stats.inc.php

File used to list statistics that you want to update during the game to be presented to players at the end of the game.

See Game statistics: stats.inc.php.

version.php

Don't edit this file. It is used internally by the build system.


modules/

Modules directory can contain additional php files which can be included in main game.php via include or require. This directory is checked in version control.

misc/

Directory containing files you would like to keep with project but not needed on production server. This directory is checked in version control. Total limit is 1 Mb for this directory.

<other files>

You can use other files but they won't be checked in source control and published in production. That includes any additional .js or .php files. If you need them use modules/ directory.