Literally it is pronounces 'a star' when you say it out loud. But hey, nobdy here actually talks to real human beings, right?
Printable View
Literally it is pronounces 'a star' when you say it out loud. But hey, nobdy here actually talks to real human beings, right?
Quote:
Originally Posted by XSquared
I haven't dl-ed it, but everyone seems to like it. I could see how the above could be annoying, but there's no way anyone would have even made an attempt to guess someone would run dual-monitors. It's kinda hard to code for that :(
I also dual moniters and i don't so much mind it. It would allow me to do other stuff at the same time on my other moniter. Some games are annoying that way. I can't do other stuff. But my guess is it is more of a standard to not let me do other stuff, so maybe you do want to change it. I dunno. I personally like it.
A* is pretty much the most popular pathfinding method out there. It is a combination of the Breadth-First and Depth-First searches, if you have ever studied them.
http://www.policyalmanac.org/games/aStarTutorial.htm
That is the best A* tutorial I have ever found. Use it.
Also, when coding and A* algorithm, simplicity, recursion, and lots of smaller functions are your friends :)
Be careful with A*. It's a very intense search. If you're going to use it, make sure you aren't using it wastefully. With the terrain I see so far, it doesn't look like you're going to have too many obsticles or different terrains, so you can probably get away with a "best first" algorithm. I'd also run it on a seperate thread, but that's just me. If you do use A*, there are many things you can do to limit it how much CPU time it will take. If you are interested, I'd be glad to give some pointers, and I'm sure the others will, too.
Do you plan on having other units or perhaps structures? If so, what do you have in mind?
edit:
I have used recursive searches when looking through sections that I have already processed, but I'd be interested to hear if you've found other beneficial places where it can be used.Quote:
Originally Posted by DavidP
i was actually surprised, before i posted this program i was designing a pathfinding routine, my first ideas were obviously the simplest, just a "colide -> re-evaluate destination" solution, but then i thought of (as my terrain is stored in a 100x100 UCHAR array) routine which views the entire solutions and finds all possible means of reaching its point, however i dismissed this idea due to the huge usage of processing, well that is until i read the a-star method ya'll like so much and i was amazed that it resembled (slightly) the method i thought of, i am having trouble designing the solution however (unless i want to run the game @ 2fps heh) the rts is gonna be designed to have way more stuff, many different classes of units, terrain objects, buildings etc (if ne of u ever played Populous3 or Warcraft 2 ud know what im aiming for) i know with objects i could just use a directional change on colide,
the first time i attempted A* i was overwhelmed. I knew all the theory behind it, especially since I had just finished a semester at college in which I had studied the BFS and the DFS searches, however, coding the A* algorithm was a pain the first time I tried it out. The main reason was I did not seperate it enough into different segments and I tried to do it iteratively instead of recursively...and that will kill your mind.
I scrapped the code after 1 night of working on it and started fresh the next day. That time I used plenty of functions to seperate each different part of the algorithm, and I thought about it recursively rather than iteratively. It was a breeze. I had it up and running within an hour, seriously. I loved it.