Particles

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
darkfrei
Citizen
Posts: 64
Joined: Sat Feb 08, 2020 11:09 pm

Particles

Post by darkfrei » Sat Nov 14, 2020 10:41 pm

Small project about particles, that can attract and repel each other. Based on the Gravity, but here is more complex rules.

Yes, it looks like some fishes.
Attachments
2020-11-14T23_41_01-Particles v1.01.png
2020-11-14T23_41_01-Particles v1.01.png (56.2 KiB) Viewed 2442 times
2020-11-14T23_41_02-Particles v1.01.png
2020-11-14T23_41_02-Particles v1.01.png (50.08 KiB) Viewed 2442 times
particles-1-01.love
(1.86 KiB) Downloaded 65 times

User avatar
darkfrei
Citizen
Posts: 64
Joined: Sat Feb 08, 2020 11:09 pm

Re: Particles

Post by darkfrei » Sun Nov 15, 2020 5:58 pm

New version, a lot of changings.

Image
particles-1-03.love
(3.67 KiB) Downloaded 94 times
Attachments
2020-11-15T18_37_33-Particles v1.03 (Löve 11.3).png
2020-11-15T18_37_33-Particles v1.03 (Löve 11.3).png (8.39 KiB) Viewed 2376 times
2020-11-15T18_37_33-Particles v1.03 (Löve 11.3).png
2020-11-15T18_37_33-Particles v1.03 (Löve 11.3).png (8.39 KiB) Viewed 2376 times

User avatar
NobodysSon
Prole
Posts: 33
Joined: Tue Oct 30, 2012 10:37 pm

Re: Particles

Post by NobodysSon » Mon Nov 16, 2020 7:18 am

Mesmerizing to watch...

User avatar
ReFreezed
Party member
Posts: 204
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Particles

Post by ReFreezed » Mon Nov 16, 2020 1:27 pm

It's close to simulating flocking behavior, except the particles cannot make up their mind about what flock they belong too. :P
Tools: Hot Particles, LuaPreprocess, (more)
Games: Momento Temporis: Light from the Deep, Energize!
"If each mistake being made is a new one, then progress is being made."

Germanunkol
Party member
Posts: 711
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Particles

Post by Germanunkol » Tue Nov 17, 2020 5:54 pm

This is really cool, they look so alive!
Does the particle size affect the gravitational pull? if so, it would be really cool to see what happens if every now and then one or two very large (one cm?) particles appear, maybe with a very low speed?

Would you care to share what the "more complex rules" are?

There was another cool flocking simulation here a few years ago, that also looked quite cool: https://love2d.org/forums/viewtopic.php?f=5&t=78542
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de

User avatar
darkfrei
Citizen
Posts: 64
Joined: Sat Feb 08, 2020 11:09 pm

Re: Particles

Post by darkfrei » Tue Nov 17, 2020 9:15 pm

Germanunkol wrote:
Tue Nov 17, 2020 5:54 pm
Would you care to share what the "more complex rules" are?
All particles have same mass by this simulation. See Gravity simulation for various masses: https://love2d.org/forums/viewtopic.php?f=14&t=89764

This rules are not mine, just my implementation of them;

There is 3x9 = 27 types of particles:

Main types A, B, C:
The A attracts to another A.
B has no reaction to another B.
C repels from another C.

There is 9 types of As:
A1 attracts B and C;
A2 attracts B, but no reaction to C;
A3 attracts B, but repels C.

A4 has no reaction to B, but attracts C;
A5 has no reaction to B and C;
A6 has no reaction to B, but repels C.

A7 repels B, but attracts C;
A8 repels B, but no reaction to C;
A9 repels B and C.

Same rules for B1-B9, C1-C9.

The attraction for A will be colored as red 255;
No reaction to A will be colored as red 191;
The repulsion from the A will be colored as red 127.

Same: Reaction B as green color channel, reaction to C as blue color channel.


Thanks for flocking, but it doesn't work on Löve 11.3.

New version just with 135 partickles:
Attachments
Screenshot_20201119-122742.png
Screenshot_20201119-122742.png (40.83 KiB) Viewed 2061 times
particles-1-04.love
(3.72 KiB) Downloaded 51 times

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 18 guests