Monogame: New Official MonoGame Sample Projects

Created on 10 Jun 2020  路  10Comments  路  Source: MonoGame/MonoGame


With more MG users popping up lately on the official forum, I feel it would be helpful to have new up-to-date sample projects that they can run and learn from. Up until now, we've been relying on XNA samples, but those are slowly becoming unavailable. Some people learn better from diving into the samples than reading up on documentation. This is also an opportunity to cover more game development-specific concepts that the XNA samples didn't address.

Samples may include:

  • Pong
  • Simple top-down Sokoban
  • A simple game state machine (similar to the XNA sample)
  • Generic cross-platform project template: multiple platform-specific projects with shared code (I see this asked about a lot)
  • And more

These samples should use open, royalty-free assets if required, with proper attribution, and ideally run on vanilla MonoGame.

What version of MonoGame does the bug occur on:

  • N/A

What operating system are you using:

  • N/A

What MonoGame platform are you using:

  • All

Most helpful comment

If you guys make some more up to date samples repo for 3.8, I'll throw in a free web version for each sample! What a deal! :P

All 10 comments

I have a perfect Pong game: http://harry-cpp.com/Pong :smiling_imp:

The biggest hurdle we've had is keeping samples up to date. They often fall behind the changes in the code base or the templates etc.

What could help would be making the building of all the samples part of the automated build process. So at least we know they all compile successfully.

But as far as them functioning it would have to be manual testing for now.

If we have stable MG-in-a-browser, we could automate the build and deployment of a few samples and then any community member could easily manually test by playing the game online. Throw in a "File a bug" button that links to the github issues page. Of course this doesn't test any of the platform code or tools.

I'm certainly open to keeping the samples repo up to date, or even converting a few select XNA samples from the XNA Game Studio Archive if needed.

However, keeping them up to date @tomspilman should be a lot easier post 3.8 if they are updated to the new project format. I believe one user did submit a PR for that but I'd have to check

Generic cross-platform project template: multiple platform-specific projects with shared code

As to the above @tdeeb all the samples in the MonoGame.Samples repo are built cross-platform, all sharing the same codebase.

Although if you feel a blank template would be needed as another example, that can certainly be put together quite sharpish. Although it would also need a short'ish tutorial series to support it.

I'm certainly open to keeping the samples repo up to date

My issue has always been we've had too many and they were all either rehashes of old XNA samples or generally not good looking. I would prefer one or two great looking samples than dozens of poor ones.

If we are going to have old XNA ones we should pick a couple of the nicer ones. We want to show off 2D games and 3D games.

We could get them hooked up to the build server so they stay up to date to the latest MG changes.

If we are going to have old XNA ones we should pick a couple of the nicer ones. We want to show off 2D games and 3D games.

Completely agree @tomspilman

But I think the 3 we have in the MonoGame.Samples repo isn't too many and could do with a few more (we were trying to get the race car one added at one point). The older repo isn't even maintained anymore I don't think.

The ones we have are small, concise and well laid out as far as I'm aware.

But agree, the samples are all mostly 2D (with the exception of Spacewar, which is only supported on Windows), so we should try and have a nice looking 3D sample

Although if you feel a blank template would be needed as another example, that can certainly be put together quite sharpish. Although it would also need a short'ish tutorial series to support it.

I would certainly like to see this with the new .NET Core project templates. This is a question that comes up every now and then in the forums.

If you guys make some more up to date samples repo for 3.8, I'll throw in a free web version for each sample! What a deal! :P

Created a new issue on the Samples repo to discuss and track this request.

https://github.com/MonoGame/MonoGame.Samples/issues/50

This issue should now be closed here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jjagg picture Jjagg  路  5Comments

MontyHimself picture MontyHimself  路  5Comments

NET-D3v3l0p3r picture NET-D3v3l0p3r  路  3Comments

willmotil picture willmotil  路  5Comments

dazinator picture dazinator  路  5Comments