Native performance primitives for Godot, designed for AI-assisted development.
AgentiteG provides high-performance, GDExtension-based operations for common game development hot paths. It's designed to be easy to use with AI coding assistants like Claude Code while delivering native C++ performance.
- SpatialHash2D / SpatialHash3D - O(1) spatial queries using hash grids
- KDTree2D / KDTree3D - O(log n) nearest neighbor queries
- QuadTree / Octree - Adaptive spatial subdivision
- ArrayOps - Filter, sort, reduce, select on PackedArrays
- MathOps - Batch vector/matrix operations, distance matrices
- BatchOps - Steering behaviors, flocking, velocity updates
- RandomOps - Bulk random generation, Poisson disk sampling, weighted choice
- NoiseOps - Perlin, simplex, Worley noise with FBM, ridged, turbulence variants
- GridOps - Coordinate conversion, flood fill, FOV shadowcasting, distance fields
- PathfindingOps - A*, Dijkstra maps, Jump Point Search, flow fields
- CollisionOps - Batch point-in-shape, circle/sphere collisions, ray casting
- GeometryOps - Convex hull, Delaunay triangulation, Voronoi, polygon operations
- InterpolationOps - 30+ easing functions, bezier curves, Catmull-Rom splines
- StatOps - Mean, median, std dev, percentiles, histograms, outlier detection
- Download the latest release for your platform
- Copy the
addons/agentitegfolder to your project'saddons/directory - Enable the plugin in Project Settings
# Clone with submodules
git clone --recursive https://github.com/yourusername/AgentiteG.git
cd AgentiteG
# Build
scons platform=<windows|linux|macos> -j4
# Output will be in project/addons/agentiteg/bin/extends Node2D
var spatial: SpatialHash2D
var enemy_positions: PackedVector2Array
func _ready():
# Create spatial hash with 64-unit cells
spatial = SpatialHash2D.new()
spatial.cell_size = 64.0
func _physics_process(delta):
# Rebuild spatial hash (or update incrementally)
spatial.build(enemy_positions)
# Find all enemies within 200 units of player
var nearby = spatial.query_radius(player.position, 200.0)
# nearby is PackedInt32Array of indices into enemy_positions
for i in nearby:
var enemy = enemies[i]
enemy.alert()| Operation | Items | GDScript | AgentiteG | Speedup |
|---|---|---|---|---|
| Radius query | 10,000 | ~20ms | ~0.15ms | 130x |
| K-nearest neighbors | 10,000 | ~25ms | ~0.2ms | 125x |
| Sort floats | 10,000 | ~5ms | ~0.3ms | 15x |
| Filter values | 10,000 | ~1.5ms | ~0.08ms | 18x |
| Batch normalize | 10,000 | ~3ms | ~0.1ms | 30x |
| A* pathfinding | 100x100 | ~15ms | ~0.8ms | 18x |
| Noise grid | 256x256 | ~50ms | ~2ms | 25x |
See AgentiteG's performance in action with the interactive benchmark demo:
cd project
godot demos/interactive_benchmark/interactive_benchmark.tscnFeatures:
- Real-time GDScript vs AgentiteG timing comparison
- 7 scenarios: Spatial Query, Array Filter, Distance, Steering, Flocking, Collision, Flow Field
- Adjustable entity count (100-10,000)
- Live visualization with FPS counter and frame time graph
- Keyboard shortcuts: 1-7 for scenarios, +/- for entity count
- Zero game-specific logic - Pure algorithms, no architecture opinions
- Arrays in, arrays out - Work with PackedArrays, return indices
- Claude-friendly API - Simple signatures, clear documentation
- Opt-in complexity - Simple defaults, advanced options available
- Benchmark everything - Performance claims are tested
MIT License - see LICENSE
See CONTRIBUTING.md for guidelines.