Starting Kolonex: Multi-alliance system, 3D admin viewer, and more
This devlog covers the work done in the last few weeks, mainly focused on the new multi-alliance system. Also advanced on mobile interface, resource/balance panel, and cost balance.
Multi-Alliance System
The alliance system was completely rewritten to allow a player to belong to up to 5 alliances simultaneously. This involved:
- New
AllianceMemberandAllianceInviteLinkschemas with unique indexes and fixeddefault:null. - REST routes: list, detail, create, leave, invite by email/hash, join with limit of 5, donate with historical contribution, change nickname (3-24 chars), kick with double authorization (leader initiates, 2nd member confirms).
- Invite hash: generate, renew, delete, with TTL of 24h/3d/7d.
- Socket joins all alliance rooms of the player (multi-alliance).
- Refactor of
areAlliedand 'alliance' achievement to useAllianceMemberinstead ofPlayer.allianceId. - Pure rule tests (limit, nickname, TTL, double approval).
- i18n keys for 4 locales.
This was a large change and required several fixes, like route ordering (GET /alliance/invites before /:id) and a one-shot migration script.
RESOURCE-BALANCE Panel
In the constructor, the resource and balance panel was revamped with tabs for constructions and vehicles, and clickable ranking.
Mobile Interface
Local SVG icons were incorporated in the drawer and sections panel to improve mobile experience.
Cost Balance
Defined the hierarchy and cost/effort balance (F0-F5 complete) to lay the economic foundation of the game.
NPC Administration
Added simulated player administration, with 3D viewer and management.
Minor Fixes
Fixed the catalog (live dump -> seed excluding full_stick) and updated .gitignore.
Reflection
This was a big sprint, especially the alliance system, which required a lot of planning and review. The 3D admin viewer greatly simplifies debugging. Now it's time to polish and continue with gameplay.