|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +FastCast2 is a Roblox projectile library written in Luau, providing high-performance raycasting, blockcasting, and spherecasting with parallel scripting support. It is an unofficial continuation of the original FastCast library. |
| 6 | + |
| 7 | +- **Language**: Luau (Roblox) |
| 8 | +- **Build Tool**: Rojo (`rojo sync`, `rojo serve`) |
| 9 | +- **Documentation**: Moonwave |
| 10 | +- **Repository**: https://github.com/weenachuangkud/FastCast2 |
| 11 | + |
| 12 | +## Development Commands |
| 13 | + |
| 14 | +- **Sync to Roblox**: `rojo sync -o <place-name>` |
| 15 | +- **Serve live**: `rojo serve` (then connect via Studio → Plugins → Rojo) |
| 16 | +- **Build docs**: `moonwave build` |
| 17 | +- **Publish docs**: `moonwave build --publish` |
| 18 | + |
| 19 | +## Project Structure |
| 20 | + |
| 21 | +``` |
| 22 | +src/ |
| 23 | +├── init.luau # Entry: FastCast (static), FastCastSerial, FastCastParallel |
| 24 | +├── BaseCastSerial.luau # Serial: cast handler, routes events to SerialSimulation |
| 25 | +├── BaseCastParallel.luau # Parallel: runs inside each Actor VM, casts per-VM |
| 26 | +├── SerialSimulation.luau # Serial: SoA physics engine, single-threaded |
| 27 | +├── ParallelSimulation.luau # Parallel: SoA physics engine, one per Actor VM |
| 28 | +├── ActiveCast.luau # Cast data container (used by both modes) |
| 29 | +├── ObjectCache.luau # Cosmetic bullet part pooling |
| 30 | +├── Motor6DCache.luau # Motor6D pooling for Transform movement mode |
| 31 | +├── TypeDefinitions.luau # All Luau type definitions |
| 32 | +├── FastCastEnums.luau # Enum values (HighFidelityBehavior, CastType) |
| 33 | +├── Config.luau # Debug logging flags |
| 34 | +├── DefaultConfigs.luau # Default FastCastBehavior values |
| 35 | +└── FastCastVMs/ |
| 36 | + ├── init.luau # Dispatcher: creates/manages Actor VMs, load balancing |
| 37 | + ├── ClientVM.client.luau # Client-side Actor script |
| 38 | + ├── ServerVM.server.luau # Server-side Actor script |
| 39 | + └── *.meta.json # Rojo metadata (Enabled = false) |
| 40 | +``` |
| 41 | + |
| 42 | +## Testing |
| 43 | + |
| 44 | +There are no automated tests. Testing is manual via Roblox Studio. |
| 45 | + |
| 46 | +## Code Style |
| 47 | + |
| 48 | +- Luau static typing throughout |
| 49 | +- PascalCase for types, camelCase for variables/functions |
| 50 | +- Two-space indentation |
| 51 | +- SoA (Structure of Arrays) pattern for simulation data |
| 52 | + |
| 53 | +## Agent Skills |
| 54 | + |
| 55 | +To understand specific project workflows, refer to the skills defined here: |
| 56 | +- @skills/architecture.md |
0 commit comments