game-patterns

Implement zero-GC game patterns in JEngine using JAction and JObjectPool.

2.2k|349|Updated Jul 14, 2020
One-click install
npx skills add https://github.com/JasonXuDeveloper/JEngine --skill game-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: game-patterns
Source: https://github.com/JasonXuDeveloper/JEngine/tree/main/.claude-plugin/skills/game-patterns
Command: npx skills add https://github.com/JasonXuDeveloper/JEngine --skill game-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Zero-GC patterns using JEngine reduce runtime allocations and garbage collection pressure by using pooled state objects, static lambdas, and async action flows.

Core Features & Use Cases

  • Zero-GC combat patterns, ability cooldowns, and DoT management using JAction + JObjectPool.
  • Wave spawning, projectile systems, and pooled resources for predictable performance in real-time games.
  • Clear best practices: ExecuteAsync, using statements, and reference-type state objects to avoid closure allocations and minimize GC.

Quick Start

Create a minimal example that defines a basic ability with cooldown and runs via JAction with Delay and ExecuteAsync to demonstrate the zero-allocation flow in a simple scene.

Frequently Asked Questions about game-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement zero-GC combat patterns to reduce runtime allocations in real-time games?

You implement zero-GC combat patterns by using JAction with JObjectPool to manage cooldowns and DoT effects, utilizing pooled reference-type state objects and ExecuteAsync flows to eliminate closure allocations and prevent garbage collection spikes.

What is the best way to manage object pooling for projectile systems without triggering garbage collection?

The best way to manage object pooling for projectiles is using JObjectPool to reuse reference-type state objects within JAction asynchronous flows, achieving zero-allocation spawning and deterministic latency for real-time game performance.

Do I need JAction and JObjectPool to achieve zero-allocation asynchronous game logic?

Yes, achieving zero-allocation asynchronous game logic requires JAction and JObjectPool to execute asynchronous flows via ExecuteAsync, utilizing static lambdas and pooled state objects to avoid closure allocations and minimize GC pressure.

How does ExecuteAsync work with pooled state objects to prevent GC pressure in game loops?

ExecuteAsync works by running JAction flows that leverage JObjectPool to reuse reference-type state objects, preventing new allocations per execution cycle and maintaining predictable garbage collection behavior in real-time game loops.

When should I use zero-GC game patterns for my combat or spawning systems?

You should use zero-GC game patterns for combat or spawning systems when deterministic latency and high frame rates are essential, specifically to reduce allocations and garbage collection pressure in real-time game logic like DoT management and wave spawning.