Queue Crafting
Core mechanic handling queue crafting, establishing the rules, constraints, and player interactions for this game system.
Overview
Queue Crafting represents a design pattern that balances complexity with accessibility to engage diverse audiences. The implementation varies significantly across genres, with each game adapting the core concept to fit its specific design goals and target audience. The ongoing evolution of this mechanic reflects the broader maturation of game design as a discipline.
Game Examples
Management Games
Management Games use this mechanic where players coordinate with teammates to explore every possibility. The system rewards both skill and knowledge, resulting in long-term engagement.
Fighting Games
Fighting Games use this mechanic where players learn through failure to explore every possibility. Player choice meaningfully affects outcomes, resulting in build diversity.
Dungeon Crawlers
Dungeon Crawlers use this mechanic where players invest in long-term growth to progress through the content. Resource scarcity drives interesting decisions, resulting in build diversity.
Pros & Cons
Advantages
- Easy to understand but difficult to master
- Balances social against economic effectively
- Provides long-term engagement for dedicated players
Disadvantages
- Can create exploitation if not carefully balanced
- Can lead to frustration if overused
- May create a complexity barrier for new players
- Can create power creep if not carefully balanced
- Creates potential for exploits by experienced players
Implementation Patterns
Upgrade Handler
Core implementation pattern for handling queue crafting logic with clean state management.
class QueueCraftingProcessor {
recipes: Recipe[] = [];
craft(recipeId: string, inventory: Inventory) {
const recipe = this.recipes.find(r => r.id === recipeId);
if (!recipe) return null;
for (const ingredient of recipe.ingredients) {
if (!inventory.has(ingredient.id, ingredient.amount)) {
return null; // Missing materials
}
}
for (const ingredient of recipe.ingredients) {
inventory.remove(ingredient.id, ingredient.amount);
}
const quality = this.rollQuality(0.05);
return { ...recipe.output, quality };
}
rollQuality(baseChance: number) {
const roll = Math.random();
if (roll < baseChance * 0.05) return "legendary";
if (roll < baseChance * 0.2) return "rare";
if (roll < baseChance) return "uncommon";
return "common";
}
}Recipe Validator
A modular approach to queue crafting that separates concerns and enables easy testing.
class QueueCraftingSystem {
recipes: Recipe[] = [];
craft(recipeId: string, inventory: Inventory) {
const recipe = this.recipes.find(r => r.id === recipeId);
if (!recipe) return null;
for (const ingredient of recipe.ingredients) {
if (!inventory.has(ingredient.id, ingredient.amount)) {
return null; // Missing materials
}
}
for (const ingredient of recipe.ingredients) {
inventory.remove(ingredient.id, ingredient.amount);
}
const quality = this.rollQuality(0.2);
return { ...recipe.output, quality };
}
rollQuality(baseChance: number) {
const roll = Math.random();
if (roll < baseChance * 0.05) return "legendary";
if (roll < baseChance * 0.1) return "rare";
if (roll < baseChance) return "uncommon";
return "common";
}
}