WP Silverlight多人游戏问题很奇怪 [英] WP Silverlight multiplayer game issue very strange

查看:89
本文介绍了WP Silverlight多人游戏问题很奇怪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在更新并整合现有的益智游戏 多人游戏功能 和我遇到一个非常奇怪的(对我来说)问题,我希望能够清楚地解释这个问题。


在游戏中我有一个页面,其中我展示了两个棋盘拼图,第一个是玩家1和第二个是玩家2.当玩家1在你的设备上移动他的棋盘上的牌时,我的代码在对手和玩家2的设备中发送移动,在第二个板上,
显示被移动的棋子。如果只有玩家1做你的动作并且玩家2等待什么都不做,这就正确地运行。如果玩家2试图在你的棋盘上移动,那么棋子就不会移动或移动另一个从未碰过的棋子。


我检查了方法接收对手移动到phisical移动第二个瓦片董事会认为它在第一块板上移动了一些错误但没有。


我也很好地检查了上面所有的代码逻辑,并且你的瓷砖编号的板变量都是正确的,所以我认为问题是在画布更新或页面布局上没有刷新或类似的东西。


Silverlight页面包含很多东西,有两个画布和两个用户控件来管理player1 tile和player2 tile。


看起来如果移动对手平铺它或者混淆第一块板的布局管理。我不明白。


请有人帮帮我吗?


提前致谢


- Kafar





解决方案

>>所以我认为问题是在画布更新或页面布局上没有刷新或者是这种类型的东西。


I认为你可以UpdateLayout methond解决它,如果它是一个问题。


>>如果玩家2试图在你的棋盘上移动,则瓷砖不会移动或移动另一个从未触及过的瓷砖。


> ;>看起来如果移动对手平铺它阻止或混淆第一块板的布局管理。


我认为你可以标记这些瓷砖 是否可以移动每个带有标志的瓷砖,不是吗?


最好的问候




Hi all,

I'm updating and integrating in an existing puzzle game the multiplayer feature and I encountered a very strange (for me) problem, I hope to be clear in explain this.

In game I have a page where I shows two boards puzzle, the first is the player 1 and the second is the player 2. When the player 1 move a tile on his board in your device, my code send the move at the opponent and in device of player 2, on the second board, displays the piece moved. This run correctly if only player 1 doing your moves and the player 2 wait doing nothing. If the player 2 try to do your move on your board the tile not move or move another tile never touched.

I checked the method receive the opponent move to phisical move the tile on the second board thinking that it move something wrong on the first board but nothing.

I also checked very well the code logic behind all that above and the board variables are all correct with your tile number, so I think that the problem is on the canvas update or page layout not refresh or something of this type.

The silverlight page contains a lot of things and there are two canvas and two user controls to manage the player1 tiles and player2 tiles.

It seems how if moving the opponent tile it block or confuse the layout management of the first board. I don't understand.

Please, can someone help me?

Thanks in advance

-Kafar


解决方案

>>so I think that the problem is on the canvas update or page layout not refresh or something of this type.

I think you can UpdateLayout methond to resolve it if it is a problem.

>>If the player 2 try to do your move on your board the tile not move or move another tile never touched.

>>It seems how if moving the opponent tile it block or confuse the layout management of the first board.

I think you can mark those tiles whether it can move or not for each tile with flag, can't you?

Best Regards


这篇关于WP Silverlight多人游戏问题很奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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