Yatran - is a typing tutor for children that allows improving typing words speed in a fun way.
The application is named after the popular sometime "Yatran" typewriter, which was manufactured at the Ukrainian "Drukmash" plant in the second half of the 20th century.
The application requires the user to type at a speed that more than 200 symbols per minute (40 words per minute) and allows 10% of mistakes to make. The difficulty of the gameplay could be configured by a level selection (a higher level means more variety of characters in the level).
To add a localization:
- Create a
*.properties
file with translated item names. Make sure the file has the next format name -Locale_ {language}_{COUNTRY}.properties
; - Put the file in the
src/main/resources/
folder; - Add a new variable in the
src/main/java/ua/com/yatran/enums/Language.java
file with the appropriate information. Note that theLocale
parameters should be the same with the{language}
and{COUNTRY}
values.
Note: It is super important to keep the current number of chars in the locale file (the key_list
variable) due to
hard-coded indexes in the current implementation of the KeyboardPanel
class!
To extend the existing game view by the different designs of the levels:
- Create a new class that extends the
AbstractGamePanel
class; - Override the
startGame()
andstopGame()
methods and implement a new game logic; - Put the class in the
src/main/java/ua/com/yatran/panels/games/
folder.
Note: It is also needed to implement a Factory
class to have some logic for choosing the existing designs for the
moment.
To build the application by yourself, you need to do the next steps:
Note: according to the JPackage documentation we can build the application for a platform ONLY under the target platform!
-
Install and add to the PATH Java (JDK version 14+);
-
Install packaging tools according to the target operating system:
- RPM, DEB on Linux: On Red Hat Linux, we need the rpm-build package, on Ubuntu Linux, we need the fakeroot package;
- PKG, DMG on macOS: Xcode command line tools are required when the
–mac-sign
option is used to request that the package be signed, and when the–icon
option is used to customize the DMG image; - EXE, MSI on Windows: On Windows, we need the third party tool WiX 3.0 or later
-
Download the project to the target machine;
-
Under the project folder, execute the next command in the console to create a JAR file:
mvn clean package
-
After the JAR file was created, execute the next command in the console to create an installation file (Windows OS example):
jpackage --input target/ --dest target/ --name Yatran --app-version 1.0.0 --description 'Typing tutor for children that allows improving typing words speed in a fun way' --icon src/main/resources/images/icon.ico --main-jar Yatran-1.0.0-jar-with-dependencies.jar --main-class ua.com.yatran.Yatran --type exe --win-dir-chooser --win-menu --win-per-user-install --win-shortcut
-
After the command is executed, you will be able to find the installation file in the
target
folder.
This is a Java (Swing)-based open source application under the GNU GPL v.3 license.