1
\$\begingroup\$

I am quite new to the MonoGame/XNA framework and i have some structuring questions right now.

One of the reasons I use MonoGame is because there is still that feeling to create a game from scratch without such things as Scene Editors. But also the platform independence plays an important role in my project.

I am trying to create a small 2D-RPG that should run on Windows (not Windows Apps) and on android. iOS is optional for now.

Now I thought it would be nice if I can have some kind of Shared Library where the core of the game is inside as a single project. Then I would create a project for Android specific and Windows specific and maybe later iOS specific.

I was thinking of "just" referencing this Shared Library in every platform project and using the games functions in there.

Is this a good idea and even possible? Because in my whole opinion it's redundant code if I create a project for every platform and put whole game code in every project. If I then want to change something, I need to change it for Android, Windows and later iOS too.

The only problem is, Android can only reference PCL libraries right? That's why the shared library must be a PCL then right? Which would be harder for me because I want to use Sockets since the game should get some kind of small multiplayer.

That's what I am thinking about for now.

I hope you guys know what I mean and if that's not the way I should do it please let me know how you guys would structure your whole project.

\$\endgroup\$
  • \$\begingroup\$ In your situation I would recommend trying a Shared Project. You can also use a PCL but it takes a bit more effort to setup. In any case I think you're on the right track, keep going. \$\endgroup\$ – craftworkgames Jun 13 '16 at 9:51
  • \$\begingroup\$ Yeah i decided to have a Shared Project :) \$\endgroup\$ – Johannes Jacobs Jun 14 '16 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.