Tag Info

New answers tagged

0

Eric Lippert presented a tutorial (in C# of course) on calculating Line-of-Sight with Shadowcasting for a square grid. The first five sessions define various objects used in the algorithm, with the final code private static Func<int, int, T> TranslateOrigin<T>(Func<int, int, T> f, int x, int y) { return (a, b) => f(a + x, b + ...


1

In my experience, navigation should not be handled explicitly in the behavior tree. BTs are great at stateless reactive behavior, while navigation is inherently stateful: you find your path, than you follow it, check whether you should replan... If you need to handle jumps, elevators etc. thnigs get crazy and are difficult to handle in a BT. In all games I ...


0

A solution could be dealing differently with the Navigator Behavior; if its only purpose is telling your bot where to go if its current status is "flee", then you could incorporate it in the Flee Behavior and remove the Navigator Sequence. Otherwise, if Navigator Behavior is used to achieve different results, you could incorporate its functions in the same ...


0

'Speed dependent arc' is not a common term and has no specific meaning in game design. The textbook refers to cases where the character is already moving, but not necessarily directly towards the target. If the target is behind you, you would stop, turn around, and start moving again, but if you were moving in roughly the right direction before, you would ...


1

Hmm, a speed-dependent arc (like a narrow perception zone, or a cone of perception) , you say? The text book pretty much has made up this term, it is not a standard term as far as I know. What comes to mind is the following image... "Speed-Dependent" brings up the idea that the 'cone' changes in size based on (aka 'dependent on') the current speed. For ...


5

So this is basicaly topographical sorting problem. You have a graph, each node is a task that needs to be done, and some nodes depend on some other nodes (this is represented by an edge in the graph from depending node to the node it depends on). You want to do all the tasks, so you need to produce SOME ordering of the nodes that is topographicaly OK (the ...


10

If you can make sequences pretty general, there's not much of a spaghetti code. In case of deliveries e.g.: WorkTask operates with a WorkPlan. Workplan says what kind of resource unit must pick, from what kind of house, using which walk animation, using which work animation, time to work and all such details. So in the end WorkTask might look like: Find ...


25

At first you see that your commands are in the form of a list, so your first instinct might be to recreate that structure, and each dwarf will run through that list in sequence. What I suggest though is to break the list into steps, with each step having prerequisite(s), and then you run the entire command in reverse. Let me demonstrate with an example: ...


0

Have a look at Monte Carlo Tree Search (like min max but prunes the kind of large trees you see in games these days with large branching factors). http://en.wikipedia.org/wiki/Monte_Carlo_tree_search http://aigamedev.com/open/coverage/mcts-rome-ii/ http://www.aot.tu-berlin.de/fileadmin/files/lehre/diplomarbeit/BA_Barbara_Konz.pdf



Top 50 recent answers are included