Repository navigation
feat: air field, fans, and gunpowder shockwaves - #8
Merged
Merged
Conversation
Reserve ids 7–11 and lock fans like stone so the air pass can paint walls without them being overwritten by sand.
Run a 4×4 Eulerian pv/vx/vy step before particles so static fans keep blowing even when their chunk is idle.
Orthogonal fans sharing an air cell were composing because inject_fans only set the facing axis. Each fan now assigns both vx and vy so the last pixel in scan order fully wins the shared vector.
Steam and fire take one air-axis move before they rise so a fan in the same 4×4 can blow them sideways.
Gunpowder falls like sand and turns a 3×3 into fire, leaving stone and fans, so shockwaves have a source that is not the fan field.
Show fan flow on empty pixels and expose facing-cycle plus gunpowder on the palette without exporting air buffers to JS.
Pressure from last tick's velocity amplified the 4-cell mode. Compute velocity first, then pressure from the new field, and widen diffs to i32. Bench 960×600 native (300 steps, after this change): sparse 839 steps/s, dense top-quarter 353 steps/s.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AIR_CELL=4) so fans blow gases and boil/gunpowder launch a pressure wave.i32intermediates so a grain or fan does not saturate the field.Test plan
just verify(fmt, clippy-D warnings, tests,wasm-pack --target web)→←↑↓cycle; Gunpowder paints as charcoalNative bench after the solver fix (960×600, 300 steps): sparse 839 steps/s, dense top-quarter 353 steps/s.