AS
AgSkills.dev
MARKETPLACE

3d-games

3D game development principles. Rendering, shaders, physics, cameras.

21.2k
1.9k

Preview

SKILL.md
name
3d-games
description
3D game development principles. Rendering, shaders, physics, cameras.
allowed-tools
Read, Write, Edit, Glob, Grep

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

TechniquePurpose
Frustum cullingDon't render off-screen
Occlusion cullingDon't render hidden
LODLess detail at distance
BatchingCombine draw calls

2. Shader Principles

Shader Types

TypePurpose
VertexPosition, normals
Fragment/PixelColor, lighting
ComputeGeneral 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

ShapeUse Case
BoxBuildings, crates
SphereBalls, quick checks
CapsuleCharacters
MeshTerrain (expensive)

Principles

  • Simple colliders, complex visuals
  • Layer-based filtering
  • Raycasting for line-of-sight

4. Camera Systems

Camera Types

TypeUse
Third-personAction, adventure
First-personImmersive, FPS
IsometricStrategy, RPG
OrbitalInspection, editors

Camera Feel

  • Smooth following (lerp)
  • Collision avoidance
  • Look-ahead for movement
  • FOV changes for speed

5. Lighting

Light Types

TypeUse
DirectionalSun, moon
PointLamps, torches
SpotFlashlight, stage
AmbientBase illumination

Performance Consideration

  • Real-time shadows are expensive
  • Bake when possible
  • Shadow cascades for large worlds

6. Level of Detail (LOD)

LOD Strategy

DistanceModel
NearFull detail
Medium50% triangles
Far25% or billboard

7. Anti-Patterns

❌ Don'tβœ… Do
Mesh colliders everywhereSimple shapes
Real-time shadows on mobileBaked or blob shadows
One LOD for all distancesDistance-based LOD
Unoptimized shadersProfile and simplify

Remember: 3D is about illusion. Create the impression of detail, not the detail itself.

GitHub Repository
davila7/claude-code-templates
Stars
21,254
Forks
1,986
Open Repository
Install Skill
Download ZIP1 files