帮助创建游戏 [英] Help For Creating Game

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

问题描述

你好!
我需要创建一个简单的推箱子游戏,在这个游戏中,我们有一个盒子和一个目标.

Hello !
i''m Need To Create A Simple Sokoban Game, in this game we have One Box And One Target.

+ the game rules is:
- the worker Only can push the box.
- the box only can moved in(left,right,top,down) direction.
+ The Map Define Role is:
- . is ground
- # is wall
- B is box
- g is target
- s is worker


我可以通过这种格式获取字符串,并将其放入2d字符数组.贝娄的一些例子:


i can Get The String By This Format And Put This To 2d Char Array. Some Example Come Bellow :

.	.	.	.
.	S	B	.
.	#	#	.
.	.	G	.


现在我有了游戏地图矩阵.
现在,我需要使用以下所有算法来找到框和目标之间的最短路径.


Now I Have A Matrix Of Game Map.
Now I Need To Find The Shortest Way Between Box And Target With All Following Algorithms.

1- BFS
2- DFS
3- Bidirectional
4- A*


+请谈谈我如何使用此算法求解矩阵.
谢谢您,我的大师...


+ Please Talk Me How I Solve The Matrix With This Algorithms.
Thank You,My Masters ...

推荐答案

Here[^] are some useful links.


没有身体帮助我!
请帮帮我.
我有很短的时间来解决这个算法.
帮助..
No Body Help Me!
Please Help Me.
i have Short Time To Solve This Algorithm.
help..


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

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