# Darsin

Member

31

122 Neutral

• Rank
Member
1. ## Predict Interception

That would be a great solution indeed if i had time to redo my entire AI section but sadly i don't. It would be a nice upgrade since now it's really static and looks kind of shocky. But we're gonna have to think of a "fairly" quick solution to the prediction and then in my free time i will build on this application to get it to run smoother than it is doing now. i guess i could find some kind of way to incoorperate both of the methods in a future update. using steering as soon as they have a target.
2. ## Predict Interception

i've done a little throw-up in paint to illustrate the issue. 2D: 3D: As seen in the 2nd image. The green blob thingy saw the red blob thingy and has calculated his path towards that position. that's the code i have now. works perfectly. Problem is the red blob thingy moves. So i want to calculate the position of the purple blob thingy. According to velocity and the yaw of the red blob thingy in relation to the velocity and distance of the green blob thingy [Edited by - Darsin on January 26, 2009 6:21:44 AM]
3. ## Predict Interception

I've been working on a project for my final college project before i can graduate for my bachelor degree. And i've run into quite of a problem. I can't seem to figure out how to calculate where i need to go to intercept my pathfinding players. The AI is search 'n Destroy and looks for my players which determine their path according to A*. they have an acceleration or velocity whatever you want to call it. And they have a yaw to show me what they are looking towards. Their position is put in a D3DXVECTOR3 so x,y,z How am i gonna go about calculating their position. I've found a book that showed me how to do it on a 2d plane but he spoke of a Magnitude function which i've never heard of or seen in his book. Any ideas? What i did right now was calculate the distance between them. Calculate the cell they were in on the grid. And look in which direction the cell of the player they've seen should be raised or decreased. I did this by the amount of the distance but that will never work. // EDIT Basically i'm trying to figure out. How to calculate what cell i need to move my AI players to In order to meet up with my human players. [Edited by - Darsin on January 26, 2009 6:08:23 AM]
4. ## Extending a class that's been polymorphed.

I had a certain type of that at one point but my colleague asked me to look into this way of doing things. I had my suspicions this was not the way to go. or atleast it went against my programming beliefs but i thought i'd ask before i decided not to try it.
5. ## Extending a class that's been polymorphed.

I'm trying to make my code more efficient. Class Entity (holds the .x mesh) Class Creature: public Entity, AI (Holds the Creatures / Characters info) Class AI (holds the basic AI functions) Class AINotControlled: public AI (Extended AI + functions for NPC's and Enemies) Class AIPlayerChar: public AI(Extended AI + functions for playable characters) is there a way to define my classes so i can hold playable and non playable characters in Creature with a dynamic AI? I've boggled my mind over this but can't come to a very definite solution.
6. ## Calculate if the path is blocked or not using a normal.

The reason being i denied that was. their paths are never blocked the slopes are always above 0.7 and there is some serious steepness.
7. ## Calculate if the path is blocked or not using a normal.

For now i just need to know if the surface is sloped more than a certain amount so let's say 45 degrees. how do i go from the normal to an angle? if the normal is at more than 45 degrees that cell should not be accessed ever.
8. ## Calculate if the path is blocked or not using a normal.

Perhaps a little more explaining why i want to use the normal. Me and my friend used the difference in height between 2 cells earlier. But that results in the characters walking along a wall sideways and up. which is kind of strange since if something is to steep you won't be able to walk along the side and upwards. In fact it's easier to do that in Reality but reality is not what we're going for. Next to the fact they shouldn't walk up walls sideways. it just looks strange.
9. ## Calculate if the path is blocked or not using a normal.

I've been working on a my path finding algorithm for some time now and I've got that working. (it chooses the path which is cheapest). But now i want to add the factor of road blockage to the equation. Me and my friend are using a height map which calculates the normal of each Cell within the grid. It takes the 4 corners to determine the normal of the surface. I didn't write this code myself but i know how to use it. Now my question is how do i go from here: i receive the normal for this cell. it's stuffed in a D3DXVECTOR3. i figured i should look at the y value of this normal. figuring that 0,1,0 would mean the surface would be completely flat. but what do i do when the surface isn't flat. I've currently tried "normal.y < 0.7" would mean it would be blocked. well that's obviously not the way to go. But i lack the knowledge of the needed math here. Any pointers? P.S. this should have been in the Math forum >.< sorry
10. ## Issues defining a queue in a templated static class

Alright, just did that and that leaves me with another issue. ThreadHandler<T>::waiting_line': multiple template parameter lists are not allowed

12. ## Issues defining a queue in a templated static class

The one that is giving me headaches is the queue.
13. ## Issues defining a queue in a templated static class

So what exactly do i need to do. I've worked with templates well in the past but it's been so long ago i can't remember alot of it.
14. ## Issues defining a queue in a templated static class

Could you provide me with a small sample that would apply to my code? since i think i understand what you mean but have no idea of how to solve the issue at hand.