对于我的应用程序来说,最好的网络实现是什么?

发布于 2024-09-05 09:20:42 字数 413 浏览 2 评论 0原文

我正在为自己规划一个项目,它是一款单人和多人纸牌游戏。我想跟踪每个人的统计数据,例如世界排名等...

我的问题是我不知道客户端-服务器架构和编程的最佳方法。我最初的目标是用 C# 编写所有内容,因为我想精通该语言。我最初的想法是让后端数据库和后端服务器在互联网上的某种托管上运行,但是对于这样一个可能赚钱也可能不赚钱的小项目来说,这似乎成本高昂。

我尝试过研究云服务,但我不熟悉这项技术,我不确定我能否让它们满足我的需求,特别是因为大多数像谷歌的云都希望你使用我所理解的他们的编码架构。

最后,我的最后一个问题是,我想要一个可以用于不同语言的架构,这样我就可以将它从 PC 移植到 iPhone、Xbox 等......

所以有人对最好的架构和语言有什么建议吗? ?

我是否过于担心架构和后端成本,而应该专注于让游戏以任何方式运行?

I am in the planning phases of a project for myself, it is to be a single and multi-player card game. I would like to track statistics for each person such as world rankings etc...

My problem is I do not know the best approach for the client - server architecture and programming. My original goal was to program everything in C# as I want to get proficient in that language. My original idea was to have a back-end database and a back end server run on some sort of hosting on the internet, however that seems costly for such a small project that may or may not make any money.

I have tried looking into cloud services however I am unfamiliar with the technology, and I am not sure I can make them suit my needs, especially since most like Google's cloud wants you to use their coding architecture from what I understand.

Finally my last problem is that I would like an architecture that can be used for different languages so that I can port it from PC to IPhone, Xbox etc...

So does anyone have any advice on the best architecture and language to do this in?

Am I worrying about architecture and back-end costs to much and should just concentrate on getting the game running any which way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

来世叙缘 2024-09-12 09:20:42

C# 将是一门很棒的语言,即使对于 iPhone 和 Xbox 也是如此。使用 Microsoft 的 XNA 框架,您可以为 PC、Xbox 和 Zune 编写客户端卡应用程序,根本不需要改变太多代码。如果您正在考虑使用 iPhone,那么稍后您应该考虑 MonoTouch,它可以让您为 iPhone 编写 C#。您还可以使用 Silverlight,您可以使用它来编写 Web 富客户端。因此,我绝对建议使用 C#,无论是为了学习还是为了以后将其投入生产。

至于使用互联网上的服务器,我建议只需安装 SQL Server Express 版。这样,您就可以在本地计算机上单独运行服务器和客户端,从而不必支付主机费用。然后,当您准备好时,您可以将其移动到 Web 托管的 SQL Server 实例,或者稍后在准备好后免费使用 MySQL 等。

C# would be a great language, even for the iPhone and Xbox. With Microsoft's XNA framework, you can write your client card application for PC, Xbox, and Zune, without changing much code at all. If you're considering the iPhone, then you should later consider MonoTouch, which lets you write C# for the iPhone. You also have Silverlight, which you can use to write a rich client for the web. So, I would absolutely suggest C#, whether it be just for learning or for putting this into production later on.

As for using a server on the internet, I would suggest simply installing SQL Server Express edition. That way you can run a server on your local machine separately, alongside a client to save from having to pay for a host. Then, when you're ready, you can move it to web hosted SQL Server instance or just use MySQL or the like for free later on when you are ready.

弥枳 2024-09-12 09:20:42

我认为成本问题(例如数据库托管)是一项业务决策,而不是技术决策。您想盈利吗?您的游戏将拥有多少用户,以及他们将支付什么费用(直接或通过广告等间接方式)。您可以选择适用于任何语言/数据存储的托管解决方案。我怀疑您是否需要“云”解决方案,但标准数据库(MSSQL、MySQL、Postgres 等)应该就可以了,其中之一将附带几乎所有允许您部署自己的代码的托管计划。

就技术而言,C# 对于 Web 应用程序来说是一个完美的选择,如果学习它是一个目标,那么一定要使用它。在支付托管费用之前,您绝对应该在自己的计算机上开发一个可以运行的游戏(在本地运行后,您仍然需要部署和测试托管版本)。

至于你关于转向其他非 PC 平台的最后一个问题,恐怕你在那里运气不佳。 C#/.NET 将帮助您部署到基于 Windows 的手机,但对于 iPhone 等,您必须使用 Apple 的 SDK 和环境。我对XBox一无所知。我在这里可以给出的最佳建议是抽象您的层(例如 MVC 架构),并在它们之间保持干净且记录良好的分离。这样,您可以重新实现(例如 iPhone 上的视图和控制器),但仍然使用您的集中式数据模型。

I think the question of costs (e.g. of database hosting) is a business decision, not a technical one. Are you trying to turn a profit? How many users will you have for your game, and what will they pay (directly, or indirectly via e.g. advertising). There are hosting solutions for any language/data storage you may pick. I doubt you need "cloud" solutions for this though, a standard database (MSSQL, MySQL, Postgres, etc.) should do just fine, and one of these will come with almost any hosting plan that allows you to deploy your own code.

Regarding technology, C# is a perfectly fine choice for a web application and if learning it is a goal, then by all means use it. You should definitely develop a working game on your own computer before it makes sense to pay for hosting (you'll still need to deploy and test the hosted version after it works locally).

As for your last question about moving to other non-PC platforms, I'm afraid you're mostly out of luck there. C#/.NET will help you deploy to Windows-based phones, but for e.g. the iPhone, you have to use Apple's SDK and environment. I have no idea about the XBox. The best advice I can give here is to abstract your layers (e.g. a MVC architecture), and maintain a clean and well-documented separation between them. That way, you can re-implement, say the view and controller on an iPhone, but have that still utilize your centralized data model.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文