Flurry — Enjoy a flurry of snowflakes from the comfort of your computer!
This is a very old project (like, very very old) that I decided to port over to repl for the holiday season. It's a fully computer-generated snow scene (the snowflakes are generated anew every time!). There's not a ton to say about it — it's just a nice background-esque thing with calming snowflakes drifting through the air.
How it works
The cool part is how it's made. Each snowflake is made using a controlled particle system and then mirrored sixfold to create the nice symmetry. The method was inspired by this coding train video.
The motion of the snowflakes is controlled by perlin noise, and each has a preset "rotation offset" to make them look like they are spinning at different times.
So, go ahead and check it out in fullscreen!
Hope you enjoy!
Oh, quick question about lang dev if you don't mind :)
How am I supposed to do built in classes like arrays and strings?
For example the array class has methods
pop, etc; and to handle that, I just have a bunch of ugly if statements, but is there a better way?
I know for many compiled langs like C++, they have a basic primitive type like
char*, and they they create an array class around that. But my lang doesn't have that. Should my lang have that?
@DynamicSquid Ok, I'll handle this one at a time.
If you have builtin classes, then you need to make their functionality builtin. Exactly how you do this depends on the structure of your language, but ideally you should be able to make builtin classes just like user-defined classes would be constructed. Whether that means pre-adding objects to a list of classes, creating a new object in the global space, or however your language implements OOP, it should be able to be done just like a user-defined class would be defined. This is the "cleanest" approach.
Now, as for the basic primitive thing, that depends. Really, it's a question of how low-level you want your language's foundation do be. Do you want to have a builtin list type and then build all abstractions on top of that? An object type? A raw pointer type? It's really up to how low you wanna go.
Really slow. Otherwise, cool algorithm!
LOL I am the master of performance and yet I don't have any tips rn. I'll let u know if I have tips for performance
R e a l l y n i c e !
I s t h i s r u n n i n g @ 6 0 F P S ? I t a p p e a r s t h a t t h i s a p p i s r u n n i n g s l o w l y o n m y l a p t o p.