dmitriy-shmilo / sio2 Goto Github PK
View Code? Open in Web Editor NEWA simple powder toy clone written in Rust with bevy.
A simple powder toy clone written in Rust with bevy.
Add back a direct grid indexer. Use it in cases when index is guaranteed to be within grid bounds.
Create a particle behavior, which normally acts as solid falling block, but also has a possibility to shift either to the left or right side if bottom cells are taken.
When trying to index a cell out of grid bounds, a requested coordinate should wrap around. So accessing a cell at [0, -1]
should return a [0, FIELD_HEIGHT - 2]
cell, for example.
Currently, sprite sizes are set every frame. I don't know whether it has significant impact, but we should update sprite sizes only in reaction to WindowResized event.
Particles with liquid behavior should allow other particles to swap places, effectively displacing liquids when solids are falling into them.
Spawning around 100-200 particles makes FPS drop from 60 to 20-30 with release build. This is most likely caused by each particle having an individual sprite attached to it. As a first take on performance improvement individual sprites should be removed, and a single texture is to be rendered on screen. Each particle would be represented by a pixel on this texture.
disabling the rendering system with the field width and height set to 800 x 800 lets the demo run at 60fps, there's gotta be a better way to draw the image every frame
When cursor moves above the grid, render a shadow, which will indicate an area of brush effect.
Start hidden, show counter on hotkey press.
To improve visuals, make some particles differ in color slightly.
Add a tool, which would allow user to remove existing particles from the grid.
thread 'Compute Task Pool (1)' panicked at 'attempt to subtract with overflow', src/render.rs:78:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'Compute Task Pool (0)' panicked at 'task has failed', /Users/dsh/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.0.3/src/task.rs:368:45
thread 'main' panicked at 'task has failed', /Users/dsh/.cargo/registry/src/github.com-1ecc6299db9ec823/async-task-4.0.3/src/task.rs:368:45
when running with cargo run
.
When on a flat surface, liquids shift to the left and then to the right side. Liquid particles are supposed to shift back and forth, but they get stuck on the right side.
Grid squares are sized proportionally to the window. If window width and height aren't equal, particles will render as rectangles.
We could benefit a lot from the profiling introduced in 4.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.