In all fairness, they have a reference. It could be a little more verbose here and there, but it's also a volunteer effort - so I can understand that they prioritize keeping the engine up to date and fixing its bugs over writing documentation.
​
So in the case I linked above, each of the SamplerStates would have a description pointing to the respective filter and address mode. I'm assuming that's just a summary tag in the source, if anyone's up for it. I am busy with work travel lately or else I'd consider it, I've been meaning to find a way to give back haha.
why do you think fna is better? You can only target the PC. With monogame you can target PC (windows, Linux, macos), XBOX one, Switch, Android, ios, ps4.
ii also recommend using the latest dev build (3.7)
I highly suggest Learning C# by Programming Games 2nd Edition. I got it on Kindle and use the Windows desktop app to have it side by side with Visual Studio.
I'm primarily using it to learn Monogame but it is written for people without C# experience so it covers a good amount of language related stuff as well.
Keep in mind that while this will expose you to C#, it isn't going to help you learn to structure non-game applications or use the various UI frameworks available for general application development.
I would definitely recommend picking up some materials on design patterns and/or algorithms and data structures to supplement your learning.
Yes.. why in gods name would you use ‘text editors’? Download Visual Studio Code!
https://code.visualstudio.com/download
As far as migrating... it’s a little more difficult. I am, however, migrating one of my projects this week. Do me a favor and PM me so I’ve got a reminder to publish my findings.
oh interesting... Mine just crashes... I installed it via the nuget repo on my Mac... there's nothing in my Applications so I am starting it via the cmd line with ~/.dotnet/tools/mgcb-edit... it opens briefly and crashes/gives crash report. kinda sucks
This model is included when installing Magicavoxel and was probably exported from that tool.
It's an amazing tool, but does indeed generate a ton of vertices and faces for seemingly simple models.
You want image magick
I've used it (not with c#) and it can access layers, but has a few caveats, such as not being able to know the layer name (big deal). I do know it has bindings for c# though.
The download page has the installer for macOS.
I believe it works with Visual Studio for Mac but if not it does work with MonoDevelop. Make sure you have those installed before trying to install MonoGame.
http://www.monogame.net/documentation/?page=main
https://msdn.microsoft.com/en-us/library/bb203940.aspx
Should be able to find most things in at least one of these two. If not, there's usually someone online here that can help, also the monogame forums.
Nope! The latest version includes a content pipeline (no XNA required)! Here's a link to the docs on how to use the pipeline tool. Don't forget to set the content type to "Copy" when you add a piece of content to your project.
There's a book called XNA 4.0 Game Development by Example which teaches how to create that exact kind of asteroid system. It is 30 usd but you seem like you might be a beginner and I can't recommend it highly enough.
The Vector2-class that Monogame uses is part of the Microsoft.Xna.Framework namespace, if i remember correctly.
And there are some templates you can install for monogame via dotnet:
https://www.nuget.org/packages/MonoGame.Templates.CSharp/
My buddy and I recently released the first public build of Vex Block on Android and IOS made with Monogame. We put a lot of work into perfecting the mechanics and love the current result! We sure would appreciate your support and feedback!
iOS LINK: https://apps.apple.com/us/app/vex-block/id1560245531
ANDROID LINK: https://play.google.com/store/apps/details?id=com.Eisensluff.VexBlockAndroid&hl=en_US&gl=US
For my own games I just use the default XML stuff, I just load into an XmlDocument and traverse through it. I never really worked out a good way of getting it to work with the content pipeline, I mean there's a way to directly serialise and deserialise into objects but it sorta sucks if the data needs to be processed at all. The issue with the content pipeline is that it has a step for processing and XML files don't really need that, and if you set it to copy in the pipeline tool then you can't access it through the content manager anyway. I was thinking of making a pipeline extension for just converting it into binary and back again, but it's somewhat pointless.
What I do is use the Path.Combine() function along with the ContentManager's RootDirectory property to properly construct a path to the resource. I include the XML in Visual Studio and set it to "Copy if newer", and have the file be somewhere in the content folder (depending on what it's for).
I also made a library you can use for loading values from XML nodes, because it becomes really tedious having to check if the attribute exists, try to parse the string, etc. Just include the package and a using for LiruGameHelper.XML, then you have access to a bunch of extension methods for XmlNodes. So you can just do int spriteIndex = spriteNode.ParseAttributeValue("SpriteIndex", int.Parse).
You're probably doing extra work if you're going to parse it yourself. That's all already built into the .NET XML serialization libraries.
http://www.codeproject.com/Articles/483055/XML-Serialization-and-Deserialization-Part
Monogame will work with these libaries. Monogame works with all .net libraries. I use XML serialization in my own Monogame project in fact.
You say you created a .NET Standard MonoGame project, yet AFAIK .NET Standard is supposed to be for creating libraries for any .NET implementation (.NET Framework or .NET Core).
​
If you want to create a cross-platform game using .NET Core, a good place to start would probably be with a project created using the OpenGL MonoGame package that's available on Nuget (which will run on Windows, MacOS, and Linux).
I have never worked with steamworks, but the .NET bindings are on NuGet and afaik if you just get the package from nuget, it'll take care of everything...
Content.Load
isn't supported any more, the proper method is Texture2D.FromFile
or Texture2D.FromStream
.
More details can be found here http://www.monogame.net/documentation/?page=M_Microsoft_Xna_Framework_Graphics_Texture2D_FromFile
​
I've never tried it with sound effects, but I assume they work the same way.
I'm no expert on Monogame, or coding in general, but I'm not sure what your "origin: origin" part of your code is doing, it's not something I've seen in any tutorials I've looked through. My guess is it's something with that causing the warning.
The simplest way I know how to do draw is spriteBatch.Draw(Texture2D texture, Vector2 position, Color)
"Color" is the tint on the sprite, if you don't want a tint, you use "Color.White".
Here's a useful tutorial that I used: http://rbwhitaker.wikidot.com/monogame-2d-tutorials
You can also look through the various overloads of the Spritebatch.Draw method on the Monogame website:
http://www.monogame.net/documentation/?page=T_Microsoft_Xna_Framework_Graphics_SpriteBatch
Hope this helps.
Just solved this for myself this morning. On http://www.monogame.net/downloads/, scroll down on to the development build for mac and install that.
I ended up doing a few different things, but this one made it work finally. If it doesn't help you, I can retrace my steps and see if I can't come up with something.
Check the internal exception, it will contain more details on what went wrong. Most likely the asset can't be found which means it's not copied into your bin folder. Check out the docs or the forum for more information.
Docs: http://www.monogame.net/documentation/?page=Using_The_Pipeline_Tool
There is a bit of info here: http://www.monogame.net/documentation/?page=Using_The_Pipeline_Tool
But realistically, any XNA tutorial should work. http://rbwhitaker.wikidot.com has some, and there's also the Microsoft documentation
This isn't true. The MonoGame team uses many different IDEs. vscode is my and other core dev's favorite.
Setting up MonoGame with vscode is much easier, here are the steps.
cmd
or run
command prompt however you choose.dotnet new --install MonoGame.Template.CSharp
(this will add monogame template to dotnet core)dotnet new mgdesktopgl -o MyGame
(MyGame can be called your project)cd mygame
code .
When you've done step 1 to 4 at least once, the next time you want to create a new game, you simply do step 6 to 9.
To publish the game:
dotnet publish -r linux-x64 -c release dotnet publish -r osx-x64 -c release dotnet publish -r win-x64 -c release
Extensions to get in vscode:
I just released a real-time leaderboard for my first game Beat The Clock.
The leaderboard stores no personal data, and only asks the user for a display name. I didn't want to use Google's own implementation as I wanted the leaderboard to be cross-platform and to be available without people having to sign in.
They're looking pretty bare at the moment, and I'd love to see some scores on there.
You can download the game here: https://play.google.com/store/apps/details?id=com.BeatTheClock
Link of the game on the play store if you want to try if for yourself (free, no ads, no in app purchases): https://play.google.com/store/apps/details?id=com.rouli.maskup You can also play the windows port or download the apk on itch: https://rouli.itch.io/mask-up
I made Mask Up on my free time in the last six month, with monogame. I always compiled the game on my phone to test it, and did the windows port in the last week (which was very easy to do). The hardest technical things for me were:
Creating a custom shader (first time with HLSL and had trouble with android's shader compatibility)
Surprisingly, dealing with colors, since I found out colors are totally differents depending on the screen of the device, so I had to find the best average which was not easy to do at all and very frustrating.
Dealing with the Play Store console.
Saving data on android
Of course, I also often had trouble with motivation, and faced doubt during the whole process but in the end, I don't regret my decisions. I'm glad I made it to release even if it's not that big of a game. I often lurk in this sub and really enjoy the stuff I see here, thought it was a good oppurtunity to post here myself.
Link to the game you released on Google Play? Perhaps people don't advertise they use Love2D, but the only other game I've seen on Android is Fault which is pretty cool!
I don't expect to be an expert on Monogame after the tutorial, and I don't think you expect that either! I thought most of the sections were right on the money. Nothing a quick pause and/or rewind to re-review something if you were going a little too fast, or if Visual Studio was being a pain with the { } and I'd have to reformat them.
I think a nice Love2D -> Monogame cross reference could be really helpful for those that have taken both courses, such as how ipairs
and foreach
are basically the same thing with a different look. I know the data structures are very different too, but seeing a Love2D equivalent would help me wrap my mind around the Monogame versions too.
It was a good base coat to show how to do common tasks, but it is really up to the viewers to take what they've learned and expand upon it.
I look forward to whatever else you release in the future!