Note: this is a draft of a post that I will probably never finish.
After hearing about ECS and playing a bit with Rust I decided to try the both out and make a simple game. Something simple, realtime (as in not turn based) and fun. That is how Deasil was born.
It is supposed to be a 2D space shooter and as a 2D space game it needs a parallax background with stars. I implemented a first version of it yesterday, I am quite happy with the result and here is how it works.
TODO: Explain: check what’s visible basing on transform matrix
TODO: Explain: divide into planes to achieve parallax
TODO: Explain: divide each plane into sectors to have stable stars between frames
TODO: Explain: to get the same stars on each frame
TODO: Explain: hashing coords to get the seed and using it for new PRNG
It gives nice feeling of the space and makes controlling the ship easier because now you can see your velocity.

Deasil is more of a prototype and a learning project. For a real one this parallax would have to be implemented using shaders to offload the computation from CPU. You can find the current simple implementation here.
tags: rust - gamedev - deasil - draft