Implementing multiple Monogame instances(networking) - c#

I'm working in Monogame and want to create a project that contains two separate Monogame "instances"/"games".
The purpose of this is to have one Client/Lobby for creating games and allowing others to join and another for the actual gameplay(I'll also implement networking using the Lidgren library)
So my idea is to have a solution with two projects. One for lobby and one for a game client that two users would be connected to. But that's a separate matter that I'll attempt to tackle another day. First things first, how do I get a Monogame game to start another Monogame project within the same Solution

There is nothing specific for MonoGame if you want to start another process. You can use Process.Start() from simple .Net
https://msdn.microsoft.com/en-gb/library/0w4h05yb(v=vs.110).aspx

Related

Is there a fast way to debug mobile vibrations in Unity?

I'm trying to rapidly preview and iterate on different Android vibrations that I'm making through Unity3D. Currently, the only way that I know how to successfully do this is to build the project each time. This is really tedious and takes a very long time. Are there any ways to rapidly test different vibrations?
I've tried using UnityRemote, which works great for quickly debugging just about everything Android related except vibrations. Vibrations don't really work in Unity Remote since it's mirroring the Unity player.
There is no way around the build process with Unity, other than the Unity Remote app. I would try to place as many Android vibrations in a single build as you can, and make an interface to test them all.

Use UWP MediaCapture from WPF-application

We have tried finding a good media-library for recording videos in WPF, but it seems most fall short one way or another. However, the one existing in UWP seems to be quite competent, and more in line with what we want.
I have experimented a bit, and got an UWP AppService up and running, and I was able to take a picture from WPF-application using a command. The next step was to get a video recorded, and this is where it got tricky.
I created two commands in the same BackgroundTask and kind of hoped they would be executed from the same instance so that I could store the MediaCapture-object between commands, and start the recording in one and stop it in another.
However, they seem to spawn two separate instances, so I cannot store any state between the two commands to the AppService.
Am I able to solve this problem via some configuration or another approach that would work better for my specific usecase?
I found the answer myself, if you keep the AppServiceConnection alive, it will be routed to the same instance in the AppService later on.

3D image in c# using different images

I've different angle 2D images(images of one particular object), I want to merge all that three images and create one 3D Image.
How can I do that in Unity 3D?
The process you're looking for is called Photogrammetry. To get good quality models, you'll want more than 3 images. This process is very CPU intensive and takes a long time, you won't want this built into your Unity3D Game/App. You'll want to generate the models with external tools, then import them.
If you actually are looking for a C# way to do this, I only know of one opensource library working on this. Epicycle.Photogrammetry-cs.
If you want to manage the whole process of the conversion, check out this tutorial using only open source software.
This YouTube tutorial is easy to follow (I've done it myself), and also uses only free software.
If you're looking for a more polished, less technical solution, try ReMake by Autodesk
If you're looking for a completely hands off process, try 123D Catch by Autodesk

Unity adding the host as a player when starting the server

Currently im trying to make a lobby system for my game, the lobby system seems to have quite a few issues but im slowly working my way through them. I cannot however, find out a way to make the host automatically get added as a player in the game, when he starts a server. There will never be a situation where the host will only act as the server, so i need him to automatically get added to the game.
I have tried a bunch of different things with ClientScene.AddPlayer() But i cannot make this work.
Further, i cannot find any documentation on what functions the different buttons on the standard unity network lobby hud actually do, so i have a hard time replicating the behaviour.
Anyone has any good sources /ideas on the issue?
There is a method in the given NetworkManager called StartHost(). Try this for starting the server.
See the Scripting API for NetworkManager.StartHost() and all the methods from the NetworkManager
You have to write a custom UI and network manager to eliminate the Start Server GUI option which is by default provide by the Unity Networking GUI component. You can view this simple tutorial (UI & Custom Net Manager) to understand it.

Packaging multiple programs into one installer C# (visual 2010 basic)

I am currently finishing a project that uses multiple programs, and I am trying to get ideas of how to package them all into one installer, probably through the publishing option in visual basic, but I am sure there are multiple ways this can be done.
First, the main program is done using windows forms. That program, on the server side, keeps track of information that is going on in the warehouse. Users are able to manipulate that info on the client side as needed from multiple points: receiving, work orders, and shipping.
The external program was done in Unity and uses the same information to show how the warehouse is staged, what work is being done, and gives a 3D view of where people and inventory are located in snap shots of time.
So what I am trying to do, is package the Unity project into the installer. It's okay that it's a stand alone program, since I can just open it via the system controls in the main windows form project.
What isn't okay, is that right now it takes two installs to get everything running. Given that I have to deal with individuals that can barely use Google chat, I need this process to be seamless.
I am personally a fan of WiX. I have used it for small, single application distributions and large composite applications that involve many parts. It is capable of producing MSI( MSU, MSM, etc.), EXE installers and has Visual Studio integration.

Categories

Resources