New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split out the dependency on Lidgren #381
Comments
+1 on this. |
This is on the todo list, it is however a large amount of work and Dean On 20 March 2012 12:06, raistlinthewiz
|
+1 It's not such a big job, for obvious reasons GamerServices and Net depend on it, i do usually remove the 2 folders and a pair of references that give an error, everything works nicely! |
Well I've no issue taking up this challenge while I'm doing the split "Core" project. @tomspilman has had some particular views in the past about these kind of platform breakups |
I would have split them in the same manner as XNA, i.e. Framework.Net and GamerServices could be split in a similar manner, with a common assembly This would allow Net and GamerServices to be removed completely, or if |
As @slygamer pointed out breaking it up like XNA does wouldn't be a bad thing. I just worry about the number of CSProj files we'll need to maintain with all these splits. |
I wholeheartedly agree about the .csproj issue @tomspilman and PCL's wont help with everything just yet. Interestingly enough, I've been doing testing (in the adrotator V2 project) with the current reflection helper but inside the PCL as it some support a level of reflection and found that there is no need for all the #if blocks. Will se what I can come up with in a first draft for networking alone, might look at gamer services if I have time. Only real query I have is whether to make work like a plugin or as a completely separate lib? |
Plugins won't work nicely on mobile or console where it needs to reference |
I'm gonna throw this idea out there. It might be possible to move to a single solution for the desktop platforms v4.5 Then all we need to do is define a number of build configurations with the That would reduce the number of csprj's we need to maintain and would have I don't think this will work for android or iOS (it might though). Also On 25 May 2013 04:43, slygamer notifications@github.com wrote:
|
I suspect the conditionals will work in Xamarin Studio as it still follows VS pattern for the csprj / sln files Interesting idea @dellis1972 will at that into the mix when experimenting |
We've done this in a few places... it does work in VS2010/2012. I would still like to investigate premake first. I just haven't had the time myself.
I wouldn't be so sure. Last time i looked the support they had was hard coded to look for very specific keys in the places where they are normally found. This would have to be tested first. |
Yes, MonoDevelop/Xamarin Studio has just enough MSBuild support to allow it |
Hmm, will have a look into PreMake if I can find the time while mapping the split for network |
I have started a premake script (#1722). Still a long way to go. It is a |
Do you have a link to this tool? |
That I do not know yet Tom, just a reaction from the comments from @Ark-kun in #1733, best to ask that question in the other discussion. |
Stripping the code out of assemblies is how reference assemblies are made. Reference assemblies are not the same as portable class libraries. |
That is true, they are not PCL's, however the aim of the .Portable platform isn't so much to implement a PCL project but to give a way to build your game against a shim framework for all platforms and when coupled with an actual platform it just runs. @Ark-kuns proposal is interesting but personally I don't think it could cope with all of MonoGame's complexities at present. |
Can you explain what this workflow is like for end users? For example if I install MonoGame from the installer... how does this .Portable platform appear? How do I use it? |
Better to show you, read the latest post I did on the subject here - http://darkgenesis.zenithmoon.com/monogame-building-portable-solutions/ starting from the "Starting Fresh" chapter. but if you want the short / short version
Repeat the last 5 steps for any other platform without changing the game code. In each platform the only thing you need to worry about are the parts specific to those platforms. Main aim is to have the core project as centralised for the core game code in a similar way to today with separate class libs for each platform but you get the benefit from the PCL solution that all code in the "Engine" PCL project will run on all platforms without having to rebuild them to find out. |
Oh and in reference to the MonoGame installer, it acts like any other platform. Just needs a project template to create a PCL project with a reference to the PCL version of Monogame. |
I'll test out your linked project and read thru your article... at first glance it seems just as complex as not being portable. |
No more complex than creating a game using a separate lib, it pays off the more platforms you add to your portfolio. |
Bear in mind, the example in the repo is just a very basic one as it was meant for the presentation and walk-through 💃 |
See we don't bother with that at all. We have one csproj per-platform, use wildcard includes, and a few #ifs here and there for platform specific issues. At this moment i don't see PCL being any cleaner than our own technique. |
Well to each their own @tomspilman it's another option when building projects cross platform. Main reason I started doing the .Portable platform was due to interest raised in the issues log plus personal interest. As you yourself have stated, having too many #if's all over the place can make life difficult over time |
@tomspilman The point of some kind of portable MonoGame dll is that it allows to avoid platform hell when using MonoGame-based support libraries (think animation, physics, tile game engines) which aren't using anything platform-specific. Authors of these libraries are either forced to maintain and distribute separate platform-bound versions of their libraries or just don't bother and only release a version for a single platform. It's fine when you're the a single developer creating a game and have all the code, but when you don't have the sources to some classes you cannot do anything. P.S. Either way I'm liberating myself from this platform-hell as I'm now able to automatically create portable MonoGame libraries (https://skydrive.live.com/redir?resid=E4ECA4072D08CEE5!2870&authkey=!AHOdZuFxNvZlP4I) from vanilla ones. Just a bit more fixing and tuning... |
My Piranha tool to https://github.com/Ark-kun/Piranha, but don't look there yet as I've managed to destabilize and break it with the shower of late-morning commits =( |
I see the workflow like this:
So the only difference is that Game code is moved to a separate PCL dll which is then shared. This doesn't make much difference when all game code is a single code base, but if you want to use shareable components this makes life much easier. Basically the number of projects is: Makes big difference even for 2 components (like game + animation lib). |
What do you think about moving on with this now that protobuild is in place? |
I think it is very much worth considering. I guess it means having a separate |
I had started this a while ago in a branch in my local repo, but it would |
I'm not sure what's to be gained by having a MonoGame implementation of Microsoft.Xna.Framework.Net and (almost all of) Microsoft.Xna.Framework.GamerServices in the first place. They're basically managed wrappers around the Xbox LIVE API. |
Oh yea... I guess some parts of GamerServices are dependent on Lidgren as well. |
On some platforms such as iOS GamerServices wraps GameCenter. |
Done! #2514 |
We need to split out the Networking and GamerServices into seperate projects so that the code MonoGame.Framework does not have a direct dependency.
This will mean users not using networking will not need to reference the dlls.
The text was updated successfully, but these errors were encountered: