Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "astar"
-
3 REWRITES, 3 GOD DAMN REWRITES. Just decided that A* Path Finding Algorithm looks nice and felt like sure lets have a go...
3 REWRITES to get it right and even then there are minor bugs, sometimes coding is my passion, other times I wish I didn't know how to turn a PC on :/2 -
Started with some inspiration for making a 2d MMORPG.
These are how i make the world generator:
Decide you want to generate paths/roads.
Realize you need pathfinding function.
Realize you totally forgot how astar pathfinding works.
Search for implementation.
End up getting bored and implement other cool feature instead.
I literally made a bunch of stuff before writing a 20 or so lines long astar cause its boring. -
participating at an coding challenge.
the mission is to write an game solver for an game engine - in java. based on astar, pathfinding should be made possible by cloning objects.
never seen a so hardly misconcepted challenge, where character instances and their variables are static and contain uncloneable data😂 oh god what a waste of time realizing this bs1 -
I am very new to coding.Any apps for beginners?... recommend free apps only plz.As I am a student.. I can't afford much14
-
Hey Devrant fam!, well i'm basically trying to see if i can change up this A* algo we need to implement for an assessment, and from what i know basically most people have copy and pasted it, but not me!, so there is this one called Easy A* (star) Pathfinding By Nicholas Swift and my goal is such that i would like to make it input friendly!, here is the code in my main function
def main():
start1,start2 = input('Enter co-ordinates').split(',')
end1,end2 = input('Enter co-ordinates').split(',')
drive_mount()
open_map()
# test1 = (start1, start2)
# test2 = (end1, end2)
start = (start1, start2)
end = (end1, end2)
print(f'start co-ordinates:{start} \n end co-ordinates:{end}')
our_path = astar(our_maze, start, end)
print(f'starting co-ordinates:{start} \n ending co-ordinates:{end} \n Your shortest-path:{our_path}')
if __name__ == '__main__':
main()
however i am then greeted by this error, on line 62 specifically it says "TypeError: must be str, not int" and my original thought was to put str() around all of them, but that does not seem to work :-) any advice? thank you!3