使用WCF双工通信的多用户WPF游戏 [英] Multi-User WPF Game using WCF Duplex Communication

查看:89
本文介绍了使用WCF双工通信的多用户WPF游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我已经在.Net开发了很多年了,但最近一个自由项目已经呈现给我了。该项目是英国领先的赌场之一,游戏总监已经找我开发应用程序。



该应用程序本质上是一个多用户的现场游戏(每桌)赌场内。每个玩家都会有一个客户端设备,而经销商也会有一个设备版本略有不同的应用程序。从玩家的角度来看,游戏根本不需要太复杂,所以图形不是一个问题。 WPF应该能够完成我需要的所有图形。



我最初选择的架构是使用双工的WCF服务(在中央服务器上)允许每个桌子上的经销商控制游戏并相应地更新其他客户端设备的通信。也可以选择使用网络套接字,但我认为只要性能不是问题,WCF就能做到这一点?



我遇到的问题有了这种方法,Windows 8平板电脑并不便宜,显然成本是其中的一个主要因素。 Android设备的购买价格约为每个50英镑,当设备数量开始增加时,便宜得多。所以我研究了使用xamarin,这是一个允许你为Android设备编写c#的工具。但是,它似乎不支持WCF双工,我更愿意将所有内容保存在Windows中,就像我的知识所在。



我想到的另一个选项可能是在Windows Server中使用RemoteApp,并将Android设备的高性能服务器设置为远程桌面。这样,应用程序可以用C#编写,并使用完整的.Net框架和WCF双工。



我很感激有关不同开发人员如何进行这个项目的任何建议,你可能会看到 - 游戏



开发对我来说是新的!

So I've been developing in .Net for a number of years now, but a recent freelance project has been presented to me. The project is for one of the UK's leading casinos, and the gaming director has approached me to develop the app.

The app is essentially a multi-user live game (per table) within the casino. There will be a client device for each player and the dealer will also have a device with a slightly different version of the app on. The game, from a players point of view, doesn't need to be too complicated at all, so graphics are not a concern. WPF should be able to do everything I need where the graphics are concerned.

The architecture I initially chose was to use a WCF service (on a central server) with duplex communication to allow the dealer on each table to control the game and update the other clients devices accordingly. There is also the option to maybe use web sockets but I assume WCF will do the trick as long as performance isn't an issue?

The problem I've got with this approach is that Windows 8 tablets aren't cheap, and obviously cost is a major factor in this. Android devices can be purchased at around £50 each which is a hell of a lot cheaper when the amount of devices starts totting up. So I looked into maybe using xamarin, a tool which allows you to write c# for an Android device. But, it doesn't appear to support WCF duplexing, and I would much rather keep everything in Windows as that's where my knowledge lies.

The other option I thought of was to maybe use RemoteApp within Windows Server, and setup a high powered server for Android devices to Remote Desktop into.This way the app could be written in C# and use the full .Net framework along with the WCF duplexing.

I would appreciate any advice on how different developers would go about this project, as you can probably see - game

development is new to me!

推荐答案

这篇关于使用WCF双工通信的多用户WPF游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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