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...
In questa pagina del sito puoi guardare il video online Platformer Pathfinding! - Devlog #1 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Zachary Newsom 24 luglio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 10,024 volte e gli è piaciuto 400 spettatori. Buona visione!