Page 2 of 2

Re: any pathfinding algorytm?

Posted: Tue Jul 06, 2021 7:47 pm
by Comfort
Caronte3D wrote: Tue Jul 06, 2021 6:46 pm Awesome web, thanks for sharing it
You're welcome.

It is a great site, with really useful interactive explanations.

Re: any pathfinding algorytm?

Posted: Tue Jul 06, 2021 8:04 pm
by SeregaZ
but we are anyway too sad :) our "scientific" council decide - too many memory. thanks for help.

Re: any pathfinding algorytm?

Posted: Tue Jul 06, 2021 8:23 pm
by Comfort
There are ways around the reduced memory problem.

Hard coding the direction array is one, placing it inside a data section.. this would save around 120 bytes, as the array allocation and assignments would no longer be needed.

.. there are more.

Re: any pathfinding algorytm?

Posted: Wed Jul 07, 2021 12:47 pm
by Comfort
Ok.. because I hate being beaten by a problem and I'm not sure this will suit your game mechanics.

Create a movement boundary square around the selected object, of say 16x16 tiles/cells.. the object can only move within that boundary, which adjusts with the moving object.