![]() ![]() The problem was that when I debugged the Nodes list, nothing showed up in the console. Anyway, I started step 1 and instantly ran into a problem. I apologize for that is probably pretty confusing. Write code to make the goblin/character be able to realistically move between the two points. Create a modified version of Dijkstra's algorithm to find the fastest path between 2 points if it’s within the boundaries of the graph. A node will store it’s connections with other nodes, inside its own array. If a simulated parabola with the rule from the jump and movement values of the goblin/character from a node, lands on another node, those nodes are connected via a jump if also, every so often along the parabola, there are no collisions between the size of the goblin/characters hitbox and any tiles/ground. ![]() If nodes are on the same y level and right next to each other, the nodes are connected. Creates a script, attachable to a Game Object, that creates a 32x32px unit-sized grid graph with platforms as individual Nodes stored inside an array. Anyway, the system that I have goes as follows. ![]() I did some researching and I've come up with what I believe might be a solution to the problem, (if anyone has any other ideas that would be a better system PLEASE TELL ME) I'm an inexperienced coder and any ideas are greatly appreciated. I've searched around the internet a bit, and it seems that I have a very unique problem, because my game is a 2D platformer I can't use other alternatives, such A* Pathfinding or Unity's in-built pathfinding program because these are not designed for it. Hi everyone! I am designing a 2D platformer game where I'm trying to make a goblin be able to follow the Hero. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |