设计游戏,路径优化 [英] Designing a game , path optimisation

查看:59
本文介绍了设计游戏,路径优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我需要一个帮助来设计一个游戏,这个游戏是关于一个有两个出口的地板,例如或更多,人们试图通过避免我可以添加的无法解决的事件离开;

我需要实现智能路径优化...

那么你能为我重新启动的最好的开源软件是什么?

感谢先进



我尝试过:



i直到现在还没有尝试过sommthing

hi guys i need a help to design a game wich is about a floor having two exits for example or more , and people try to get out by avoiding unexpeted event that i can add;
wich i need to implement intelligent path optimisation ...
so what is the best open source software that you can recomand for me ??
thanks in advanced

What I have tried:

i have not tried sommthing till now

推荐答案

这是一个很好的起点:路径查找算法c# [ ^ ]
Here is a good place to start: path finding algorithms c#[^]


引用:

它是关于设计一个关于havig演员的游戏(例如2人)试图从危险的地板(例如火)中走出来,通过路径优化离开

it is about designing a game about havig actors (2peoples for example ) try to get out from a floor in danger (fire for example), getting out by uing path optimisation



'路径优化'或'最短路径'通常喜欢TSP和问题。

旅行商问题 - 维基百科 [ ^ ]



我认为你的问题不一样了。

你的描述非常模糊,但我们举一个例子。

你有一幢建筑物(1层网格),有墙和1或更多退出。

建立移动规则。

你想知道到达出口的最佳路径。

拿一张纸绘制带有墙壁和出口的建筑物/房间。

为每个出口评估值0,从每个0速率1每个单元格在零范围内未评级,重复评级2每个未评级单元格在细胞范围内等级为1,依此类推,直到没有更多未评级的单元格。

现在,从建筑物的任何地方开始,最好的出口路径是通过最小的速率到达的单元格(离开的距离)。

注意:防火区的处理方式就像墙壁一样。



然后翻译成程序。


'Path optimization' or 'Shortest path' is usually liked to TSP and problems alike.
Travelling salesman problem - Wikipedia[^]

I think your problem is different.
Your description is very vague, but lets set an example.
You have a building (a 1 floor grid), with walls and 1 or more exits.
Establish rules of moving.
you want to know best path to reach an exit.
Take a piece of paper and draw the building/room with walls and exits.
Rate each exit with value 0, from each 0 rate 1 each cell unrated within reach of the zeros, repeat with rating 2 each unrated cell within reach of cells rated 1 and so on until there is not more unrated cells.
Now, from anywhere in building, the best path to exit is through the cell within reach with smallest rate (it is distance to exit).
Note: fire zones are handled like walls.

Then translate to program.


这篇关于设计游戏,路径优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆