MonoGame issues on MacOSX

Posted by : at

Category : tutorial


MonoGame supports many platforms, including MacOSX, but there are some traps you can walk into when developing on Apple’s platform.

  • If you get strange exceptions during compiling, make sure you to remove all shader files from your contents (both the files and the references in .mgcb file itself). If build works without the shaders, it means your project works on Mac, you just have to install Wine to be able to compile the shaders during normal the compilation process.
  • MGCB Editor from the repository does not work on Mac. Extract and run this version of the editor, it should work. However, you can only open, edit and save content files with this, building probably won’t work.
  • To build contents on Mac, you have to use the command line tools the way it’s written on MonoGame’s website.
    1. run ‘dotnet tool install -g dotnet-mgcb’
    2. once it’s ready, cd into your contents folder, and you can use the command ‘~/.dotnet/tools/mgcb /rebuild Content.mgcb’ (or however your .mgcb file is called) to build your contents for the project
    3. Once the contents are built, you can compile and run your project without any issues

If you are developing on a Mac, chances are you want to run your game on an iPhone. If you experience UI freezes on the phone, look at this article for a possible solution.

Happ coding!


About Lajos
Lajos

Enterprise Java for a living. Video game development for the soul.

Email : lajbertgames@gmail.com

Website : https://lajbert.github.io

About Lajbert

My name is Lajos, a software engineer who decided to chase his childhood dream of becoming a video game developer. I have a long road ahead of me until I can release my first game, but the path taking me there is already very rewarding. There are many great people around the internet who spends time, energy and even money to make great tutorials, shares their Github repos and distribute knowledge, and this blog is my attempt to pay my respect to them and follow their lead of giving back to the community. You’ll find tips, tricks, bits and pieces of what I learned while working on my project, which is also my learning path, so if you see something on my blog that is incorrect or can be done better, please leave a comment, so we all can learn something. Currently I’m working on a simple, generic 2D engine called Monolith engine, built on MonoGame framework, but many of my ideas are generic, and can easily be translated to your favorite language or game engine. Hopefully you’ll find something useful here. :) You can find the source code of the engine with same projects in my Github repo.

Star
Categories
Useful Links