diff --git a/doc/writing_games-en.txt b/doc/writing_games-en.txt index 67d4b3f..240e5e4 100644 --- a/doc/writing_games-en.txt +++ b/doc/writing_games-en.txt @@ -1240,6 +1240,20 @@ WARNING about using luac compiler: Do not use lua compiler luac, it produces platform-dependent code! But game compilation is useful to find errors in the game code. +==== Packing resources in .idf file (from version 1.4.0) ==== +You can pack all game's resources (graphics, sounds, theme) in one .idf file. Put all resources in 'data' directory and run: + +instead -idf + +The file data.idf will be created in the current directory. Put it in game's dir and remove resource files. + +You may pack whole game in .idf: + +instead -idf + +Game in .idf format can be run like any other game (as it was directory) or directly from command line: + +instead game.idf ==== Switching between players ==== You can create a game with several characters and switch between them from time to time (see “change_pl”). But you can also use the same trick to switch between different types of inventory. diff --git a/doc/writing_games.txt b/doc/writing_games.txt index 4d719fd..9053c22 100644 --- a/doc/writing_games.txt +++ b/doc/writing_games.txt @@ -1231,6 +1231,21 @@ doencfile("game"); Не используйте компиляцию игр с помощью luac, так как luac создает платформозависимый код! Однако, компиляция игр может быть использована для поиска ошибок в коде. +==== Запаковка ресурсов (начиная с версии 1.4.0) ==== +Вы можете упаковать ресурсы игры (графику, музыку, темы) в файл .idf, для этого поместите все ресурсы в каталог data и запустите INSTEAD: + +instead -idf <путь к data> + +При этом в текущем каталоге должен будет создастся файл data.idf. Поместите его в каталог с игрой. Теперь ресурсы игры в виде отдельных файлов можно удалить. + +Вы можете запаковать в формат .idf всю игру: + + +instead -idf <путь к игре> + +Игры в формате idf можно запускать как обычные игры instead (как если бы это были каталоги) а также из командной строки: + +instead game.idf ==== Переключение между игроками ==== Вы можете создать игру с несколькими персонажами и время от времени переключаться между ними (см. change_pl). Но вы можете также использовать этот трюк для того, что бы иметь возможность переключаться между разными типами инвентаря.