- Falling Sand Sim
- Oc
- Lighting
- Terraria style lighting
- Light Raytracing
- 1 tile is one color
- Virtual Resolution: 424 x 242 (4.5 pixels per tile)
- Region (Biome) Chunk size: 512 x 512 (8 x 8 sim chunks)
- Simulation Chunk size: 64 x 64
- World size: 35840 x 73728 (70 x 144 Chunks)
- 12 Region chunks loaded for 3,145,728 "active" tiles (768 sim chunks)
Game | Noita | Rust 4 | Rust 3 |
---|---|---|---|
Passes | 4 | 4 | 9 |
Chunks per Pass | 196 | 196 | 85. |
Unit size | 1 | 4x4 | 3x3 |
Work units | 196 | 49 | 196 |
- APIC
- 4-16 Particles per cell simulated
- Position Based Dynamics
- Possibly interesting
- Somehow works together with pattern for physics
- Group particles and equalize their velocities (completely dampen local movement) also do sth with angular momentum (see 3.5 https://matthias-research.github.io/pages/publications/posBasedDyn.pdf)
- Only update dirty chunks, generate dirty rects
- Use z-order hash for Chunk storage
- Z-order chunk index (and revamp grid coords)
- Slotmap (maybe dense) for chunk storage
Client update order
1. Recieve network packets
2. Change
2. Wait for STEP packet (already received chunk packets at this point)
Stage | Server | Host | Client |
---|---|---|---|
/ | Always send movement packets | ||
1. | Receive new players | Receive new players | Receive network packets |
2. | Insert chunks to region | Insert chunks to region | Apply (un?)load chunks |
3. | Apply global events | Apply global events | Apply global events |
4. | Freeze packets and send tick | Freeze packets/own input and send tick | Wait for tick packet (with movement info) |
5. | Tick game | Tick game | Tick game |
6. | Preload and send global events, chunks etc. | (Send tick rsp finished) | |
7. | Render Frame | Render Frame | |
8. | (Wait for tick rsp if lockstep mode) | (Wait for tick rsp if lockstep mode) |
- Tick tiles
- Tick Entities
- Apply entity dx/dy, change chunks