Hey, everyone! It’s been a few months since I posted on my blog like this, but that’s because I’ve been hard at work on a new tutorial for you all!
One of the more popular pages on this site has been a link I provided to ActiveState’s C++ A* Algorithm, and, while that’s good and all, it’s not really a tutorial by any means, and, well, it’s someone else’s stuff. I wanted to show you guys not only how it’s done, by the whos and whys.
OK, first off: No, I’m not dead. 2: No, I’m not a zombie. 3: Yes, zombies are considered dead. 4: I’d like to take a moment to consider a pivotal part of any game programmer’s arsenal of design patterns: The Observer.
The observer pattern, to put it simply, is an object that will only perform a specific action when another object/objects (called “the subject”) are in a particular state. A gentleman by the name of Bob Nystrom is working on an online (and soon physical) book regarding game programming, called GameProgrammingPatterns.com. In his book, he describes the fundamentals and design of the Observer pattern in a fun and simple way that can have even the most basic programmer up-and-running with Observers in no time; like a strange digital voyeur of code.
OK. That was disturbing.
Anywho, go run over to his site, and check out the other “chapters” he’s done. His book is still a WIP, but it’s already a classic. Take care!
So, my blog’s concept is nothing new: Games, programming, tutorials, the works. But everyone’s a little different and post up different content, and recently I found this blog, by Rodrigo Monteiro, where he not only posts up tutorials, game design, and even 3D game math, but he also gives his 2 cents on games and game design ideas. It’s a real great blog, and definitely one to bookmark. Here, I have a few pages of interest for you:
OK, so a while back I posted a link for a simple implementation for A* Pathfinding for C/C++. The page gets a bunch of hits, but I get a lot of people asking me to explain it. Well, it’s not my code to really explain, and I haven’t tested it out for myself. Rather than go through and make a huge tutorial, I figured I’d take the lazy route, and provide you with a resource to help explain it a bit. This page breaks down A*Pathfinding to the basics and gives a great explanation down to even the heuristics (If you don’t know that word, you’ll need this link).
So, now with this in hand, pathfinding should be easier to grasp now. Give it another go, and let me know how it turns out! Good luck!
Update: Oct. 4th, 2018
Hey! So I stopped being so lazy, and actually wrote up a tutorial for A* Pathfinding that I call KMStar! Go ahead and check it out!
I’m working to get a good portion of my AI up here (in tutorial form) for my Unity 3D Flight Combat game. Since AI is a bit more complicated than a simple flight script, I’ll put it up piece-by-piece in the form of modular devices you can use for other aspects of the game. Today, I’m going to show you how to give your game a bit more insight (These jokes are killing me).