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...")
 
편집 요약 없음
 
(사용자 2명의 중간 판 4개는 보이지 않습니다)
4번째 줄: 4번째 줄:
=== 'img' directory ===
=== 'img' directory ===


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)
=== gameinfos.inc.php ===
* 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.
In this file you describe the meta-information for your game: game name, publisher name, number of player, game categories, etc...


=== dbmodel.sql ===
=== dbmodel.sql ===
46번째 줄: 46번째 줄:
=== 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).


=== 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.

2013년 9월 30일 (월) 17:29 기준 최신판

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 directory contains the images for your game (the game art).

gameinfos.inc.php

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

dbmodel.sql

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

gameoptions.inc.php

File for describing your game options (= game variants)

<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.

<gamename>.css

CSS styles specific to your game.

<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.

<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.

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

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

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.

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).

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.