XNA Game networking on a host PC and a virtual one - xna

I'm relatively new to c# and the XNA, but using several tutorials and books I succeed at creating a simple game. The problem is, that i have only one computer and i want to test the game's networking features. So i have installed VMware Workstation and created a Virtual PC running Windows 7 Professional x86. On my host PC I'm running Windows 7 x64. I bridged both PC's and now i can share files between them flawlessly. But unfortunately when i run my game on both of them, create a session on the first, it seems that the second can't find and join that session. I tried to run another games like Quake and the result was the same - it looked like both PC's don't see each other. I also tried with installing Hamachi on both machines - no result again.
So my question is - is it possible to run XNA game which uses Windows Live for creating and joining a session on a host PC and virtual one.
Thank you in advance :)

make sure to use bridged networking in VM settings.
you can then specify different IP's on host / guest.
Also, try to stick it with IPv6

If you're just trying to test networking features and not simulate lag you can run multiple clients on 1 computer.
You should be able to find the session just the same as if you were running over the net/Lan.
Note:
Personally I've only done networking with Lidgren's network library so I'm not sure if using XNA's built in library works the same but it could be worth a try.
Edit:
Thought it was worth mentioning if you're running in the editor it won't let you run multiple clients directly, so publish your game to a local folder and run from there. You can also run one from the editor to get any debug messages or exceptions that occur.

Related

Working with PiCAN + raspberry pi 3 running windows IoT Core

I want to connect the PiCAN with my raspberry pi3 running windows IoT Core. I think I need a universal driver for the mcp2515 to work with the windows in Pi. I already tried using the instructions given in https://developer.microsoft.com/en-us/windows/iot/docs/driverdeployment to deploy the driver given in https://github.com/AustinWise/Mcp2515Can . But I got stuck in the instructions. I hope someone has already done this and maybe can help me with it? Did anyone successfully use this CAN board with Raspberry Pi (windows iot core)?
Thank you :)
Is a driver required in the first place?
Short answer is No.
Although a device driver is preferred, such work is not officially or community done yet.
The benefit you get from developing a device driver might include:
Native OS support for PiCAN board.
Create your create the custom IoT image, and deploy it to Microsoft store.
Possible performance improvements
others…
However, in order to develop an device driver, you need to follow the WDK framework. If you are comfortable with picking up new stuff, go ahead and try it out. You might need to refer to the linux source driver code for WDK driver developing.
If your purpose is to get the board working, you don’t need to get yourself into all these troubles.
In fact, you only need to get the SPI controller and GPIO controller, open the SPI device and initialize GPIO interrupt pin like Mcp2515Can does.
But, even after enabling the SPI, I couldn't receive anything on the
Raspberry Pi.
First, you can use Raspbian and turn on the CAN driver support to verify that you got all the wirings right. Here is the user guide you can reference.
If you can rule out the possibility of hardware failures, step into your C# code to troubleshoot the software.
Good luck.

Windows 10 IoT - Raspberry pi 2

I have to build a rover which has a camera on it and through webcam samples i am able to view the preview of it. I also came up with another app with has controls for the rover's motors. It works fine when i connect this device to a monitor and work with it, but for my purpose it needs to be headless. Is there any way i could remotely access the application. I am stuck up with so many different solutions like duplicating the entire project as webpage or could open the same application is the development machine that they communicate with each other. All i have to do is remotely control the rover with a video preview and even lower fps is acceptable.
There are a lot of ways to do this. (As #BerndGit implies.)
The easiest (IMHO) is to SSH in to the RPi from another computer and forward X11. That second computer will need to be configured for accepting X11 sessions.
Look for "SSH X11 Display Forwarding" for details on how to make this work on your setup.

What is the most suitable virtual machine software for sharing hardware ports (COM, LPT etc) at register level?

I'm using Delphi to develop real-time control software and over the last couple of years I have done some work running older Windows installations under Microsoft's VirtualPC and it works fine for 'pure software' development (i.e no or limited access to the outside world). Such tools seem able to work with network connections but I have to maintain software which performs I/O via the parallel port (via a device driver). We also use USB I/O. In the past I've liked Microsoft's virtual tools because it takes time to install a new operating system and then (in my case) install Delphi and a load of libraries and components to provide development support. In these circumstances I've not been too bothered by my lack of access to the low-level I/O ports.
I want to up my game and I'm happy to pay for a good virtualisation tool IF I can have access from it to the outside world, i.e I want to be able to configure it to allow access to my machine's parallel port and com ports in the same way as if it was running natively. This access has to be able to expose the parallel port in register terms, i.e to 'see' the port at address $03f8 for example and to support I/O operations of those registers (via the appropriate kernel access) as my Windows 7 64-bit installation is able to do.
I see that there are a number of virtualisation solution out there now but it's quite hard to acertain the capability of each at such a low level. Does anyone have any experience or knowledge in this area?
The VMware products would be suited best for this. You can add virtual serial and parallel ports and forward them to a physical port on the host, or even to a file or a named pipe.
You can also connect any USB device that is connected to the host machine.
This works with VMware Workstation, but might even work with the free VMware player too.

Sharing localhost with ipad over wifi

I really have no idea how to ask this, so with that have no idea where to search either. So.. I have a unique situation I think.
I have virtual box installed, with a local running server on it. I access it through my windows machine the host machine rather. via 127.0.0.1:3001. So I am here developing an app that can only be hosted on the virtual machine, as there are a lot of moving parts specific to it that can't be hosted on a WAMP or even a typical web-server elsewhere. The vm OS is Ubuntu. So here I am with a slight issue I want to see how this looks on my iPad, and a couple other tablets as the software being built into the VM is browser based as far as the GUI goes.
So theres the pretense. Heres the delima I want to use the built in browser on ipad to navigate to the browser based portion of my app on the VM like I can do through the Host machine. But Im not entirely sure how to achieve that. Its gotta be done over Wifi but what would I need to do to set that up accordingly?
Host Machine is Windows 7 Ultimate, VM is Ubuntu 10.x. This is not a screen sharing notion either. I don't want a to remote view the PC I want to type in the equivilant of 127.0.0.1:3001 into my ipad browser and view the service like I do vm to host machine.
Change network virtual card on virtual machine parameters. You should select 'bridget' card insteat NAT or Host only. In this way virtual machine get a network IP and you can connect to this IP from your IPAD.
Forward works great for things like this https://forwardhq.com/

Will embedded Firebird/Delphi cause a firewall 'hit'?

I'm looking at porting an Interbase 6 / Delphi 7 application to embedded Firebird in Delphi 2007. One of the problems we have is getting our users (often quite an unskilled bunch, really - though I love them to bits, naturally) to unblock our applications in their firewall. Windows firewall itself is fairly straightforward but often they are running McAfee or similar (they tend to buy cheap Dells with this stuff pre-installed) and it seems that each and every variation of this stuff has a slightly different user interface. sigh
Still, I'm digressing, sorry. Straight to the point; If my Delphi app connects to an embedded Firebird database, will I still need to all/open something in the user's firewall (as I currently do when installing stuff that makes a connection to 'normal' IB6)?
And if you've read this far (thanks) - can embedded Firebird be used concurrently on a machine? Let's say we have 2 applications, both of which want to use DIFFERENT databases - could the user run both of these apps simultaneously on the same machine or is there some kind of port binding that goes on under the hood, which we'd have to work around?
I have never had a problem with firewalls or McAfee with embedded firebird. (I assume this is because embedded is not really a 'server' and does not require a port to operate)
Yes you can have two apps concurrently, just keep the executables & databases in two different folders.
Even using Firebird in a non-embeded install on the local machine we have never bumped into any firewall issues in hundreds of installations. You don't even have to use TCP/IP to connect to the database. We do use TCP/IP, but using the local shared memory protocol would avoid the issue entirely.
Firebird makes an excellent embedded or semi-embedded database. We just install it in it's normal mode and it runs in the background without any user intervention 24x7 for years at a time.
As the embedded version of Firebird doesn't use TCP/IP to talk to the database, you'll be fine on single user machines. Bear in mind that Firebird Embedded is single-user and you won't be able to get two apps talking concurrently to the same database. To do that you'd need to install the Firebird server on the machine and in the connection string use localhost:C:\Data\MyDB.FDB on both apps.
I use UIB to talk to Firebird (I wrote a persistence layer for the OPF I use using it), it's thread-safe (unlike IBX) and I've found it to be appreciably faster than IBX. There's a version that comes with JVCL and a slightly later version at http://www.progdigy.com

Resources