+-------------------------+
|clean realtime data(new) |
game start | |
|load or create db |
new or load |load config |
|convert config to db |
| |
+----------+--------------+
|
|
+----------v--------------+ +------------------+
| create backgroud | | sa^e background |
+-------------------------> create player (camera) | | save player |
| | create building +------> save building |
| load or create board | create items | | save items |
| | create monster | | save monster |
| | create i/o point | | save i/o point |
| | | +------------------+
| +----------+--------------+
| |
| |
| +----------v--------------+
| +------------------> input active |
| | | input |
| | +----------+--------------+
| | |
| | +-----------v---------------+
| | | input close | +------------------------+
| | | +----------------------+ | | save player |
| | | |check player condition| | | monster if change save |
| | turn base | |player behaviour | +------> item if change save |
| | | | | | | |
| | | +----------------------+ | +------------------------+
| | | +-----------------------+ |
| | | |check monster condition| | +-------------------------+
| | | |monster behaviour | | | player upgrade |
| | | | | +------> active and save achieved|
| | | +-----------------------+ | | |
| | | | +-------------------------+
| | +-------+----+----------+---+
| | | | |
| | | | |
| +-------------------------+ | |
| | |
| +-----------v--------+ |
+-------------------------+ into i/o point | |
+--------------------+ |
|
+----------------------v---+
|game over or final stage |
| |
+-----------+--------------+
|
+-----------v--------------+
| clean runtime data |
| save achieved |
| |
| |
+--------------------------+