---
title: GameplayKit
framework: gameplaykit
role: collection
role_heading: Framework
path: gameplaykit
---

# GameplayKit

Architect and organize your game logic. Incorporate common gameplay behaviors such as random number generation, artificial intelligence, pathfinding, and agent behavior.

## Overview

Overview GameplayKit is an object-oriented framework that provides foundational tools and technologies for building games. GameplayKit includes tools for designing games with functional, reusable architecture, as well as technologies for building and enhancing gameplay features such as character movement and opponent behavior. Getting Started with GameplayKit GameplayKit covers many aspects of game design and development. For deeper discussions of the game design patterns you can leverage with GameplayKit, along with tutorials that illustrate building games with GameplayKit features, see GameplayKit Programming Guide. Related Sample Code To experiment with GameplayKit in action, see these sample code projects: Boxes: GameplayKit Entity-Component Basics Dispenser: GameplayKit State Machine Basics Pathfinder: GameplayKit Pathfinding Basics AgentsCatalog: Using the Agents System in GameplayKit FourInARow: Using the GameplayKit Minmax Strategist for Opponent AI DemoBots: Building a Cross Platform Game with SpriteKit and GameplayKit

## Topics

### Entities and Components

- [GKEntity](gameplaykit/gkentity.md)
- [GKComponent](gameplaykit/gkcomponent.md)
- [GKComponentSystem](gameplaykit/gkcomponentsystem.md)

### State Machines

- [GKState](gameplaykit/gkstate.md)
- [GKStateMachine](gameplaykit/gkstatemachine.md)

### Spatial Partitioning

- [GKQuadtree](gameplaykit/gkquadtree.md)
- [GKQuadtreeNode](gameplaykit/gkquadtreenode.md)
- [GKOctree](gameplaykit/gkoctree.md)
- [GKOctreeNode](gameplaykit/gkoctreenode.md)
- [GKRTree](gameplaykit/gkrtree.md)

### Strategists

- [GKStrategist](gameplaykit/gkstrategist.md)
- [GKMinmaxStrategist](gameplaykit/gkminmaxstrategist.md)
- [GKMonteCarloStrategist](gameplaykit/gkmontecarlostrategist.md)
- [GKGameModel](gameplaykit/gkgamemodel.md)
- [GKGameModelPlayer](gameplaykit/gkgamemodelplayer.md)
- [GKGameModelUpdate](gameplaykit/gkgamemodelupdate.md)

### Decision Trees

- [GKDecisionTree](gameplaykit/gkdecisiontree.md)
- [GKDecisionNode](gameplaykit/gkdecisionnode.md)

### Pathfinding

- [GKGraph](gameplaykit/gkgraph.md)
- [GKObstacleGraph](gameplaykit/gkobstaclegraph.md)
- [GKMeshGraph](gameplaykit/gkmeshgraph.md)
- [GKGridGraph](gameplaykit/gkgridgraph.md)
- [GKGraphNode](gameplaykit/gkgraphnode.md)
- [GKGraphNode2D](gameplaykit/gkgraphnode2d.md)
- [GKGraphNode3D](gameplaykit/gkgraphnode3d.md)
- [GKGridGraphNode](gameplaykit/gkgridgraphnode.md)

### Agents, Goals, and Behaviors

- [GKAgent](gameplaykit/gkagent.md)
- [GKAgent2D](gameplaykit/gkagent2d.md)
- [GKAgent3D](gameplaykit/gkagent3d.md)
- [GKGoal](gameplaykit/gkgoal.md)
- [GKBehavior](gameplaykit/gkbehavior.md)
- [GKCompositeBehavior](gameplaykit/gkcompositebehavior.md)
- [GKPath](gameplaykit/gkpath.md)
- [GKAgentDelegate](gameplaykit/gkagentdelegate.md)

### Obstacles

- [GKObstacle](gameplaykit/gkobstacle.md)
- [GKCircleObstacle](gameplaykit/gkcircleobstacle.md)
- [GKSphereObstacle](gameplaykit/gksphereobstacle.md)
- [GKPolygonObstacle](gameplaykit/gkpolygonobstacle.md)

### Procedural Noise

- [GKNoiseSource](gameplaykit/gknoisesource.md)
- [GKNoise](gameplaykit/gknoise.md)
- [GKNoiseMap](gameplaykit/gknoisemap.md)
- [GKCoherentNoiseSource](gameplaykit/gkcoherentnoisesource.md)
- [GKBillowNoiseSource](gameplaykit/gkbillownoisesource.md)
- [GKPerlinNoiseSource](gameplaykit/gkperlinnoisesource.md)
- [GKRidgedNoiseSource](gameplaykit/gkridgednoisesource.md)
- [GKVoronoiNoiseSource](gameplaykit/gkvoronoinoisesource.md)
- [GKCylindersNoiseSource](gameplaykit/gkcylindersnoisesource.md)
- [GKSpheresNoiseSource](gameplaykit/gkspheresnoisesource.md)
- [GKCheckerboardNoiseSource](gameplaykit/gkcheckerboardnoisesource.md)
- [GKConstantNoiseSource](gameplaykit/gkconstantnoisesource.md)

### Randomization

- [GKRandom](gameplaykit/gkrandom.md)
- [GKRandomSource](gameplaykit/gkrandomsource.md)
- [GKARC4RandomSource](gameplaykit/gkarc4randomsource.md)
- [GKLinearCongruentialRandomSource](gameplaykit/gklinearcongruentialrandomsource.md)
- [GKMersenneTwisterRandomSource](gameplaykit/gkmersennetwisterrandomsource.md)
- [GKRandomDistribution](gameplaykit/gkrandomdistribution.md)
- [GKGaussianDistribution](gameplaykit/gkgaussiandistribution.md)
- [GKShuffledDistribution](gameplaykit/gkshuffleddistribution.md)

### Rule Systems

- [GKRule](gameplaykit/gkrule.md)
- [GKNSPredicateRule](gameplaykit/gknspredicaterule.md)
- [GKRuleSystem](gameplaykit/gkrulesystem.md)

### Xcode and SpriteKit Integration

- [GKScene](gameplaykit/gkscene.md)
- [GKSceneRootNodeType](gameplaykit/gkscenerootnodetype.md)
- [GKSKNodeComponent](gameplaykit/gksknodecomponent.md)

### Reference

- [GameplayKit Constants](gameplaykit/gameplaykit-constants.md)
- [GameplayKit Structures](gameplaykit/gameplaykit-structures.md)
- [GameplayKit Enumerations](gameplaykit/gameplaykit-enumerations.md)

### Classes

- [GKSCNNodeComponent](gameplaykit/gkscnnodecomponent.md)
