Skip to content

Commit be5121a

Browse files
DannyIsYogDapperDinotrandromeda
authored
Hiro Challenges Template (#14)
* Hir Challenges Kickstart Hiro Challenges Kickstart UI work * Account Switcher Account Switcher * Set up for Hiro * Modified Account Switcher to work with Hiro * Fix player name assignment * isParticipant now checks if player is in the event participant list and joined * Changes List to Search on Public Challenges * Separate Nakama and Nakama+Hiro Server Folder * Update coordinator to use live server credentials * Added support for multiple IDs and added error messages * Added Dropdown to select challenge template * Initialize UI on account switch to fix weird behaviour * Fix auth token refresh and start code refactor * Rank 0 now shows as "-" instead of "#0" * Expose more fields for creating a challenge * Added new challenges to the server * Added local option in unity editor * Duration and Delay slider now update based on selected template * UI fixes * Challenge Description is gotten from additional properties * Further UI improvements and minor code refactoring * Display subscore * Minor UX improvements + use live server * Add wallet display and economy system * removed category field from UI * Clamp the MaxParticipants and MaxScoreSubmissions fields to valid ones * Added invite function * Added UI * Start code tidy and commenting * Switch to use live server and change create modal default value * Only show invite button for challenge owner * Fix font issue * Add comments and a refresh button * Fix logout logic --------- Co-authored-by: Dapper Dino <nathan@heroiclabs.com> Co-authored-by: Andy Tran <andy@heroiclabs.com>
1 parent 07b3692 commit be5121a

File tree

2,165 files changed

+322978
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,165 files changed

+322978
-31
lines changed

Nakama+Hiro/.cookie

16 Bytes
Binary file not shown.

Nakama+Hiro/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
local.yml

Nakama+Hiro/.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Nakama+Hiro/.idea/Nakama.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Nakama+Hiro/.idea/encodings.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Nakama+Hiro/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Nakama+Hiro/.idea/vcs.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Nakama+Hiro/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ARG NAKAMA_VERSION=3.32.0
2+
3+
FROM docker.io/heroiclabs/nakama-pluginbuilder:${NAKAMA_VERSION} AS builder
4+
5+
ENV GO111MODULE=on
6+
ENV CGO_ENABLED=1
7+
8+
WORKDIR /backend
9+
COPY . .
10+
11+
RUN go build --trimpath --buildmode=plugin -o ./backend.so
12+
13+
FROM docker.io/heroiclabs/nakama:${NAKAMA_VERSION}
14+
15+
COPY --from=builder /backend/backend.so /nakama/data/modules
16+
COPY --from=builder /backend/local.yml /nakama/data/
17+
COPY --from=builder /backend/definitions/dev1/*.json /nakama/data/modules/definitions/dev1/
18+
COPY --from=builder /backend/lib/*.bin /nakama/data/modules/lib/
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
{
2+
"challenges": {
3+
"speed_runner": {
4+
"reward_tiers": [
5+
{
6+
"rank_min": 1,
7+
"rank_max": 3,
8+
"reward": {
9+
"guaranteed": {
10+
"currencies": {
11+
"coins": {
12+
"min": 300
13+
},
14+
"gems": {
15+
"min": 15
16+
}
17+
}
18+
}
19+
}
20+
},
21+
{
22+
"rank_min": 4,
23+
"rank_max": 10,
24+
"reward": {
25+
"guaranteed": {
26+
"currencies": {
27+
"coins": {
28+
"min": 150
29+
},
30+
"gems": {
31+
"min": 8
32+
}
33+
}
34+
}
35+
}
36+
}
37+
],
38+
"additional_properties": {
39+
"display_name": "Speed Runner",
40+
"description": "Score the most points by collecting crystals!",
41+
"category": "arcade",
42+
"difficulty": "expert",
43+
"dungeon_id": "crystal_caverns"
44+
},
45+
"max_num_score": 3,
46+
"start_delay_max_sec": 60,
47+
"ascending": false,
48+
"operator": "best",
49+
"duration": {
50+
"min_sec": 1800,
51+
"max_sec": 3600
52+
},
53+
"players": {
54+
"min": 2,
55+
"max": 100
56+
}
57+
},
58+
"team_conquest": {
59+
"reward_tiers": [
60+
{
61+
"rank_min": 1,
62+
"rank_max": 1,
63+
"reward": {
64+
"guaranteed": {
65+
"currencies": {
66+
"coins": {
67+
"min": 500
68+
},
69+
"gems": {
70+
"min": 25
71+
}
72+
}
73+
}
74+
}
75+
},
76+
{
77+
"rank_min": 2,
78+
"rank_max": 5,
79+
"reward": {
80+
"reward": {
81+
"guaranteed": {
82+
"currencies": {
83+
"coins": {
84+
"min": 250
85+
},
86+
"gems": {
87+
"min": 12
88+
}
89+
}
90+
}
91+
}
92+
}
93+
},
94+
{
95+
"rank_min": 6,
96+
"rank_max": 20,
97+
"reward": {
98+
"guaranteed": {
99+
"currencies": {
100+
"coins": {
101+
"min": 100
102+
},
103+
"gems": {
104+
"min": 5
105+
}
106+
}
107+
}
108+
}
109+
}
110+
],
111+
"additional_properties": {
112+
"display_name": "Team Conquest",
113+
"description": "Capture and hold the most strategic points with your team!",
114+
"category": "team_pvp",
115+
"difficulty": "hard",
116+
"map_id": "fortress_battleground"
117+
},
118+
"max_num_score": 10,
119+
"start_delay_max_sec": 120,
120+
"ascending": false,
121+
"operator": "best",
122+
"duration": {
123+
"min_sec": 3600,
124+
"max_sec": 7200
125+
},
126+
"players": {
127+
"min": 4,
128+
"max": 50
129+
}
130+
},
131+
"survival_gauntlet": {
132+
"reward_tiers": [
133+
{
134+
"rank_min": 1,
135+
"rank_max": 5,
136+
"reward": {
137+
"guaranteed": {
138+
"currencies": {
139+
"coins": {
140+
"min": 400
141+
},
142+
"gems": {
143+
"min": 20
144+
}
145+
}
146+
}
147+
}
148+
},
149+
{
150+
"rank_min": 6,
151+
"rank_max": 15,
152+
"reward": {
153+
"guaranteed": {
154+
"currencies": {
155+
"coins": {
156+
"min": 200
157+
},
158+
"gems": {
159+
"min": 10
160+
}
161+
}
162+
}
163+
}
164+
},
165+
{
166+
"rank_min": 16,
167+
"rank_max": 50,
168+
"reward": {
169+
"guaranteed": {
170+
"currencies": {
171+
"coins": {
172+
"min": 75
173+
},
174+
"gems": {
175+
"min": 3
176+
}
177+
}
178+
}
179+
}
180+
}
181+
],
182+
"additional_properties": {
183+
"display_name": "Survival Gauntlet",
184+
"description": "Survive endless waves of enemies for as long as possible!",
185+
"category": "survival",
186+
"difficulty": "medium",
187+
"arena_id": "shadow_arena"
188+
},
189+
"max_num_score": 3,
190+
"start_delay_max_sec": 30,
191+
"ascending": false,
192+
"operator": "best",
193+
"duration": {
194+
"min_sec": 900,
195+
"max_sec": 1800
196+
},
197+
"players": {
198+
"min": 2,
199+
"max": 200
200+
}
201+
}
202+
}
203+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"initialize_user": {
3+
"currencies": {
4+
"coins": 999,
5+
"gems": 50
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)