Silverlight应用程序全局数据

发布于 2024-10-11 22:27:38 字数 321 浏览 9 评论 0原文

我正在重新制作一款主机游戏,这是我的老板很久以前在 Silverlight 中制作的。它完全基于文本。在控制台版本中,每台安装了它的计算机都有自己的地图,该地图被划分为房间网格。

我想做的是让地图全球化;当任何人运行 Silverlight 版本时,他们都会看到相同的地图。地图中没有发生任何变化,只是将新房间添加到地图中。

因此,目前我将所有数据存储在 IsolatedStorage 中,这显然不是全局的。我应该如何存储和检索数据,以便每个玩游戏的人都可以看到相同的地图?

如果有帮助的话,它将托管的服务器是 Linux 服务器,并且有 MySQL。

I am re-making a Console game, that my boss made a considerably long time ago, in Silverlight. It's totally text based. In the Console version, each computer that had it installed had its own map, which was divided into a grid of rooms.

What I want to do is make the map global; when anybody runs the Silverlight version, they will all see the same map. There is no changing that goes on in the map, only new rooms being added to the map.

So, currently I'm storing all the data in IsolatedStorage, which is obviously not global. How should I store the data and retrieve it so that everybody playing can see the same map?

If it helps any, the server that it will be hosted on is a linux server, and has MySQL.

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

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

发布评论

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

评论(1

洋洋洒洒 2024-10-18 22:27:39

请参阅一个试图做类似事情的人的答案(他想要高分数据,你想要地图数据):高分自包含在 .xap

事实上,您运行的是 Linux 服务器,这让事情变得有点复杂 - 您可以考虑运行 java,而不是运行 WCF 或 asmx 服务基于 Web 服务,或者只是创建一个普通的 HTTP 页面来查询 MySQL 数据库并返回您的 Silverlight 应用程序可以请求和使用的数据(这仍然是一个“Web 服务”,尽管是一个非常原始的服务)。

See this answer to a person who was trying to do something very similar (he wanted high score data, you want map data): High Scores self contained in .xap

The fact that you are running a linux server complicates things a little - instead of running a WCF or asmx service, you could consider a java based web service, or just make a normal HTTP page that queries the MySQL database and returns data which your Silverlight app can request and consume (this is still a "web service", albeit a very primitive one).

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