A Collection of MonoGame Samples

Dominique Louis 72e6fea554 Ensure we set packetWrite.Position to 0 after all the data has been sent. This avoids corruption. преди 3 седмици
2DShaderSample 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец
AdMob 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
Aiming 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
Audio3D 686484dc50 Audio3D - Revert Package References to something more generic. преди 1 месец
BackgroundThreadTester 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
BatteryStatus 154ccc36e5 Better Way of having platform specific Battery Info. преди 1 месец
BloomSample 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
BouncingBox 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
CardsStarterKit 2a8db7af10 Fix UIUtility spelling. преди 3 седмици
CatapultNetWars 90d8e27c3f [CatapultNetWars & NetworkStateManagement] Changes to support better scaled rendering. преди 3 седмици
ChaseAndEvade 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
CollisionSample 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
Colored3DCube 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
CompiledContent 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
Draw2D 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
FarseerPhysics 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
Flocking 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
GameComponents 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
GameDevelopmentbyExample 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
GameStateManagement 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
GooCursor 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
Graphics3DSample 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
HoneycombRush 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
Input 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
InputReporter 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
LensFlare 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
MonoGame.Xna.Framework.Net 72e6fea554 Ensure we set packetWrite.Position to 0 after all the data has been sent. This avoids corruption. преди 3 седмици
MultiTouch 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
NetRumble 52b26332ba Comment out shader calls. Fix Join Session crash. преди 3 седмици
NetworkPrediction a77d6f8962 Ensure PacketWrite.Position is set to 0 after SendData, so data is passed between peers. преди 3 седмици
NetworkStateManagement 90d8e27c3f [CatapultNetWars & NetworkStateManagement] Changes to support better scaled rendering. преди 3 седмици
Orientation 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
PacMan 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец
Particle3DSample 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
ParticleSample 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
Peer2PeerSample f00458c573 Remove Rider files. преди 3 седмици
PerPixelCollisionSample 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
PerformanceMeasuring 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
Primitives 177b9c2f2c Ensure all projects have a .config directory. преди 1 месец
ReachGraphicsDemo 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
RectangleCollisionSample 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
RenderTarget2DSample 4d66891287 Ensure all Android entry points are called MainActivity преди 3 седмици
RockRain 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
RolePlayingGame 06170ac625 Tweak Collision layer in Map002 and 3. Add Android/iOS VSCode launch items. преди 1 месец
SamplesContentBuilder e119c561c9 Update README to table. Added splash.png преди 1 месец
ShadowMapping 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
ShatterEffectSample c0debecc71 Add PrivateAssets to Processory library. преди 1 месец
Sound 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
SpriteEffects 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
SpriteFont 8c10312e56 SpritFont - Refactor to build on iOS. преди 1 месец
StarWarrior 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
StateObjectWindows 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец
StencilsCratersTutorial 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
Storage 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
Tetris 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
TexturedQuad 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
TiledSprites 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец
TouchGesture 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
TransformedCollisionSample 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец
UseCustomVertex 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
VideoPlayer 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
VirtualGamePad 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
Waypoint 5a1fb288f4 Ensure all Core files have PreserveAsset set to all. преди 1 месец
WpfInteropSample 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец
.gitignore 1ccaef909f Update shatter effect fx - Model needs replacing (#52) преди 1 месец
README.md ff0471b090 Removed CatapultWars from README преди 3 седмици
SamplesContentBuilder.sln 787aa50223 History Reset and Projects updated to SDK and MG 3.8.* преди 1 месец

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.
CatapultNetWars 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
2DShaderSample 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.
ParticleSample Particle systems and effects.
Primitives Drawing primitive shapes (lines, points).
RectangleCollisionSample Rectangle collision detection.
RenderTarget2DSample 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.
BloomSample Bloom post-processing effects.
Colored3DCube Renders a colored 3D cube.
Graphics3DSample Advanced 3D graphics techniques.
LensFlare Lens flare post-processing effects.
ReachGraphicsDemo Demonstrates Reach profile graphics features.
ShadowMapping Demonstrates shadow mapping techniques in 3D.
ShatterEffectSample 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
Peer2PeerSample 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.
SamplesContentBuilder 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.