game-of-leif
game-of-leif copied to clipboard
More particle color
Hi! Can you add to Godot version of the code 12 more colors to a maximum of 12? Godot version of the code is the best option of all because it has zoom possibility and save parameters option, but I need at least 7 particle colors to achieve more realistic results. Please increase the maximum number of particles per color and increase interaction range between colors. Can you add a weak gravitational force between particles? This can be optional, with check box option.
I can donate a sum of money to see these requirements come true: 12 colours, each colour emitting an attractive force and a repulsive force towards another colour, each of these two categories of forces having a certain range, and, as an additional option, a weak gravitational force with infinite range that is proportional to the distance between the particles (i.e. the particles have mass). For example, if we have 3 colours, red, green and blue, let there be 4 3x3 matrices, as follows: one for the attractive force, one for the radius of the attractive force, one for the repulsive force and one for the radius of the repulsive force. That is, between two particles of the same colour or different colours, there should be both an attractive force and a repulsive force, each acting at different intensities and over different distances.
This would be a completely new simulation, but it's something I'm willing to attempt once I get back to my main PC (this is very CPU intensive). First we need to clarify some things, so we're on the same page:
each colour emitting an attractive force and a repulsive force towards another colour, each of these two categories of forces having a certain range
Like the current system, just with both attraction and repulsion on each pair and individual ranges for the two? E.g. red->green attraction & repulsion (two different ranges), green->red attraction & repulsion (two different ranges), for a total of 8 range/force parameters for each color pairs?
a weak gravitational force with infinite range that is proportional to the distance between the particles (i.e. the particles have mass)
This would just be inverse square attraction based on a "mass" parameter, not based on color pairs? I.e. red=10.0, green=5.0 etc.?
This will be very slow, so it might not be able to run in real-time with any significant particle count, but it could be done in a timestep fashion and rendered as a videofile with a predefined framerate. Godot recently added support for that, in other words the simulation can run at any framerate but it will record the frames as a smooth video, for example 5fps -> 60fps video, with the simulation running at 1/12th of the speed. It's also possible to render videos at a lower framerate for faster simulation times. This approach would eliminate music support unless it's sampled in a similar fashion.
I can donate a sum of money to see these requirements come true:
No donation would be necessary, this is just a recreational project. You could try to request a simulation like this as an issue in the original repository, as it has many more eyes and contributors on it. If not, and the above caveat about non-realtime simulation is something you're interested in, I'd be happy to take a shot at it.
Hello, Although I really want to help you but I am not the author. If you really need my help I can take a look.
Best, Guojun
romeo @.***
------------------ 原始邮件 ------------------ 发件人: "NiclasEriksen/game-of-leif" @.>; 发送时间: 2022年11月10日(星期四) 凌晨4:28 @.>; @.***>; 主题: Re: [NiclasEriksen/game-of-leif] More particle color (Issue #7)
This would be a completely new simulation, but it's something I'm willing to attempt once I get back to my main PC (this is very CPU intensive). First we need to clarify some things, so we're on the same page:
each colour emitting an attractive force and a repulsive force towards another colour, each of these two categories of forces having a certain range
Like the current system, just with both attraction and repulsion on each pair and individual ranges for the two? E.g. red->green attraction & repulsion (two different ranges), green->red attraction & repulsion (two different ranges), for a total of 8 range/force parameters for each color pairs?
a weak gravitational force with infinite range that is proportional to the distance between the particles (i.e. the particles have mass)
This would just be inverse square attraction based on a "mass" parameter, not based on color pairs? I.e. red=10.0, green=5.0 etc.?
This will be very slow, so it might not be able to run in real-time with any significant particle count, but it could be done in a timestep fashion and rendered as a videofile with a predefined framerate. Godot recently added support for that, in other words the simulation can run at any framerate but it will record the frames as a smooth video, for example 5fps -> 60fps video, with the simulation running at 1/12th of the speed. It's also possible to render videos at a lower framerate for faster simulation times. This approach would eliminate music support unless it's sampled in a similar fashion.
I can donate a sum of money to see these requirements come true:
No donation would be necessary, this is just a recreational project. You could try to request a simulation like this as an issue in the original repository, as it has many more eyes and contributors on it. If not, and the above caveat about non-realtime simulation is something you're interested in, I'd be happy to take a shot at it.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Like the current system, just with both attraction and repulsion on each pair and individual ranges for the two? E.g. red->green attraction & repulsion (two different ranges), green->red attraction & repulsion (two different ranges), for a total of 8 range/force parameters for each color pairs?
Yes.
E.g. red->green attraction & repulsion (two different ranges), green->red attraction & repulsion (two different ranges), for a total of 8 range/force parameters for each color pairs?
Exactly.
This would just be inverse square attraction based on a "mass" parameter, not based on color pairs? I.e. red=10.0, green=5.0 etc.?
Yes. Being a 2D simulation, the attraction would be calculated as the product of the masses of the two particles relative to the distance, not the square of the distance between them. In order not to hinder the simulation, I was thinking of a calculation of the mass concentration over a certain area, a sort of Barnes-Hut. Gravity is necessary in the simulation because, at some point in the simulation, stable structures are formed and they no longer interact with each other. They remain stationary and the simulation ends. With weak, very weak gravity, these structures will move towards each other and enter into a new interaction.
This will be very slow, so it might not be able to run in real-time with any significant particle count, but it could be done in a timestep fashion and rendered as a videofile with a predefined framerate. Godot recently added support for that, in other words the simulation can run at any framerate but it will record the frames as a smooth video, for example 5fps -> 60fps video, with the simulation running at 1/12th of the speed. It's also possible to render videos at a lower framerate for faster simulation times. This approach would eliminate music support unless it's sampled in a similar fashion.
Here you read my mind. That's exactly what I was thinking, that the simulation would run without showing anything, but save each frame to a file. Then you could view what happened there as a movie, reading the data from that file. I saw this in a gravity simulation program called AstroGrav, where there was the same problem. There you could set the simulation to run in the background without graphics for a number of frames, then you could view those frames ready simulated and calculated in advance.
No donation would be necessary, this is just a recreational project. You could try to request a simulation like this as an issue in the original repository, as it has many more eyes and contributors on it. If not, and the above caveat about non-realtime simulation is something you're interested in, I'd be happy to take a shot at it.
Simulation in non-real time is really something that interests me. I really appreciate that you can do it without a donation. Thank you very much. I really do ask you to try it. Indeed, it is for recreation, not commercial. I like to study the emergence of artificial life, but I would like the simulation to be as realistic as possible, and the resulting structures to be as interesting as possible. It would be interesting if each structure also emitted an electromagnetic force, calculated according to what kind of particles form that structure. That is, there can be negative, positive or neutral charged structures. This would lead to the formation of megastructures, like multicellular organisms. At the current level of this code, only single-celled organisms can form.