AVGPlus is a cross-platform engine that aims to AVG/ADV, Galgame, Audiobooks, etc. It provides a way to quickly build games for Windows, Linux, and macOS, completely in JavaScript. You will get many simple APIs to build a power game that had a better performance from the engine.
For now, the engine project's accomplishments are not bad, but it's still at an early stage of development, and it's not recommended for any new formal game due to the scripting system bring many new features each day and changing quickly.
The GUI tool AVGPlus Creator has been released! If you just want to focus on game develoment, it does not have to build avg.renderer
, for further questions and download the tool please visit https://avg-engine.com .
Get renderer source and run the following command in avg.renderer
folder:
git clone https://github.com/avg-plus/avg.renderer
cd avg.renderer
yarn
During you can launch the game, you should set up a project before. The assets folder provides Scripts, Graphics, Audio resources for your game.
- Create a directory to your local disk, eg:
D:\GameProjects\hello-avg
. - Create a JSON file:
D:\GameProjects\hello-avg\game.json
, and write the basic game config:
{
"screen": {
"width": 1280,
"height": 720,
"fullscreen": false
},
"game": {
"text_speed": 80,
"auto_play": false,
"sound": {
"bgm": 100,
"bgs": 100,
"se": 100,
"voice": 100
}
}
}
The above config is the default config for your game, your could change the configuration fields if you want.
- Create folders on the project root:
audio
,graphics
,scripts
. - Create
start.avs
insidescripts
and put the story script as follows:
text.show("Hello my first AVG ...");
- To see more story script API, please visit documentation http://docs.avg-engine.com
Finally, your structure should be:
D:\GameProjects\hello-avg
├── audio
├── fonts
├── graphics
├── scripts
├── start.avs
└── game.json
Open engine.json
file you can see:
{
"game_assets_root": "http://127.0.0.1:2335",
"engine_bundle_root": "data"
}
This file is used for config & pointing to your game project root.
game_assets_root
: The root folder of the game project can be assigned a URL or a path relative to local.
engine_bundle_root
: The data root of the engine package. (recommended to keep the default)
- To deploy your game to the user on the browser, you should provide a URL that points to your HTTP server.
- To deploy your game to desktop over PC, you should provide a URL that points to your local folder.
Example config for browser:
{
"game_assets_root": "http://your-game-domain.com/example-game",
"engine_bundle_root": "data"
}
Example config for PC (You can also use a relative path):
{
"game_assets_root": "D:\\GameProjects\\hello-avg",
"engine_bundle_root": "data"
}
Open a terminal session to run the following command in avg.renderer
:
yarn dev
This command is used for building engine bundles and keep the development in watching mode, you could open dist
directory to see the outputs.
Open another terminal session to launch the game window:
yarn game
If your game assets folder is addressable, you can see a game window launched and your story script will present to you.
- Text & Characters
- Input Handle & Variables
- Backgrounds
- Image Widgets & Text Widgets (Subtitle)
- Sounds (BGM, BGS, SE, Voice)
- Game Flow Control & Clock Handle
- Scripting
- Advanced Animations
- Plugins & Rendering Extensions
- Archive
- Camera Effects & Particle Effects
- WebGL Support
- Save & Load
- UI Designer
- Packaging Tools
electron
&node-sass
install failed or takes a long time
Due to electron-prebuilt
and node-sass
deploy on Github, it causing a problem of downloading. Especially in China, it will take a long time when you run yarn
. To resolve the problem, you could use the following solution:
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/" yarn add electron -D
SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ yarn add node-sass -D
This changes the downloading mirror to Taobao
in China.
But it should be noted this solution is different from changing the registry of yarn
.