Attempts at Pathfinding : Argg!!! The little technicalities

I have been spending the last few days wrapping my head around basic path finding with recursion for backtracking, and also stumbled across path finding with just for loops and a queue.

I have been trying to add the path-finding into both my games, and another really interesting idea I have which should actually be easier.

My stumbling points today have actually just been little python technicalities involving dictionaries, tuples, un-hashables, and for row in list meaning „row“ is actually part of a list instead of an int making it unhashable in dictionaries if I use the same variable again later etc etc. Stuff like that took up the whole day lol.

Also using a dictionary to hold coordinates as keys and as values for keys has been slow because of the above I guess.

Also just learning the best way to implement a graph and how the map should work with the grid.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s