A Collection of MonoGame Samples

CartBlanche aaf891c553 Add HUD and Player Death 1 ماه پیش
.github 101d3e2c26 remove sample- prefix to zip files. 3 ماه پیش
AdMob 177b9c2f2c Ensure all projects have a .config directory. 5 ماه پیش
Aiming 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
Audio3D 686484dc50 Audio3D - Revert Package References to something more generic. 5 ماه پیش
BackgroundThreadTester 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
BatteryStatus 154ccc36e5 Better Way of having platform specific Battery Info. 5 ماه پیش
BloomEffect ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
BouncingBox 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
CardsStarterKit ef6c9fa6c4 Refactor to change background colour to Burgundy and simplify project names. 1 ماه پیش
CatapultWars 2e41350860 Fix missing gradient file. 3 ماه پیش
ChaseAndEvade 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
Collisions 873b536d73 [Collisions] Fix to get build green and not building native. 3 ماه پیش
Colored3DCube 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
CompiledContent 177b9c2f2c Ensure all projects have a .config directory. 5 ماه پیش
ContentBuilder ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
Draw2D 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
FarseerPhysics 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
Flocking 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
GameComponents 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
GameDevelopmentbyExample 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
GameStateManagement 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
GooCursor 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
Graphics3D ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
HoneycombRush 177b9c2f2c Ensure all projects have a .config directory. 5 ماه پیش
Input 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
InputReporter 177b9c2f2c Ensure all projects have a .config directory. 5 ماه پیش
LensFlare 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
MonoGame.Xna.Framework.Net 581f0a46b8 Fix a better way to pick-up logged in user. 1 ماه پیش
MultiTouch 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
NetRumble 14c83af4f1 Refactor to make GlobalTransformation static. 5 ماه پیش
NetworkPrediction a77d6f8962 Ensure PacketWrite.Position is set to 0 after SendData, so data is passed between peers. 5 ماه پیش
NetworkStateManagement 3c18749a68 Try to make Find Sessions more reliable in the networking samples. 3 ماه پیش
Orientation 4d66891287 Ensure all Android entry points are called MainActivity 5 ماه پیش
PacMan 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* 6 ماه پیش
Particle2D ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
Particle3D ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
Peer2Peer dbb5e87cc3 [Card Game] Add LAN Networking and Extra Polish (#55) 2 ماه پیش
PerPixelCollision ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
PerformanceMeasuring 177b9c2f2c Ensure all projects have a .config directory. 5 ماه پیش
Primitives 177b9c2f2c Ensure all projects have a .config directory. 5 ماه پیش
ReachGraphicsDemo 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
RectangleCollision ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
RenderTarget2D ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
RockRain 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
RolePlayingGame 06170ac625 Tweak Collision layer in Map002 and 3. Add Android/iOS VSCode launch items. 5 ماه پیش
Shaders2D ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
ShadowMapping 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
ShatterEffect ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
Shooter aaf891c553 Add HUD and Player Death 1 ماه پیش
Sound 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
SpriteEffects 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
SpriteFont 8c10312e56 SpritFont - Refactor to build on iOS. 5 ماه پیش
StarWarrior 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
StateObjectWindows 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* 6 ماه پیش
StencilsCratersTutorial 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
Storage 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
Tetris 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
TexturedQuad 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
TiledSprites 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* 6 ماه پیش
TouchGesture 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
TransformedCollision ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
UseCustomVertex 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
VideoPlayer 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
VirtualGamePad 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. 5 ماه پیش
Waypoints2D 7194635eac [WayPoint] Refactor for more consistent naming. 3 ماه پیش
WpfInterop ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
.gitignore 1ccaef909f Update shatter effect fx - Model needs replacing (#52) 5 ماه پیش
CONTRIBUTING.md aa38e4988a Add contributing guidelines for MonoGame-Samples 3 ماه پیش
LICENSE 4c879a400a Add MIT License file 3 ماه پیش
README.md ebab8df603 Rename directries to remove Samples. Update README. 5 ماه پیش
SamplesContentBuilder.sln 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* 6 ماه پیش

README.md

MonoGame Samples

This repository contains a collection of cross-platform MonoGame samples and game projects that should compile on Windows, macOS, Linux, iOS and Android. Each sample demonstrates different game development concepts, features, or genres. For detailed information about each sample, see the linked README in each sub-directory.


How to Contribute

I welcome contributions to the MonoGame Samples repository! Here's how you can get involved:

  1. Report Issues: If you find a bug or have a suggestion, please open an issue in the repository.
  2. Submit Pull Requests: Fork the repository, fix bugs and modernise the samples, and submit a pull request. Be sure to follow the coding standards and include detailed descriptions of your changes or enhancements.
  3. Improve Documentation: Help me improve the documentation by editing or adding to the README files.
  4. Share Your Samples: If you have a MonoGame sample you'd like to share, feel free to contribute it to the repository. Alternatively help port the older XNA samples, so we have a centralised resource for all MonoGame game developers.
  5. Donate to the MonoGame Foundation: If these samples have helped you create your game, release it and your made some money off it it, conside donating to the MonoGame Foundation, so we can continue to keep it FREE for everyone else to have a hit game with :)

Quick Links


Game Samples

Project Description
AsteroidBeltAssault
Cards Starter Kit Card framework showing how to implement a Blackjack game.
FloodControl
HoneycombRush Arcade-style honeycomb collection game.
CatapultWars Single Player and Networked multiplayer catapult game. Works on LAN
PacMan Cross-platform Pac-Man clone.
RobotRampage
RockRain Arcade-style falling rocks game.
RolePlayingGame RPG sample with tile engine and menus.
StarWarrior Classic space shooter sample.

2D Samples

Project Description
Shaders2D Custom 2D shader effects in MonoGame.
Aiming Aiming mechanics and input handling.
BouncingBox Simple physics sample with bouncing boxes.
Cards Starter Kit Card framework showing how to implement a Blackjack game.
ChaseAndEvade AI sample showing chase and evade behaviors.
CollisionSample Collision detection techniques.
Draw2D Basic 2D drawing and sprite rendering.
FarseerPhysics Physics engine integration sample.
Flocking Flocking AI behaviors.
GameDevelopmentbyExample 4 2D samples from the "XNA Game Development by Example" book. Namely: AsteroidBeltAssault, FloodControl, GemstoneHunter, RobotRampage
GameStateManagement Sample for managing game states and screens.
GooCursor Custom cursor rendering and effects.
HoneycombRush Arcade-style honeycomb collection game.
Input Input handling for keyboard, mouse, and gamepad.
InputReporter Displays live input values for controllers.
MultiTouch Multi-touch input support.
PacMan Cross-platform Pac-Man clone.
Particle2D Particle systems and effects.
Primitives Drawing primitive shapes (lines, points).
RectangleCollision Rectangle collision detection.
RenderTarget2D Render-to-texture techniques.
RockRain Arcade-style falling rocks game.
RolePlayingGame RPG sample with tile engine and menus.
StarWarrior Classic space shooter sample.
TouchGesture Touch gesture and mouse support.
Waypoint AI navigation and waypoint sample.

3D Samples

Project Description
Audio3D 3D audio positioning and effects.
BloomEffect Bloom post-processing effects.
Colored3DCube Renders a colored 3D cube.
Graphics3D Advanced 3D graphics techniques.
LensFlare Lens flare post-processing effects.
ReachGraphicsDemo Demonstrates Reach profile graphics features.
ShadowMapping Demonstrates shadow mapping techniques in 3D.
ShatterEffect 3D shatter effect demonstration.

Networking Samples

Project Description
CatapultNetWars Single Player and Networked multiplayer catapult game. Works on LAN
MonoGame.Xna.Framework.Net Networking API compatibility sample. Partially implemented for Peer 2 Peer, LAN games
NetRumble Networked multiplayer space shooter. (NOT working yet)
NetworkPrediction Networked gameplay prediction and synchronization. Works on LAN
NetworkStateManagment The project template for most of the networked games in this repo, that use a Lobby. Works on LAN
Peer2Peer Peer-to-peer multiplayer tank demo. Works on LAN

Miscellaneous Samples

Project Description
AdMob Integrate AdMob ads into a MonoGame project.
BackgroundThreadTester Using background threads in game logic.
BatteryStatus Battery status and power management.
CompiledContent Pre-built content files for other samples.
GameComponents Using and managing game components.
ContentBuilder Build and load content assets using MonoGame's content pipeline.
Sound Cross-platform sound playback.

For platform-specific details, build instructions, and troubleshooting, see each sample's README.