CodingTrain / CodingTrain/Suggestion-Box

Particle life

Abierto
#1,507 0 comentarios 5 reacciones 0 asignados Ver en GitHub
Challenge
Lenguaje dominante
Sin datos de lenguaje
Estrellas
570
Forks
85
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

As Conway's game of life, particle life also takes place on 2d grid, but there are no cells. In this version, instead of cells being dead or alive, you have n amont of particles. They move freely in plane, but follow some rules.
1. There are multiple different types (like red, yellow...). These different types can attract or repell each other. Physics law of each reaction has an equal and opposite reaction does not apply. Red can attract blue to itself but blue can repell red away from itself.
2. Each type has a repelling force to all types no matter what if points are closer than 'point a'. Point a is chosen randomly, but works best if it is between the radius of a particle and 3 radiuses. From point a to point b (approx. 4 radiuses - 7 radiuses), there is a random force (rule 1), but it does not fade with distance.
3. Points have drag. Otherwise they could accelerate infinetly.

To recap random forces, as it may have been confusing.
At start of the program, a random number of types are generated (if less than 5, it isn't interesting, more than 12 gives you mess)
Then you create 2d array. In this case there will only be red and green type, so array is 2 by 2. Red has an index 0 and green has index 1. Loop through every slot. If index from main array == index from subarray, the program only chooses point a (distance for repelling force to prevent particle overlapping)at a random distance and point b with the same distance as point a. That means force in area b cannot be applied as it is either a or out of range for b. We want that, because a red can't add force to another red particle (remember: this is only for index from main array == index from subarray case) If index from main array! = index from subarray that means we are looking at two different colors. Array[0 (red) ] [1 (green) ] for instance means the program has to choose what force red particle will add to green particle, if it comes inside a certain radius. Again, distance a is randomly selected and distance b as well, this time not the same as distance a. For that object in that array[0][1] the program also randomly picks a force (lets say betwen - 5 and 5). That means red particle can either attract or repell green particle, and at different forces as well (it only changes once the game is restarted and new values are picked. Throughout the game, particle can add force to another particle, but it can recive comletly different force back from that particle or even no force, if other particle is inside this's b radius and this isn't inside other's b radius. At the end of the tick, they are slown down (drag)

This gives you even more alive forms than Conway's game of life.

If this wasn't clear, check out CodeParade's video about this: https://youtu.be/Z_zmZ23grXE

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

No se mencionan archivos del repositorio, pruebas ni puntos de entrada. Primero revisa la sugerencia y el video de CodeParade enlazado; después, determina si este repositorio tiene un proceso definido para convertir ideas de temas en proyectos; se consideraría completado cuando se hayan acordado el alcance de implementación y la vía de contribución.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
game-dev
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.