Updated:
A little explanation of path finding and path drawing;
I will post a picture here to see why my path turns multiple times.
Updated:
After the release in the early morning, a friend immediately gave feedback. I added one fewer Microsoft. DirectX namespace to the original release, which made the program unable to run. Then, I changed a non-audible version;
This is a download of the soundless version.
After a noon effort, the performance bottleneck was optimized (the problem still lies in the drawing, rather than the algorithm ,. net drawing speed is too slow, there is no way, I had to sacrifice the memory for time, but the effect is good, the speed is improved many times); I tried a variety of ways to play sound, I decided to continue using the directx library, including using axMediaPlayer and MCI, because I will create a directx-based version immediately. My development platform is directx9.0c (2005 ), you may also need dx9 to run the platform. If you cannot run the platform, use a non-audible version.
This is a download with a sound version (supported by Directx9.0 or later)
//////////////////////////////////////// //////////////////////
I wrote a single-host game in the bubble Hall on the 6/1 th last year. This year, I copied another one.
On weekdays at the company, many colleagues are playing this game at noon, except that I only know the website, chat QQ, or even sleep. Since everyone is fond of playing, I also took this game to practice, and I am learning C.
It's okay for everyone to play during their work hours. This is a game screen.
I'm right. net winform was very disappointed, and its drawing was so slow; in the case of a refresh in 50 milliseconds, the CPU actually went 100%, and I changed it to createmediawex to create a form, and the speed was coming soon; I must have used d3d or ddraw to solve this speed problem, but currently I still use the gdi method to draw and use a buffer; the form of a simulated DDRAW switch page; in this way, we will feel a little better in plotting;
I have written part in another note about the continuous watching algorithm. In fact, the simplest method is the three comparison methods summarized by others. The current method is 'direct connection search', 'one discount search', and 'two discount search; the path displayed after the connection is successful is found using the shortest path, which is not subject to the 2-fold range.
The current game is still in standalone mode, but it will soon become online, and the structure of the UI is easy to change.
If you are not talking nonsense, download the game. (If you have a sound version, you need DirectX9.0c support.) I hope to give more comments and comments. I will continue to improve it;
(-6-3 after the discovery of enthusiastic brothers; it was still unable to run normally, it was a failure ..)
There is no sound version and DirectX is not required. Some friends cannot use a sound version for the moment, so I can update it during the day, it's too late.