Platformer Pathfinding! - Devlog #1

Veröffentlicht am: 24 Juli 2021
auf dem Kanal: Zachary Newsom
9,288
372

I'm making a little platformer game all about being a primitive hunter-gatherer in a strange world. Best way to describe the concept is as a small-scale Monster Hunter in a 2D platformer format with less grinding and a more integrated story.


This first devlog is not really a devlog, but just an explanation for the pathfinding system I came up for this game.


Some disclaimers about this approach:
1. Can be slow with lots of nearby platforms (I cut off calculations between nodes if they're further than a set distance, so that can be good for rudimentary optimization).
2. Because of the speed, you shouldn't do this in the runtime of the program, pre-compute into a file and load on bootup (unless you're computing the raycasts on the GPU, or something). This means that any dynamic changes to the world will have to be locally recomputed.
3. The AI can't change their trajectory mid-flight. I decided to keep it simple and remove this capability for enemies because it complicated the issue even further.
4. Most importantly, this is not the best way to do it, I suggest looking around for more approaches to this problem before implementing it yourself. All I know is this one works for me.



I didn't really go to in depth in this video, so if you need more detail to create your own implementation ask me and I can probably get you some articles that I referenced -- or just scrounge them up on google.


[1] Article for finding non-colliding jump trajectory: https://gamedev.stackexchange.com/que...
[2] Other approach which allows for horizontal movement while in mid-air: https://gamedev.stackexchange.com/que...


Auf dieser Seite können Sie das Online-Video Platformer Pathfinding! - Devlog #1 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Zachary Newsom 24 Juli 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 9,288 Mal angesehen und es wurde von 372 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!