I made a particle toy in C++ with Raylib
Вставка
- Опубліковано 26 сер 2024
- As the title implies, I used the relatively simplistic Raylib library to simulate 100000 particles that are attracted to your mouse cursor.
Raylib is a nice and simple library for if you just want to play around with programming a bit. Kind of like p5.js but for C/C++.
www.raylib.com/
Also if you want my source code, there is a VSCode project directory on my github. It already has the Raylib library, so if you have a working compiler and VSCode setup, you can just open the repo in VSCode and make some changes.
github.com/cod...
Mom: My son is going to be a programmer.
Dad: No, he's going to be an artist.
The son:
i am going to make bills
what is so weird about it? generative art is totally a thing. people make lots of beautiful artwork with nothing but code and math
Nice one. Looks really cool. Always wanted to try raylib. This video gives me motivation.
this is actually really cool, been starting to learn raylib with c++, maybe you could do some raylib tutorials
Thanks! I am not really good enough yet to confidently make tutorials for c++ or raylib, but what I can tell you is that you will learn a lot from looking at and tweaking the examples on raylibs website.
@@CodeMaker4 alr, still cool stuff none the less, im just starting out and am trying to make an rpg text engine
One word: beautiful! 😍
What! that's actually insane lmao, also "simple"
Raylib is not only for C/C++, it has bindings to more than 40 languages, including js (as P5). I use it with Python, very comparable to Pygame.
Wow, that's really cool!
Nice job!
have you tried to do some Boids algorithm on this would look good like a flock simulator
Man i have trouble getting 30 fps on a 100x100 pixel based sand/fluid simulation
(Granted i only ran it on an intel i3)
Yea, I did not optimize this, and it is basically 100% CPU, no GPU optimizations.
Is it possible to have this on a web page?
No, not easily at least.
You would have to translate this to Javascript or WebGL, which is not trivial. JS would be much slower, but WebGL could be faster because then it can make use of the GPU.
Or maybe try out compiling this to webassembly. I've heared good things about it, but idk how it works.
rip pc
This won't work - too symmetric. Try freeing up your binding to conventions and post again?
@tehjoy on android, when when next video starts playing while writing a comment, it will post it in the next video.
At least in some circumstances.
More concerning are the 3 likes. 🤷♂️
@@dzidmailI love internet