Pokewar
Pocket Monster Battleroyale
NTK - Battleroyale
- 5 players in 1 battle/round
- Record battle history
- Battle ranks & scores
- Monsters point based on battle (accumulate rank)
- Annulled player rank (in the end of battle)
Basic Entity Info
-
Monsters:
List of Available Monsters (Dex)
(id, origin_id, name/species, base_exp, height, weight, avatar, types, stats, skills, created_at, updated_at)
-
Battles:
Battles Arena with Random/Selected(?) Monster
(id, started_at, ended_at)
-
Players:
List of Played Monsters in 1 Battle
(id, battle_id, monster_id, eliminate_at, annulled_at, rank, point)
-
Logs:
List of Battles Log
(id, battle_id, description, created_at)
...
Entity (*)
erDiagram
MONSTERS {
id int
origin_id int
base_exp int
height int
weight int
avatar string
types text
stats text
skills text
created_at int
updated_at int
}
BATTLES {
id int
started_at int
ended_at int
}
PLAYERS {
id int
battle_id int
monster_id int
eliminated_at int
annulled_at int
rank int
point int
}
LOGS {
id int
battle_id int
description string
created_at int
}
BATTLES }|--|{ PLAYERS : m2m
BATTLES ||--|{ LOGS : o2m
MONSTERS }|--|{ PLAYERS : m2m
Sequence (*)
sequenceDiagram
participant DELIVERY
participant SERVICE
participant SQL_REPOSITORY
participant REST_REPOSITORY
par Data Flow
DELIVERY->>+SERVICE: ...args
and
SERVICE->>+REST_REPOSITORY: http call
and
SERVICE->>+SQL_REPOSITORY: sql query
end
REST_REPOSITORY-->>-SERVICE: data
Note over REST_REPOSITORY,SERVICE: raw data `transformed` from remote data source
SQL_REPOSITORY-->>-SERVICE: data
Note over SQL_REPOSITORY,SERVICE: raw data from local data source
SERVICE-->>-DELIVERY: data
Note over SERVICE,DELIVERY: formatted data
GTK
Required
Database Migration
Required tools:
How to use
more info read the docs.
Run
Local run:
make run
Build:
make build
Profiling:
go tool pprof -http=:8001 http://localhost:8000/debug/pprof/profile
Downloads