Skip to content

Commit def0db8

Browse files
committed
Add emulator architecture and update decomp status
1 parent 216c769 commit def0db8

File tree

3 files changed

+241
-68
lines changed

3 files changed

+241
-68
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
Emulator (Server) architecture
2+
========================================
3+
4+
The emulator reimplements the following web servers:
5+
6+
* Gumi API Server (used for login and the main background)
7+
* Brave Frontier Game Server (which acts as the main server for the game)
8+
* CDN Asset Server (where the game downloads the assets from the server)
9+
10+
The emulator uses SQLite as a local database to store and access userdata.
11+
12+
The root directory contains the following projects:
13+
14+
* deploy
15+
* game_frontend
16+
* gimuserver
17+
* standalone_frontend
18+
19+
deploy
20+
-----------
21+
22+
This directory contains all the configuration and assets of the game server.
23+
24+
A configuration can be, for example, the current gacha banners that should be
25+
showed in the game.
26+
27+
The configuration is stored in JSON format.
28+
29+
config.json
30+
^^^^^^^^^^^^^^
31+
32+
This file contains the configuration of the web framework `Drogon <https://github.com/drogonframework/drogon>`_
33+
that is used for the emulator.
34+
35+
More information about this file can be found in `Drogon's wiki <https://github.com/drogonframework/drogon/wiki/ENG-11-Configuration-File>`_
36+
37+
38+
gimuconfig.json
39+
^^^^^^^^^^^^^^^^^^
40+
41+
This file contains the general configuration of the server, here an user can modify
42+
the server wallpaper, specific logging and provide a custom asset directory.
43+
44+
An example JSON looks like this::
45+
46+
{
47+
"system":
48+
{
49+
"content_root": "./game_content",
50+
"gme_sqlite_path": "./gme.sqlite",
51+
"session_timeout" : 1200,
52+
"mst_root": "./system"
53+
},
54+
"server":
55+
{
56+
"wallpaper_banner" : "/wallpaper/title_logo20160401.jpg",
57+
"game_version": 21900,
58+
"notice_url": "http://ios21900.bfww.gumi.sg/pages/versioninfo"
59+
},
60+
"log":
61+
{
62+
"enable": true,
63+
"request_path": "log_req",
64+
"response_path": "log_res",
65+
"dlc_error_file": "dlc_404.txt"
66+
}
67+
}
68+
69+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
70+
| Field name | Type | Description |
71+
+==================+=============+=======================================================================================================================================================================================+
72+
| content_root | String | Directory where the game assets are found |
73+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
74+
| gme_sqlite_path | String | Path to store the local SQLite database |
75+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
76+
| session_timeout | Integer | If the client does not perform any network activity after this timeout (in milliseconds) the server would consider the client to have crashed and logout the user from the server |
77+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
78+
| mst_root | String | Directory where the server MST configuration is contained |
79+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
80+
| wallpaper_banner | String | Path (inside the game_content directory) which controls which image to show during Brave Frontier login screen |
81+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
82+
| game_version | Integer | Version of the client, this number has to match with what the client expects or it might ask the user to update the game |
83+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
84+
| notice_url | String | URL to show in the Terms and Usage page during the game login screen |
85+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
86+
| log::enable | Boolean | Enables or disables logging of request/responses |
87+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
88+
| request_path | String | Directory to store the request logs |
89+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
90+
| response_path | String | Directory to store the response logs |
91+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
92+
| dlc_error_file | String | Path to store the log of any missing asset file |
93+
+------------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
94+
95+
system
96+
^^^^^^^^^^
97+
98+
The system directory contains all the game configuration that is sent to the game client,
99+
the are essentially MSTs that are transated in human form.
100+
101+
game_frontend
102+
------------------
103+
104+
This project produces a shared library that will can be used to embed the offline mod server into the game.
105+
106+
On Android, this library is loaded during startup by using a modified version of the Android Java code.
107+
108+
On Windows, this library is loaded during startup by the `Offline proxy <https://github.com/decompfrontier/offline-proxy>`_ module.
109+
110+
standalone_frontend
111+
----------------------
112+
113+
As debugging the server while being embedded inside the game client can be an hard task, the purpose of this
114+
project is to generate a standalone executable that starts the `gimuserver` library for simplify the development
115+
of the server.
116+
117+
gimuserver
118+
-------------
119+
120+
This project contains the actual server source emulator built as a static library ready to be linked by extenal projects.

source/pages/Architecture/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ you would find how several things were designed in this page.
1313

1414
General-architecture
1515
Offlinemod-architecture
16+
Emulator-architecture

0 commit comments

Comments
 (0)