Difference between revisions of "Language/Multiple-languages/Culture/How-to-Customise-Open–Source-Language-Games"
Line 4: | Line 4: | ||
Some games support multiplayer online, but if you are new to programming, you don't need to consider that. | Some games support multiplayer online, but if you are new to programming, you don't need to consider that. | ||
[https://www.letsreact.org/how-to-run-and-build-a-react-app/ Tips about opening JavaScript programs]. Input 'cmd' in ‘Run’ to start the command line on Windows. | |||
In progress. | In progress. | ||
Line 9: | Line 11: | ||
== Hangman == | == Hangman == | ||
=== https://github.com/neverendingqs/hangman-reactjs === | === https://github.com/neverendingqs/hangman-reactjs === | ||
<big>'''change the word list'''</big> | <big>'''change the word list'''</big> | ||
Line 25: | Line 26: | ||
== Scrabble == | == Scrabble == | ||
=== https://github.com/edlerd/scrabble === | === https://github.com/edlerd/scrabble === | ||
<big>'''change the word list'''</big> | <big>'''change the word list'''</big> | ||
* /dict/ | * /dict/ | ||
Line 72: | Line 71: | ||
== Spelling Bee == | == Spelling Bee == | ||
=== https://github.com/rsuth/bumblewords === | === https://github.com/rsuth/bumblewords === | ||
<big>'''change the word list'''</big> | <big>'''change the word list'''</big> | ||
* /dictionary.txt | * /dictionary.txt | ||
Change the list | Change the list |
Revision as of 18:13, 8 May 2022
This is an introduction to the customisation of open-source language games for non-programmers. Use 'search in page' to find the lines quickly.
In the description, 'fit' means finding and duplicating the corresponding code and modify it to fit your new language according to the pattern.
Some games support multiplayer online, but if you are new to programming, you don't need to consider that.
Tips about opening JavaScript programs. Input 'cmd' in ‘Run’ to start the command line on Windows.
In progress.
Hangman
https://github.com/neverendingqs/hangman-reactjs
change the word list
- /src/lib/randomWords.js
- Change
var wordList
- Change
change the keyboard
- /src/components/Keyboard.js
- Change
const letters
- Change
change the number of guesses
- /src/reducers/maxGuesses.js
- Change
state = 10
- Change
Scrabble
https://github.com/edlerd/scrabble
change the word list
- /dict/
Change the lists
change the letter frequency and value
-
- /config/english.jsonp
- /config/german.jsonp
- /multiplayer/game/config/english.jsonp
- /multiplayer/game/config/german.jsonp
Change the frequency by repeatance of letter in
LETTER_STASH
Change the value by changing values in
POINTS_PER_LETTER
add a language in singleplayer
- /config/
- Add a language with word list
- /index.html
- Fit
<div class="language_selector">
- Fit
- /game.js
- Fit
const LANG_ENGLISH = 'english';
- Fit
const ENGLISH_CONFIG_URL = 'config/english.jsonp';
- Fit
function getConfigUrl()
- Fit
add a language in singleplayer and multiplayer
- /config/
- Add a language with word list
- /index.html
- Fit
<div class="language_selector">
- Fit
-
- /game.js
- /multiplayer/game/game.js
- Fit
const LANG_ENGLISH = 'english';
- Fit
const ENGLISH_CONFIG_URL = 'config/english.jsonp';
- Fit
function getConfigUrl()
- /multiplayer/config.php
- Fit
'language/English.php'
- Fit
- /multiplayer/0_register.php
- Fit
const LANGUAGE_ENGLISH = 'english';
- Find
player->language = in_array;
, add the language in[ LANGUAGE_ENGLISH, LANGUAGE_GERMAN ]
- Fit
- /multiplayer/1_matchmaker.php
- Find
$game->stashLetters
, replace the line with$game->stashLetters = array_values(switch($player->language){"english":English::LETTER_STASH; break;"german":German::LETTER_STASH; break;}
- Fit the line
- Find
Spelling Bee
https://github.com/rsuth/bumblewords
change the word list
- /dictionary.txt
Change the list