简体   繁体   English

XNA中的LAN开发

[英]LAN Development in XNA

I'm looking at developing a LAN-Only game as part of my coursework at university, however only own 1 computer. 我正在大学里学习开发仅局域网游戏,这是我课程的一部分,但是只有一台电脑。

Reading around the internet, it seems to be possible to develop such a game by utilising a vmware image and installing all the appropriate pre-reqs on that, then using 通过互联网阅读,似乎有可能通过利用vmware映像并在其上安装所有适当的先决条件,然后使用来开发此类游戏

NetworkSession.Create(NetworkSessionType.SystemLink, 1, 4);

to create a network instance on the VM/Devel machine, and then running 在VM / Devel计算机上创建网络实例,然后运行

  using (AvailableNetworkSessionCollection networkSessions =    NetworkSession.Find(NetworkSessionType.PlayerMatch, 1, null))

to try and find the newly created session. 尝试找到新创建的会话。

So far however, I can't seem to find the other computer. 但是到目前为止,我似乎找不到其他计算机。

I've tried networking on both NAT and bridged (as unsure which is correct(?)) to no avail. 我已经尝试过在NAT和桥接(不确定哪个是正确的(?))上建立网络都没有用。

Any help/tips would be greatly appreciated! 任何帮助/提示将不胜感激!

Many thanks, Chris 非常感谢克里斯

Just loopback to yourself on the same computer, no need to run VMWare. 只需在同一台计算机上环回自己,无需运行VMWare。 Run a server on one port and connect to it. 在一个端口上运行服务器并连接到它。

If you really want to use VMWare I always choose bridged networking myself, but I really don't think you need VMWare. 如果您真的想使用VMWare,我总是自己选择桥接网络,但是我真的不认为您需要VMWare。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM