Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
363 commits
Select commit Hold shift + click to select a range
3bd6812
Add some boilerplate
weenachuangkud May 13, 2026
f0edf11
Add some boilerplate
weenachuangkud May 13, 2026
191bdc3
Add some boilerplate
weenachuangkud May 13, 2026
ac8de31
Add some boilerplate
weenachuangkud May 13, 2026
1b48f86
Add some boilerplate
weenachuangkud May 13, 2026
1304d0d
Add some boilerplate
weenachuangkud May 13, 2026
6e647ff
Update ParallelSimulation
weenachuangkud May 13, 2026
6599544
Implement ParallelSimulation boilerplate and fix legacy bugs in BaseC…
weenachuangkud May 13, 2026
c348dab
Refactor QueueEvent to accept varargs and use castID instead of cast …
weenachuangkud May 13, 2026
534f79f
Refactor event handling and cosmetic movement to use ParallelSimulati…
weenachuangkud May 13, 2026
62c7a9d
Add casts_ID array for efficient iteration in UpdateCasts
weenachuangkud May 13, 2026
79a6b65
Update ParallelSimulation.luau to match legacy code
weenachuangkud May 13, 2026
22e7a83
Make BaseParallel shares self.Actives with ParallelSimulation
weenachuangkud May 13, 2026
0c4ea92
draft: FireQueuedEvents
weenachuangkud May 13, 2026
9bfce7a
Add luau language server and .aider to gitignore
weenachuangkud May 13, 2026
175939b
Add opencode.json
weenachuangkud May 13, 2026
08312d6
Update ParallelSimulation to match legacy code
weenachuangkud May 14, 2026
74155f2
Update ParallelSimulation to match legacy code
weenachuangkud May 14, 2026
e9a1361
Remove schema from opencode.json
weenachuangkud May 14, 2026
a27b70d
Remove RS variable from BaseParallel
weenachuangkud May 14, 2026
75aacf6
Update ParallelSimulation to match legacy code
weenachuangkud May 14, 2026
5fc71fa
Remove unused parameter
weenachuangkud May 14, 2026
d074881
Remove unused variable
weenachuangkud May 14, 2026
4c75aa6
Update BaseCastSerial
weenachuangkud May 14, 2026
221efe8
Update opencode.json
weenachuangkud May 14, 2026
0639bbb
Implement task.sync phase for parallel simulation
weenachuangkud May 14, 2026
a2acb86
Fix: index nil
weenachuangkud May 14, 2026
5e81cef
Fix: error statement
weenachuangkud May 14, 2026
2c9fe0f
Update opencode.json
weenachuangkud May 14, 2026
75324ca
Fix: convert numeric velocity to Vector3 in cast trajectory
weenachuangkud May 14, 2026
e21eb39
Fix: add CastVariant to cast object and fix Register assignment
weenachuangkud May 14, 2026
d45c4e8
Rename ActiveCastSerial to ActiveCast and remove unused variable
weenachuangkud May 14, 2026
8cad8e0
Forgot to index id
weenachuangkud May 14, 2026
c9e523d
Add guarding
weenachuangkud May 14, 2026
34aa40a
Replace table.clear with queuedEvents[castID] = nil
weenachuangkud May 14, 2026
c02b831
Fix: deep merge StateInfo/Trajectory in SyncChanges to preserve neste…
weenachuangkud May 14, 2026
6dfe09f
Update bench parallel
weenachuangkud May 14, 2026
71abdfa
Fix: prevent double-termination of casts by early return when EndTime…
weenachuangkud May 14, 2026
fc6a9d6
Use normal {} instead of __mode = v
weenachuangkud May 14, 2026
fba35c4
Fix: add self parameter to all FastCast module functions for consiste…
weenachuangkud May 14, 2026
50518fa
Replace dot with colon
weenachuangkud May 14, 2026
c5c6676
Fix: change internal TerminateCast callers from . to : to match funct…
weenachuangkud May 14, 2026
a896c61
Fix: create cosmetic bullets on main thread (pre-dispatch) instead of…
weenachuangkud May 14, 2026
0d99323
Move src to src/FastCast2
weenachuangkud May 14, 2026
6f4f613
Update rojo json
weenachuangkud May 14, 2026
983eafa
Add init.luau
weenachuangkud May 14, 2026
5ff39c0
Add ActiveCast.luau
weenachuangkud May 14, 2026
ff93171
Copy FastCast2 to FastCast2_debug
weenachuangkud May 14, 2026
f8062e3
Copy FastCast2 to FastCast2_mini
weenachuangkud May 14, 2026
e2cd691
Remove .legacy.luau from _debug and _mini
weenachuangkud May 14, 2026
e690bd1
Update benchParallel
weenachuangkud May 14, 2026
624083c
Fix: pre-create cosmetic bullets on main thread in parallel mode, wir…
weenachuangkud May 14, 2026
e6f689e
Wire _GetObjectCache into createCastData, add CacheHolder to BaseCast…
weenachuangkud May 14, 2026
48a05f0
Fix: cosmetic bullet creation for parallel mode, wire ObjectCache wra…
weenachuangkud May 14, 2026
e224f81
Fix: AI Stupidify
weenachuangkud May 14, 2026
5d314f6
Restore ActiveCast.luau
weenachuangkud May 15, 2026
2cbe994
Add: FastCastModule to RayInfo table
weenachuangkud May 15, 2026
3229990
Remove Trajectory.Acceleration guarding because it's not used
weenachuangkud May 15, 2026
abeca56
Add README.md
weenachuangkud May 15, 2026
149c246
Remove 1 TODO line
weenachuangkud May 15, 2026
dc360ea
Update TypeDef
weenachuangkud May 15, 2026
7219a0b
Wire ObjectCache GET to ActiveCast.luau
weenachuangkud May 15, 2026
3d7e20b
Update BaseCastParallel
weenachuangkud May 15, 2026
e14a1a2
Remove unused ObjectCache utils from BaseCastParallel
weenachuangkud May 15, 2026
23dc585
Wire ObjectCache ReturnPart
weenachuangkud May 15, 2026
175a5fd
Remove dupe statement
weenachuangkud May 15, 2026
dc46573
Remove Dbg
weenachuangkud May 15, 2026
2b96aee
Remove unused constants
weenachuangkud May 15, 2026
fa57864
Remove unused Requires
weenachuangkud May 15, 2026
acf2264
Add MAX_DISTANCE
weenachuangkud May 15, 2026
5cb8207
Removed Dbg
weenachuangkud May 15, 2026
efdecbb
Remove Signal
weenachuangkud May 15, 2026
c645d7f
Clean up comments
weenachuangkud May 15, 2026
5d0c73e
Change signal to function
weenachuangkud May 15, 2026
555dff4
Fix AI non sense edit
weenachuangkud May 15, 2026
24d582f
Fix: math
weenachuangkud May 15, 2026
2b26d47
Remove function with nil
weenachuangkud May 15, 2026
860ea01
Remove unused statements
weenachuangkud May 15, 2026
e0c80bf
Update benchParallel
weenachuangkud May 15, 2026
50aa1fb
Update benchParallel
weenachuangkud May 15, 2026
3ba635c
Change to PreSimulation
weenachuangkud May 15, 2026
f2d30ed
Change VMsDispatcher to use round-robin and fixes
weenachuangkud May 15, 2026
409392d
Fix ParallelSimulaion castHandler, sub segments
weenachuangkud May 15, 2026
af4ae9f
Update sourcemap.json
weenachuangkud May 16, 2026
09acd5f
Remove unnec task.desc
weenachuangkud May 16, 2026
9f36dae
Comment out unused function
weenachuangkud May 16, 2026
8b09e57
Wire Motor6DCache to ActiveCast.luau
weenachuangkud May 16, 2026
32ae774
Wire Motor6DCache to each Cast function
weenachuangkud May 16, 2026
285ba54
Add Motor6DCache:Destroy()
weenachuangkud May 16, 2026
555ac35
Add Motor6D supports
weenachuangkud May 16, 2026
937a0ea
Copy FastCast2 src to other variants versions
weenachuangkud May 16, 2026
f96fb89
Update benchParallel.client
weenachuangkud May 16, 2026
f245f8d
Update FastCastSerial
weenachuangkud May 16, 2026
bbaf899
Remove unused things
weenachuangkud May 16, 2026
bc20f74
Don't forget to clean up Motor6DCache and ObjectCache
weenachuangkud May 16, 2026
be78c7c
Remove TODO
weenachuangkud May 16, 2026
71dea42
Remove unused function
weenachuangkud May 16, 2026
fb866eb
Remove unused functions
weenachuangkud May 16, 2026
c3278f0
Add ?
weenachuangkud May 16, 2026
5adf9f8
Add ?
weenachuangkud May 16, 2026
63b7feb
Update BaseCastSerial
weenachuangkud May 16, 2026
4ec2d8e
Update BaseCastSerial
weenachuangkud May 16, 2026
c16b07a
Change to FastCastParallel:SyncChnage
weenachuangkud May 17, 2026
969e1e9
Update BaseCastParallel ParallelSimulation
weenachuangkud May 17, 2026
4c0bb3f
Fix critical bugs: ray direction formula, missing returns, sub-hit fa…
weenachuangkud May 17, 2026
662dfc9
Implement FastCast.TerminateCast for serial and parallel
weenachuangkud May 17, 2026
f9f22ee
Fix TerminateCast: isolate Actives cleanup to serial branch, nil-safe…
weenachuangkud May 17, 2026
bba0304
Pending changes exported from your codespace
weenachuangkud May 19, 2026
659661e
Merge pull request #40 from weenachuangkud/codespace-glorious-fortnig…
weenachuangkud May 19, 2026
006ee58
Remove ObjectCache from Caster TypeDef
weenachuangkud May 19, 2026
a410f34
Update TypeDef
weenachuangkud May 19, 2026
ee57e2d
Update TypeDef
weenachuangkud May 19, 2026
ab3ea29
Update TypeDef
weenachuangkud May 19, 2026
6971f32
Remove unused variables and types warning
weenachuangkud May 19, 2026
b68c2c7
Update TypeDef
weenachuangkud May 19, 2026
9127a29
Sync FastCast2 with other variants
weenachuangkud May 19, 2026
50afde6
Unused variables
weenachuangkud May 19, 2026
ae0c831
Sync FastCast2 with other variants
weenachuangkud May 19, 2026
0390508
Update benchmarkSerial
weenachuangkud May 19, 2026
a798eea
Update benchmarkSerial
weenachuangkud May 19, 2026
82418f0
Add sync for CastFire
weenachuangkud May 19, 2026
c508445
FastCast:TerminateCast not working on Serial version
weenachuangkud May 19, 2026
fb7eeb3
Fix typo
weenachuangkud May 19, 2026
43f3cbc
Remove: SyncChange
weenachuangkud May 19, 2026
fd7cfe7
Update ClientVM and ServerVM
weenachuangkud May 19, 2026
c8dede5
Sync main FastCast2 with other variants
weenachuangkud May 19, 2026
3dc719f
Update sourcemap and default.project.json
weenachuangkud May 19, 2026
22620be
Remove unused things
weenachuangkud May 19, 2026
69e16ab
Sync main FastCast2 with other variants
weenachuangkud May 19, 2026
a3ec249
Update TypeDef for _debug
weenachuangkud May 19, 2026
d6b5da0
Update TypeDef for _debug
weenachuangkud May 19, 2026
c59a4e5
Remove _mini
weenachuangkud May 20, 2026
32ff084
Update _debug
weenachuangkud May 20, 2026
a67628c
Update sourcemap.json and default.project.json
weenachuangkud May 20, 2026
dfaa35b
Fix types error
weenachuangkud May 20, 2026
4cda992
Update TypeDef
weenachuangkud May 20, 2026
5101d21
Update TypeDef
weenachuangkud May 20, 2026
4755c6c
Update TypeDef
weenachuangkud May 20, 2026
061e032
Update legacy code
weenachuangkud May 20, 2026
6b2da24
Fix types error
weenachuangkud May 20, 2026
7bbe908
Update sourcemap
weenachuangkud May 20, 2026
1a3c02b
Fix types error
weenachuangkud May 20, 2026
4b0f318
Update folder path
weenachuangkud May 20, 2026
1f3a879
Update folder path
weenachuangkud May 20, 2026
d7a9570
Update sourcemap
weenachuangkud May 20, 2026
405ca4c
Add VisualizeCasts and VisualizeCastSettings
weenachuangkud May 20, 2026
f4eb1de
Update Default FastCastBehavior
weenachuangkud May 20, 2026
24112ab
Remove README.md inside src
weenachuangkud May 20, 2026
7977adf
Add VisualizeCasts and VisualizeCastSettings
weenachuangkud May 20, 2026
994bcc8
Add debuglogging requires
weenachuangkud May 21, 2026
6dfbd0e
First log
weenachuangkud May 21, 2026
824ca52
Add more logging
weenachuangkud May 21, 2026
aef1ebe
Add more logging
weenachuangkud May 21, 2026
f061c60
Add visualizers boilerplate
weenachuangkud May 21, 2026
2930255
Add TODO
weenachuangkud May 21, 2026
4cdf66e
Update visualizer boilerplate
weenachuangkud May 21, 2026
524a5b8
Use global VisualizeCasts
weenachuangkud May 22, 2026
67ace60
Use global VisualizeCasts
weenachuangkud May 22, 2026
036285a
Uncomment
weenachuangkud May 22, 2026
193612d
Update setting.json
weenachuangkud May 22, 2026
ad992d3
Add mcp.json
weenachuangkud May 22, 2026
c822f9a
Update ActiveCast
weenachuangkud May 22, 2026
be57d11
Remove mcp.json
weenachuangkud May 22, 2026
60ca90e
Fix linting
weenachuangkud May 22, 2026
bdfa884
Change RayPierce to Pierced
weenachuangkud May 22, 2026
5f51620
chore: add .luaurc for luau-lsp integration
weenachuangkud May 22, 2026
74ca734
fix: complete visualization system in ParallelSimulation
weenachuangkud May 22, 2026
16108af
fix: complete visualization system in SerialSimulation
weenachuangkud May 22, 2026
60fbd9d
fix: sync Paused state to ParallelSimulation in SyncChanges handler
weenachuangkud May 22, 2026
83da203
Fix type errors
weenachuangkud May 22, 2026
39561a7
Add TEST_LOGS
weenachuangkud May 22, 2026
23e23ed
Update rokit.toml
weenachuangkud May 22, 2026
d8c7972
Add pipelineTest
weenachuangkud May 22, 2026
b51affc
Add pipelineTest
weenachuangkud May 22, 2026
07154d2
Add test.project.json
weenachuangkud May 22, 2026
da83ce2
fix: use Actor:SetAttribute for synchronous pause state across actor …
weenachuangkud May 22, 2026
979cbe8
Revert "fix: use Actor:SetAttribute for synchronous pause state acros…
weenachuangkud May 22, 2026
7817164
revert: remove cross-context sync from PauseCast (user has own plan)
weenachuangkud May 22, 2026
eaac346
revert: remove Paused sync from SyncChanges handler
weenachuangkud May 22, 2026
5131624
revert: remove SetPaused function
weenachuangkud May 22, 2026
e008187
remove: PauseCast feature (unused, user decision as maintainer)
weenachuangkud May 22, 2026
a46a5fb
remove: dead ResumeCast and Paused type entries from TypeDefinitions
weenachuangkud May 22, 2026
efbaa00
Update
weenachuangkud May 22, 2026
6e48299
fix: remove lingering PauseCast test, fix all selene warnings in clie…
weenachuangkud May 22, 2026
09ce4bf
Update opencode.json
weenachuangkud May 22, 2026
8706d27
Add roblox.yml
weenachuangkud May 22, 2026
1530f24
Update TEST_LOGS
weenachuangkud May 22, 2026
0730d6f
fix: ActivesRef -> self.ActivesRef in SerialSimulation SimluateCast
weenachuangkud May 22, 2026
4a32ee4
chore: remove luau-lsp config files (opencode.json, .luaurc, sourcema…
weenachuangkud May 22, 2026
90cc567
Update TEST_LOGS
weenachuangkud May 22, 2026
8a5441d
>= to >
weenachuangkud May 22, 2026
db02fe3
fix: Double Destroy regression — stash no-op Destroy before removing …
weenachuangkud May 22, 2026
5663955
Wait before test start
weenachuangkud May 22, 2026
5d46a7c
Update TEST_LOGS
weenachuangkud May 22, 2026
0a31a0d
fix: remove redundant init.luau cloning in parallel fire methods
weenachuangkud May 22, 2026
c455d60
debug: add tracing for RaycastParams clone investigation
weenachuangkud May 22, 2026
7cd7ddd
fix: RaycastParams clone test — rawequal instead of ~= for identity
weenachuangkud May 22, 2026
a77dd57
fix: preserve StateInfo/RayInfo in SerialSimulation TerminateCast
weenachuangkud May 22, 2026
f163da0
fix: fire Hit when max distance reached after pierce + preserve State…
weenachuangkud May 22, 2026
9ab2059
fix: CanPierce test should pierce walls but Hit floor
weenachuangkud May 22, 2026
cb98dbb
fix: CanPierce test geometry — ground must be below parametric y=-35
weenachuangkud May 22, 2026
62ca6ad
fix: reset parametric trajectory after pierce so next frame continues…
weenachuangkud May 22, 2026
9756b1e
Update sourcemap.json
weenachuangkud May 23, 2026
40ecc86
Update header comments
weenachuangkud May 23, 2026
de4e2d1
Add warning
weenachuangkud May 23, 2026
627e330
Update warning
weenachuangkud May 23, 2026
5a1ef9a
Remove some file
weenachuangkud May 23, 2026
730f891
Add TEST.md
weenachuangkud May 23, 2026
2c5f193
fix(ActiveCast): rename FastCastModule to FastCastEventsModule, uncom…
weenachuangkud May 23, 2026
d44e6b0
fix(BaseCastParallel): safe iteration in Destroy, disconnect SyncChan…
weenachuangkud May 23, 2026
bd9590e
chore(Config): remove unprofessional comment
weenachuangkud May 23, 2026
ec019e0
fix(DefaultConfigs): add missing UseCanPierce to FastCastEventsConfig
weenachuangkud May 23, 2026
e027d56
fix(Motor6DCache): destroy pooled Motor6D instances on Destroy to pre…
weenachuangkud May 23, 2026
b13fd7c
fix(ObjectCache): store full objects in free pool, add PartToObject m…
weenachuangkud May 23, 2026
c8ee5cb
fix(ParallelSimulation): add return after Destroy in DebrisAdd, guard…
weenachuangkud May 23, 2026
f278720
fix(SerialSimulation): add return after Destroy in DebrisAdd, remove …
weenachuangkud May 23, 2026
779ce23
Update benchParallel
weenachuangkud May 23, 2026
652cf70
Remove
weenachuangkud May 23, 2026
2c61897
Update benchParallel
weenachuangkud May 23, 2026
8c7d1e6
Update benchParallel
weenachuangkud May 23, 2026
55bec8d
Wire ObjectCache with FastCastSerial
weenachuangkud May 23, 2026
6dce99f
Remove MovementMode from FastCastBehavior
weenachuangkud May 23, 2026
9582009
Remove movementMode from FastCastBehavior
weenachuangkud May 23, 2026
5f9446f
Add pipelineTest
weenachuangkud May 23, 2026
6bf5fcf
Delete roblox.yml
weenachuangkud May 23, 2026
68042f5
Fix cast cleanUp for Serial
weenachuangkud May 23, 2026
2ce745f
Remove tests
weenachuangkud May 23, 2026
e095dc4
Update README.md
weenachuangkud May 23, 2026
1e4a411
Fix CastTerminating
weenachuangkud May 23, 2026
1cb4742
Fix pierce stuck and Always-mode sub-step delta
weenachuangkud May 23, 2026
8935ca3
Remove TEST_LOGS
weenachuangkud May 23, 2026
61bb1b6
Fix parallel typeof returning 'Instance' for ModuleScript
weenachuangkud May 23, 2026
074e82b
Update architecture.md
weenachuangkud May 23, 2026
89030ef
Update AGENTS.md
weenachuangkud May 23, 2026
eb7e8a9
Update README.md
weenachuangkud May 23, 2026
33f8702
docs: update changelog with corrected API references
weenachuangkud May 23, 2026
3bb7ff8
docs: fix grammar in intro
weenachuangkud May 23, 2026
a0276ec
docs: rewrite cheatsheet with current API signatures
weenachuangkud May 23, 2026
37d424e
docs: rewrite api-reference with correct Init signatures and removed …
weenachuangkud May 23, 2026
71ffd78
Update Benchmarks
weenachuangkud May 23, 2026
1c51fdf
Fix index nil
weenachuangkud May 23, 2026
bd8747d
Fix typo
weenachuangkud May 23, 2026
315a099
Fix hit visualization bugs in SerialSimulation and ParallelSimulation
weenachuangkud May 23, 2026
82889d7
swap order queue
weenachuangkud May 23, 2026
d3257fb
Clean Up
weenachuangkud May 23, 2026
ee828c2
Remove benchmarks
weenachuangkud May 23, 2026
b4d5c01
Pass FastCastModule path as reference to VMs instead of fragile Objec…
weenachuangkud May 24, 2026
f4f78f5
Update .meta.json
weenachuangkud May 24, 2026
718bfba
Change SetMovementMode to SetMovementModeEnabled
weenachuangkud May 24, 2026
ab5fb6f
Update TypeDef
weenachuangkud May 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@

# Moonwave related stuff
/node_modules
/package-lock.json
/package-lock.json

# FastCast2 related stuff
/src/*.legacy.luau
.aider*
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"[luau]": {
"editor.defaultFormatter": "JohnnyMorganz.luau-lsp",
},
"stylua.targetReleaseVersion": "latest",
"luau-lsp.studioPlugin.enabled": true
}
56 changes: 56 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# AGENTS.md

## Project Overview

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.

- **Language**: Luau (Roblox)
- **Build Tool**: Rojo (`rojo sync`, `rojo serve`)
- **Documentation**: Moonwave
- **Repository**: https://github.com/weenachuangkud/FastCast2

## Development Commands

- **Sync to Roblox**: `rojo sync -o <place-name>`
- **Serve live**: `rojo serve` (then connect via Studio → Plugins → Rojo)
- **Build docs**: `moonwave build`
- **Publish docs**: `moonwave build --publish`

## Project Structure

```
src/
├── init.luau # Entry: FastCast (static), FastCastSerial, FastCastParallel
├── BaseCastSerial.luau # Serial: cast handler, routes events to SerialSimulation
├── BaseCastParallel.luau # Parallel: runs inside each Actor VM, casts per-VM
├── SerialSimulation.luau # Serial: SoA physics engine, single-threaded
├── ParallelSimulation.luau # Parallel: SoA physics engine, one per Actor VM
├── ActiveCast.luau # Cast data container (used by both modes)
├── ObjectCache.luau # Cosmetic bullet part pooling
├── Motor6DCache.luau # Motor6D pooling for Transform movement mode
├── TypeDefinitions.luau # All Luau type definitions
├── FastCastEnums.luau # Enum values (HighFidelityBehavior, CastType)
├── Config.luau # Debug logging flags
├── DefaultConfigs.luau # Default FastCastBehavior values
└── FastCastVMs/
├── init.luau # Dispatcher: creates/manages Actor VMs, load balancing
├── ClientVM.client.luau # Client-side Actor script
├── ServerVM.server.luau # Server-side Actor script
└── *.meta.json # Rojo metadata (Enabled = false)
```

## Testing

There are no automated tests. Testing is manual via Roblox Studio.

## Code Style

- Luau static typing throughout
- PascalCase for types, camelCase for variables/functions
- Two-space indentation
- SoA (Structure of Arrays) pattern for simulation data

## Agent Skills

To understand specific project workflows, refer to the skills defined here:
- @skills/architecture.md
154 changes: 0 additions & 154 deletions Benchmarks/bench1.client.luau

This file was deleted.

Loading