PixelWorld Pathing Test
por EatMeR3turns
PixelWorld Pathing Test
Etiquetas para PixelWorld Pathing Test
Descripción
Honestamente, esto es solo un ejemplo de un algoritmo de rutas que diseñé. Es el predecesor más temprano de un simple RTS de programación en el que estoy trabajando. Por cierto, si alguien está interesado en implementar algunos gráficos para un juego así, hágamelo saber. Gracias. :D. Lo clasifiqué como tutorial porque planeo convertirlo en uno, si logro que este sistema de rutas sea realmente de alta calidad. NOTA: Esto es mediocre en el mejor de los casos. Creo que funciona el 80% del tiempo. Está hecho completamente desde cero. Definitivamente mejorará en el futuro. XD
Cómo jugar
Control + Clic izquierdo "Selección de cuadro" para seleccionar los cuadros blancos, Clic izquierdo para indicar a los cuadros seleccionados a dónde moverse.
Actualizaciones del desarrollador
Update 4-26-11: Fixed the mouse wheel zoom issue. Just… ignore that. XD
Update 4-27-11: They eventually stop jittering around when they cannot reach their target for an extended period of time.
Comentarios
level1kid
Apr. 26, 2011
you should add a meathod that stops them when they are in a certain radius of where they are moving to stop the bumping together
tie372
Apr. 26, 2011
This is really quite a paradigm shift in the way we pathfind. The agents in this model exhibit extremely realistic behaviour. Their navigation skills not only around one object but multiple objects is astounding, and the very nature of the algorithm introduces seemingly random noise into the way they calculate their path. Props to you, EatMeR3turns, I look forward to seeing this go further.
multifails
Apr. 30, 2011
I don't mean to be mean, but to give a realistic comment: This algorithm in its current state is worse than just making the objects go toward a goal and letting them get past obstacles by being pushed by the collision engine - the only time you would then get stuck is if velocity vector points in the opposing direction of a surface normal or a center point, depending on wether you use circles or polyobjects. In case you are serious about this, feel free to PM me and I can give you advice.
Baumstumpf
Apr. 28, 2011
If it only would work.
Often they allready get stuck if you simply let em run in a line:
X is Target, O is Object that BLocks, B is the Block that should moev.
Now try it out like this:
X O B
And it often gets stuck.. really often.
EatMeR3turns
Apr. 27, 2011
@level1kid, I added a counter that increases a lot whenever it can't move forward and decreases a little whenever it can move forward, and then I compare that counter to the distance from the target to the current position squared. The purpose is so that it stops jittering around much sooner when in close proximity than when far away from the target position.