I'm running 5 instances atm. What I do is just clever loading of really needed tiles. But idea with server is cool for sure.
P.S. it's also good to have a server application once you'll probably need a DB access to make things neat and convenient.
Last edited by Empted; 11-04-2012 at 02:16 PM.
I'm not talking about calculating something on a real server but an application which works as host on the local computer and does the calculations for the clients.
In my opinion would this be overkill and except a lower memory usage (which could be compensated (as mentioned) by loading the tiles in an intelligent way) wouldn't this grant any benefits. But I haven't even checked if R&D is threadsafe in order to do something like this.
Lets finish this (off) topic at this point![]()
This.
Also, I'm not sure why you would be so aggressive about a bad idea...
Sorry, you don't get to have the last word when you're giving brainless advice. What do you call "an intelligent way"? The only way to do this "properly" other than loading the entire zone (this is assuming the bot is not aware of flight paths, hearthstone, available teleport spells, etc.) would be to use a hierarchical pathfinding approach. If you load tiles in a radius around your current position and your destination until a path is found, you are not guaranteed that the path you find is the shortest one. Here is an exaggerated example of the problem you can have (this assumes you are interested in getting the shortest path between two points):
So either you load the entire continent (which is basically free), or you implement a reachability matrix and do some hackish A* between tiles.
I should also point out that a large percentage of the people who have gotten to this point and still have their system working are writing publicly available pay-to-use bots. If it were me, I wouldn't even include the pathfinding code in the bot. I would have it "call home" to a server hosted by me to request a path. This would have the added bonus of being an anti-piracy protection.
If your only argument against loading it is that it is possible to load so many clients that you will consume all available memory, I feel obligated to point out that that is sort of a truism. I mean, how much RAM does your bot use? 20Mb? [sarcasm]Ooop, well, if you load 250 of them that will be over 4.5Gb too. Sorry, that means its a bad idea![/sarcasm]
Well I think we speak about two different things.
Calculating paths over big distances like you've mentioned needs indeed a different approach than a path within a distance of 500 yards. I understood it like this that you wanted to keep the whole world loaded even while it's not necessary, like in situations when you're grinding, questing or gathering in a single zone. Of course wouldn't it be wasteful at all if you load the tiles if they are required (like when calculating over long distances), but the actual question was which tiles should be loaded and this leaded me to the conclusion that he only wants to know which tiles he should load if he calculates a path over a short distance.
There's absolutely no problem if you have peaks on which the usage of the RAM raises (even if raises high), but the point is it to keep the average usage of resources low and dispose things which are only required once within 10 minutes.
You understood correctly. My approach has always been to just keep the entire continent loaded when I am in a continent. I haven't done more than one or two bots at a time, but if I did I would write an out-of-process pathfinding server.
I like this phone home ideaThe only downside I guess would be if your userbase is big enough you'd need several servers, perhaps even hosted in different parts of the world to improve latency, and some kind of load balancer.
@Frosttall; Look up shared memory sections. Unless you're using some kind of dynamically updated meshes you wouldn't even need any access synchronization.
The guy above always gives awesome advices. Shared memory idea fits so good. And no problem then once all bots are at the same machine.
Last edited by Empted; 11-04-2012 at 08:26 PM.
Depends on how intensively you are using path finding algorithms. Pretend you should call it to chase for mob, to get into loot range and to get into pull point. Once you hit some frequency it will become a bottle neck in your performance (while you can't proceed without having a path) and those ping delays are huge compared to other timings.
Last edited by Empted; 11-04-2012 at 09:26 PM.
I have had another approach which just has a huge problem.
Ok the Common Problem is how to get from a to b. It is a good Idea to get the Points the Bot will be walking to check for tiles.
What I wanted to do is:
Vector c = Vector b - Vector a // From A to B. Now Divide c by its Value -> c0 = c / |c|
Now you have g: Vector x = Vector a + t * c0. Now you can step through by increasing t values Until you reach b.
The Problem here is: It only works for Straigh Paths. A Solution would be doing this to every Path inbetween the HOPs. Only Problem: No HOPs without Tiles :/
That GeneratePath on a Server seems to be a nice Idea, although only possible for private bots because of DDos (See Honorbuddy, Wasn't It DDosed?) and because maybe some others just use your "API" for their own bots, making profit.
Well, nobody already gave me a hint on the other Question, If It is possible to change the way Detour is Detouring in order to keep some Distance to the Walls, without simply increasing agent height, which will make doors unwalkable?