masto.es es uno de los varios servidores independientes de Mastodon que puedes usar para participar en el fediverso.
Bienvenidos a masto.es, el mayor servidor de Mastodon para hispanohablantes de temática general.

Administrado por:

Estadísticas del servidor:

2,2 K
usuarios activos

#rts

15 publicaciones15 participantes1 publicación hoy

#Gamedev question:

If I want to manually program a collision system for a lot of units, think like in an #RTS, and the only info I have is a list of units containing each their X and Y coordinates as well as their collision box diameter, how would I go about doing that?

Do I iterate through every single unit every frame to check whether the destination they'd move to this frame overlaps with ANY of the other units, meaning iterating through n² units per frame?

That's an exponential effort!