Pet / Companion Leveling
Implementation of pet / companion leveling that defines how players interact with this aspect of the game, including feedback and progression.
Overview
Pet / Companion Leveling represents a design pattern that defines how players interact with this aspect of the game world. Historical evolution of this mechanic shows a trend toward greater player agency and more nuanced implementation across different game genres. The key to successful implementation lies in clear communication of rules, fair outcomes, and satisfying feedback for player actions.
Game Examples
Rhythm Games
Rhythm Games use this mechanic where players optimize their build to establish dominance in PvP. Accessibility options allow different skill levels to participate, resulting in long-term engagement.
Survival Games
Survival Games use this mechanic where players adapt to changing conditions to min-max their character. Each decision has cascading consequences, resulting in strategic variety.
Hunting Games
Hunting Games use this mechanic where players plan their approach to progress through the content. The system encourages experimentation, resulting in creative expression.
Survival Horror Games
Survival Horror Games use this mechanic where players coordinate with teammates to express their creativity. The mechanic integrates seamlessly with other systems, resulting in exploration incentives.
Pros & Cons
Advantages
- Reduces monotony while maintaining challenge
- Creates natural competition between players
- Creates meaningful mechanical decisions for players
- Reduces frustration while maintaining challenge
- Creates meaningful economic decisions for players
Disadvantages
- Requires extensive stress testing to avoid edge cases
- Creates potential for exploits by experienced players
- Can feel confusing if progression is too slow
Implementation Patterns
Prestige System
A modular approach to pet / companion leveling that separates concerns and enables easy testing.
class PetCompanionLevelingEngine {
grade = 1;
progress = 0;
addXP(amount: number) {
this.progress += amount;
while (this.progress >= this.xpToNext()) {
this.progress -= this.xpToNext();
this.grade++;
this.onLevelUp();
}
}
xpToNext() {
return Math.floor(100 * Math.pow(1.15, this.grade - 1));
}
onLevelUp() {
// Grant rewards for level grade
this.strength += 5;
}
}Rating Calculator
Data-driven implementation that loads pet / companion leveling configuration from external definitions.
const abilityTree = {
nodes: [
{ id: "basic_strike", cost: 2, requires: [], effect: "+10% damage" },
{ id: "journeyman", cost: 5, requires: ["basic_strike"], effect: "+25% damage, unlock combo" },
{ id: "master_skill", cost: 3, requires: ["journeyman"], effect: "+50% damage, unlock ultimate" },
],
canUnlock(nodeId: string, points: number, unlocked: Set<string>) {
const node = this.nodes.find(n => n.id === nodeId);
if (!node || unlocked.has(nodeId)) return false;
return points >= node.cost
&& node.requires.every(r => unlocked.has(r));
}
};Prestige System
Core implementation pattern for handling pet / companion leveling logic with clean state management.
const progressionTree = {
nodes: [
{ id: "novice_skill", cost: 2, requires: [], effect: "+10% damage" },
{ id: "advanced", cost: 5, requires: ["novice_skill"], effect: "+25% damage, unlock combo" },
{ id: "expert", cost: 8, requires: ["advanced"], effect: "+50% damage, unlock ultimate" },
],
canUnlock(nodeId: string, points: number, unlocked: Set<string>) {
const node = this.nodes.find(n => n.id === nodeId);
if (!node || unlocked.has(nodeId)) return false;
return points >= node.cost
&& node.requires.every(r => unlocked.has(r));
}
};