AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

game-engine

Expert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript. Use when asked to create games, build game engines, implement game physics, handle collision detection, set up game loops, manage sprites, add game controls, or work with 2D/3D rendering. Covers techniques for platformers, breakout-style games, maze games, tilemaps, audio, multiplayer via WebRTC, and publishing games.

Original source
github
License
MIT
Pinned revision
5269f7ea2d6c3a9bfda5ed878b6726cf509121fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read github--game-engine at revision 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 15

references/algorithms.md · 24000

ns.

  • Rotation: Rotate a vector by an angle using trigonometry:
    rotated.x = v.x * cos(angle) - v.y * sin(angle)
    rotated.y = v.x * sin(angle) + v.y * cos(angle)
    

Quick Reference Table

| Algorithm / Concept | Primary Use Case | Complexity | |---|---|---| | Bresenham's Line | Grid raycasting, line of sight | O(max(dx, dy)) per ray | | AABB Overlap | Fast collision detection | O(1) per pair | | Circle Overlap | Round collider detection | O(1) per pair | | Separating Axis Theorem | Convex polygon collision | O(n) per pair (n = edges) | | Spatial Hashing | Broad-phase collision culling | O(1) average lookup | | Euler Integration | Simple physics stepping | O(1) per body per step | | Verlet Integration | Constraint-based physics | O(1) per body per step | | Impulse Resolution | Collision response | O(iterations * contacts) | | Vector Normalization | Direction extraction | O(1) | | Dot Product | Angle/projection queries | O(1) | | Cross Product | Perpendicularity / winding | O(1) | | Reflection | Bounce / ricochet | O(1) |