Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ae5afd8
Hir Challenges Kickstart
DannyIsYog Oct 2, 2025
6283160
Account Switcher
DannyIsYog Oct 8, 2025
4028455
Set up for Hiro
DapperDino Oct 9, 2025
b16842d
Modified Account Switcher to work with Hiro
DapperDino Oct 14, 2025
e874cae
Fix player name assignment
DapperDino Oct 14, 2025
a004711
isParticipant now checks if player is in the event participant list a…
DannyIsYog Oct 14, 2025
2f39ead
Changes List to Search on Public Challenges
DannyIsYog Oct 15, 2025
6dc821c
Separate Nakama and Nakama+Hiro Server Folder
DannyIsYog Oct 15, 2025
01fddd6
Update coordinator to use live server credentials
DapperDino Oct 16, 2025
71902db
Added support for multiple IDs and added error messages
DannyIsYog Oct 16, 2025
e36a3f6
Added Dropdown to select challenge template
DannyIsYog Oct 17, 2025
6af2eac
Initialize UI on account switch to fix weird behaviour
DannyIsYog Oct 17, 2025
79b207f
Fix auth token refresh and start code refactor
DapperDino Oct 17, 2025
e1328ee
Merge branch 'fs/hiroChallenges' of https://github.com/heroiclabs/sam…
DapperDino Oct 17, 2025
b05d03f
Rank 0 now shows as "-" instead of "#0"
DannyIsYog Oct 18, 2025
17d42a6
Expose more fields for creating a challenge
DannyIsYog Oct 19, 2025
f340195
Added new challenges to the server
DannyIsYog Oct 20, 2025
3f9853f
Added local option in unity editor
DannyIsYog Oct 20, 2025
5ca1045
Duration and Delay slider now update based on selected template
DannyIsYog Oct 20, 2025
8adb5df
UI fixes
DannyIsYog Oct 20, 2025
f575886
Challenge Description is gotten from additional properties
DannyIsYog Oct 20, 2025
25527b2
Further UI improvements and minor code refactoring
DapperDino Oct 20, 2025
37d30c6
Display subscore
DannyIsYog Oct 20, 2025
88f2f95
Minor UX improvements + use live server
DapperDino Oct 21, 2025
63bd2c2
Add wallet display and economy system
DapperDino Oct 21, 2025
c531f3a
removed category field from UI
DannyIsYog Oct 21, 2025
77ee2e7
Clamp the MaxParticipants and MaxScoreSubmissions fields to valid ones
DannyIsYog Oct 21, 2025
f9d7094
Added invite function
DannyIsYog Oct 22, 2025
9323532
Added UI
DannyIsYog Oct 22, 2025
5700de6
Start code tidy and commenting
DapperDino Oct 22, 2025
4f24d1f
Merge branch 'fs/hiroChallenges' of https://github.com/heroiclabs/sam…
DapperDino Oct 22, 2025
0928271
Switch to use live server and change create modal default value
DapperDino Oct 22, 2025
a09ba0d
Only show invite button for challenge owner
DapperDino Oct 23, 2025
033b45a
Fix font issue
DapperDino Oct 23, 2025
7a7ebff
Add comments and a refresh button
DapperDino Oct 24, 2025
449a6fc
Fix logout logic
DapperDino Oct 24, 2025
3eeb4cc
Merge branch 'main' into fs/hiroChallenges
trandromeda Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added Nakama+Hiro/.cookie
Binary file not shown.
1 change: 1 addition & 0 deletions Nakama+Hiro/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local.yml
8 changes: 8 additions & 0 deletions Nakama+Hiro/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Nakama+Hiro/.idea/Nakama.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Nakama+Hiro/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Nakama+Hiro/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Nakama+Hiro/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Nakama+Hiro/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ARG NAKAMA_VERSION=3.32.0

FROM docker.io/heroiclabs/nakama-pluginbuilder:${NAKAMA_VERSION} AS builder

ENV GO111MODULE=on
ENV CGO_ENABLED=1

WORKDIR /backend
COPY . .

RUN go build --trimpath --buildmode=plugin -o ./backend.so

FROM docker.io/heroiclabs/nakama:${NAKAMA_VERSION}

COPY --from=builder /backend/backend.so /nakama/data/modules
COPY --from=builder /backend/local.yml /nakama/data/
COPY --from=builder /backend/definitions/dev1/*.json /nakama/data/modules/definitions/dev1/
COPY --from=builder /backend/lib/*.bin /nakama/data/modules/lib/
203 changes: 203 additions & 0 deletions Nakama+Hiro/definitions/dev1/base-challenges.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"challenges": {
"speed_runner": {
"reward_tiers": [
{
"rank_min": 1,
"rank_max": 3,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 300
},
"gems": {
"min": 15
}
}
}
}
},
{
"rank_min": 4,
"rank_max": 10,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 150
},
"gems": {
"min": 8
}
}
}
}
}
],
"additional_properties": {
"display_name": "Speed Runner",
"description": "Score the most points by collecting crystals!",
"category": "arcade",
"difficulty": "expert",
"dungeon_id": "crystal_caverns"
},
"max_num_score": 3,
"start_delay_max_sec": 60,
"ascending": false,
"operator": "best",
"duration": {
"min_sec": 1800,
"max_sec": 3600
},
"players": {
"min": 2,
"max": 100
}
},
"team_conquest": {
"reward_tiers": [
{
"rank_min": 1,
"rank_max": 1,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 500
},
"gems": {
"min": 25
}
}
}
}
},
{
"rank_min": 2,
"rank_max": 5,
"reward": {
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 250
},
"gems": {
"min": 12
}
}
}
}
}
},
{
"rank_min": 6,
"rank_max": 20,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 100
},
"gems": {
"min": 5
}
}
}
}
}
],
"additional_properties": {
"display_name": "Team Conquest",
"description": "Capture and hold the most strategic points with your team!",
"category": "team_pvp",
"difficulty": "hard",
"map_id": "fortress_battleground"
},
"max_num_score": 10,
"start_delay_max_sec": 120,
"ascending": false,
"operator": "best",
"duration": {
"min_sec": 3600,
"max_sec": 7200
},
"players": {
"min": 4,
"max": 50
}
},
"survival_gauntlet": {
"reward_tiers": [
{
"rank_min": 1,
"rank_max": 5,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 400
},
"gems": {
"min": 20
}
}
}
}
},
{
"rank_min": 6,
"rank_max": 15,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 200
},
"gems": {
"min": 10
}
}
}
}
},
{
"rank_min": 16,
"rank_max": 50,
"reward": {
"guaranteed": {
"currencies": {
"coins": {
"min": 75
},
"gems": {
"min": 3
}
}
}
}
}
],
"additional_properties": {
"display_name": "Survival Gauntlet",
"description": "Survive endless waves of enemies for as long as possible!",
"category": "survival",
"difficulty": "medium",
"arena_id": "shadow_arena"
},
"max_num_score": 3,
"start_delay_max_sec": 30,
"ascending": false,
"operator": "best",
"duration": {
"min_sec": 900,
"max_sec": 1800
},
"players": {
"min": 2,
"max": 200
}
}
}
}
8 changes: 8 additions & 0 deletions Nakama+Hiro/definitions/dev1/base-economy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"initialize_user": {
"currencies": {
"coins": 999,
"gems": 50
}
}
}
2 changes: 2 additions & 0 deletions Nakama+Hiro/definitions/dev1/base-system.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
51 changes: 51 additions & 0 deletions Nakama+Hiro/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
services:
postgres:
container_name: game_backend_postgres
environment:
- POSTGRES_DB=nakama
- POSTGRES_PASSWORD=localdb
expose:
- "8080"
- "5432"
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres", "-d", "nakama" ]
interval: 3s
timeout: 3s
retries: 5
image: postgres:12.2-alpine
ports:
- "5432:5432"
- "8080:8080"
volumes:
- data:/var/lib/postgresql/data
nakama:
build: .
container_name: game_backend_nakama
depends_on:
postgres:
condition: service_healthy
entrypoint:
- "/bin/sh"
- "-ecx"
- >
/nakama/nakama migrate up --database.address postgres:localdb@postgres:5432/nakama &&
exec /nakama/nakama --config /nakama/data/local.yml --database.address postgres:localdb@postgres:5432/nakama
expose:
- "7349"
- "7350"
- "7351"
healthcheck:
test: ["CMD", "/nakama/nakama", "healthcheck"]
interval: 10s
timeout: 5s
retries: 5
links:
- "postgres:db"
ports:
- "7349:7349"
- "7350:7350"
- "7351:7351"
restart: unless-stopped

volumes:
data:
10 changes: 10 additions & 0 deletions Nakama+Hiro/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module heroiclabs/sample-templates

go 1.25.0

require (
github.com/heroiclabs/hiro v1.28.0
github.com/heroiclabs/nakama-common v1.42.0
)

require google.golang.org/protobuf v1.36.8 // indirect
10 changes: 10 additions & 0 deletions Nakama+Hiro/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/heroiclabs/hiro v1.28.0 h1:XJaxyjlcsCLquaJ/ebGW5LCJp9Dn63xb88i3Pw+zcXQ=
github.com/heroiclabs/hiro v1.28.0/go.mod h1:giDDMxUbOYzeblbmwj4U8jXOvuYhQTj0OQlUzC+PLuA=
github.com/heroiclabs/nakama-common v1.42.0 h1:Y+WbJ35YuYfTRBxNcnSYk8EjuG5ZIF2aPaOmkBGPzpI=
github.com/heroiclabs/nakama-common v1.42.0/go.mod h1:E4yiMQmn8KHQ77WqBLVUfazdiPnwFYWqUrfGOrqOXk8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc=
google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
2 changes: 2 additions & 0 deletions Nakama+Hiro/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Loading