3D Game Development
Principles for 3D game systems.
1. Rendering Pipeline
Stages
1. Vertex Processing → Transform geometry
2. Rasterization → Convert to pixels
3. Fragment Processing → Color pixels
4. Output → To screen
Optimization Principles
| Technique |
Purpose |
| Frustum culling |
Don't render off-screen |
| Occlusion culling |
Don't render hidden |
| LOD |
Less detail at distance |
| Batching |
Combine draw calls |
2. Shader Principles
Shader Types
| Type |
Purpose |
| Vertex |
Position, normals |
| Fragment/Pixel |
Color, lighting |
| Compute |
General computation |
When to Write Custom Shaders
- Special effects (water, fire, portals)
- Stylized rendering (toon, sketch)
- Performance optimization
- Unique visual identity
3. 3D Physics
Collision Shapes
| Shape |
Use Case |
| Box |
Buildings, crates |
| Sphere |
Balls, quick checks |
| Capsule |
Characters |
| Mesh |
Terrain (expensive) |
Principles
- Simple colliders, complex visuals
- Layer-based filtering
- Raycasting for line-of-sight
4. Camera Systems
Camera Types
| Type |
Use |
| Third-person |
Action, adventure |
| First-person |
Immersive, FPS |
| Isometric |
Strategy, RPG |
| Orbital |
Inspection, editors |
Camera Feel
- Smooth following (lerp)
- Collision avoidance
- Look-ahead for movement
- FOV changes for speed
5. Lighting
Light Types
| Type |
Use |
| Directional |
Sun, moon |
| Point |
Lamps, torches |
| Spot |
Flashlight, stage |
| Ambient |
Base illumination |
Performance Consideration
- Real-time shadows are expensive
- Bake when possible
- Shadow cascades for large worlds
6. Level of Detail (LOD)
LOD Strategy
| Distance |
Model |
| Near |
Full detail |
| Medium |
50% triangles |
| Far |
25% or billboard |
7. Anti-Patterns
| ❌ Don't |
✅ Do |
| Mesh colliders everywhere |
Simple shapes |
| Real-time shadows on mobile |
Baked or blob shadows |
| One LOD for all distances |
Distance-based LOD |
| Unoptimized shaders |
Profile and simplify |
Remember: 3D is about illusion. Create the impression of detail, not the detail itself.
AGI Framework Integration
Qdrant Memory Integration
Before executing complex tasks with this skill:
python3 execution/memory_manager.py auto --query "<task summary>"
Decision Tree:
- Cache hit? Use cached response directly — no need to re-process.
- Memory match? Inject
context_chunks into your reasoning.
- No match? Proceed normally, then store results:
python3 execution/memory_manager.py store \
--content "Description of what was decided/solved" \
--type decision \
--tags 3d-games <relevant-tags>
Note: Storing automatically updates both Vector (Qdrant) and Keyword (BM25) indices.
Agent Team Collaboration
- Strategy: This skill communicates via the shared memory system.
- Orchestration: Invoked by
orchestrator via intelligent routing.
- Context Sharing: Always read previous agent outputs from memory before starting.
Local LLM Support
When available, use local Ollama models for embedding and lightweight inference:
- Embeddings:
nomic-embed-text via Qdrant memory system
- Lightweight analysis: Local models reduce API costs for repetitive patterns
1---2name: 3d-games3description: 3D game development principles. Rendering, shaders, physics, cameras.4allowed-tools: Read, Write, Edit, Glob, Grep5---67# 3D Game Development89> Principles for 3D game systems.1011---1213## 1. Rendering Pipeline1415### Stages1617```181. Vertex Processing → Transform geometry192. Rasterization → Convert to pixels203. Fragment Processing → Color pixels214. Output → To screen22```2324### Optimization Principles2526| Technique | Purpose |27|-----------|---------|28| **Frustum culling** | Don't render off-screen |29| **Occlusion culling** | Don't render hidden |30| **LOD** | Less detail at distance |31| **Batching** | Combine draw calls |3233---3435## 2. Shader Principles3637### Shader Types3839| Type | Purpose |40|------|---------|41| **Vertex** | Position, normals |42| **Fragment/Pixel** | Color, lighting |43| **Compute** | General computation |4445### When to Write Custom Shaders4647- Special effects (water, fire, portals)48- Stylized rendering (toon, sketch)49- Performance optimization50- Unique visual identity5152---5354## 3. 3D Physics5556### Collision Shapes5758| Shape | Use Case |59|-------|----------|60| **Box** | Buildings, crates |61| **Sphere** | Balls, quick checks |62| **Capsule** | Characters |63| **Mesh** | Terrain (expensive) |6465### Principles6667- Simple colliders, complex visuals68- Layer-based filtering69- Raycasting for line-of-sight7071---7273## 4. Camera Systems7475### Camera Types7677| Type | Use |78|------|-----|79| **Third-person** | Action, adventure |80| **First-person** | Immersive, FPS |81| **Isometric** | Strategy, RPG |82| **Orbital** | Inspection, editors |8384### Camera Feel8586- Smooth following (lerp)87- Collision avoidance88- Look-ahead for movement89- FOV changes for speed9091---9293## 5. Lighting9495### Light Types9697| Type | Use |98|------|-----|99| **Directional** | Sun, moon |100| **Point** | Lamps, torches |101| **Spot** | Flashlight, stage |102| **Ambient** | Base illumination |103104### Performance Consideration105106- Real-time shadows are expensive107- Bake when possible108- Shadow cascades for large worlds109110---111112## 6. Level of Detail (LOD)113114### LOD Strategy115116| Distance | Model |117|----------|-------|118| Near | Full detail |119| Medium | 50% triangles |120| Far | 25% or billboard |121122---123124## 7. Anti-Patterns125126| ❌ Don't | ✅ Do |127|----------|-------|128| Mesh colliders everywhere | Simple shapes |129| Real-time shadows on mobile | Baked or blob shadows |130| One LOD for all distances | Distance-based LOD |131| Unoptimized shaders | Profile and simplify |132133---134135> **Remember:** 3D is about illusion. Create the impression of detail, not the detail itself.136137## AGI Framework Integration138139### Qdrant Memory Integration140141Before executing complex tasks with this skill:142```bash143python3 execution/memory_manager.py auto --query "<task summary>"144```145146**Decision Tree:**147- **Cache hit?** Use cached response directly — no need to re-process.148- **Memory match?** Inject `context_chunks` into your reasoning.149- **No match?** Proceed normally, then store results:150151```bash152python3 execution/memory_manager.py store \153 --content "Description of what was decided/solved" \154 --type decision \155 --tags 3d-games <relevant-tags>156```157158> **Note:** Storing automatically updates both Vector (Qdrant) and Keyword (BM25) indices.159160### Agent Team Collaboration161162- **Strategy**: This skill communicates via the shared memory system.163- **Orchestration**: Invoked by `orchestrator` via intelligent routing.164- **Context Sharing**: Always read previous agent outputs from memory before starting.165166### Local LLM Support167168When available, use local Ollama models for embedding and lightweight inference:169- Embeddings: `nomic-embed-text` via Qdrant memory system170- Lightweight analysis: Local models reduce API costs for repetitive patterns