It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I read this article: http://www.policyalmanac.org/games/aStarTutorial.htm, but i don't understand how is calculated G cost. I know those child's on corner of his parent have bigger score but there is probably another calculation to check distance from current to start node.
Please help.
In the article,
It was stated that G=10 if you move horizontal or vertical and
G=14 if you go diagonal from one square to another square.
Hence if you move horizontal from start square G = 0+10
where initially G is 0. Then you move vertical or horizontal from there implies G=10+10
and if diagonal means G=10+14
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
How can we remove sprites from certain co-ordinates position on the screen on occurance of certain event in C#-XNA?
Typically you don't erase anything from the screen. Instead, for every frame, you render everything into a buffer and then render the finished buffer to the screen (to avoid flickering). When the next frame comes, it simply overwrites the previous content on the screen.
So, as said in the comment, you don't erase a sprite - you just don't render it in the next frame. How you achieve that depends on how you manage your Draw cycle.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have a Second Degree Function, what will be the best way to draw a graph to it using Windows Form?
1) Set range of arguments (for example -20<x<20)
2) compute values for this points (with accuracy 0.5)
3) Scale your graph to display resolution
4) Connect points by lines
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Could someone please give me some direction on how to spawn enemies in a circle (XNA Programming)?
I want the enemies to randomly spawn along the circumference of a circle that is just outside the bounds of the window. I want them to move in straight lines through the center of the window and out to the opposite side of where they started (or as close to that as possible).
Ideally this would create an environment where enemies are randomly coming across from seemingly all directions. Any help would be appreciated.
Just generate a random number between 0 and 360 (or 0 and 2π if it uses radians), and use trigonometry based on the radius of the circle you want.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I previously posted on this and showed my code for getting an explosion of bullets
going in a number of directions all at one time.
I was just wondering if someone could give me a clean example that I can go off of.
My idea was to have my left click make the player throw a grenade and when it collides with an enemy it explodes and bullets come out of every direction.
sorry for the double post,
thanks.
if(whatever the collision code is for xna again)
{
bullets.add(new bullet(startpos, direction))
}
if you expand that... bullets is whatever your using to manage your bullets, bullet is your newly created particle with a start position being where your collision took place, the direction will be a direction that your bullet should travel in (1 for north,ne,east,se,south,sw, west, nw) or whatever yo uwant
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to wpf.I know well to use Grid control.But i don't know where should i use GridSplitter,the use of GridSplitter and why should i use it.Please tell me the difference.
A grid is used for layout. For example, you can say your grid has 2 columns and 2 rows with Width="*", then they will size automatically to take up a quarter of the space.
Now if you want to resize them (like with the navigation pane on the left of windows explorer, you can drag the border to change its width), you can use a GridSplitter. That enables you to grab the edge between the grid's columns (or rows) and resize them.
The grey line that you can drag is a GridSplitter: