Monogame: Multiplatform Open Source Game Development With
Monogame: Multiplatform Open Source Game Development With
MonoGame
Dominique Louis, Kenneth Pouncey, Dean Ellis
What is MonoGame?
Open Source implementation of XNA 4.0 API OpenGL, OpenTK, OpenAL
What Platforms?
1m+ sold
History of MonoGame
XNATouch on codeplex.com(Jos Antonio Leal de Farias (Jalfx)) XNA, MonoXNA, SilverSprite Wanted to get into the App gravy train v1.0 was iOS only, by 1.5 (Mac and Android) Just after v1.5, Geoff Norton (Novell) @geoffnorton helped us migrate to github v2.0 release and backing from Team Xamarin helped it get massive visibility.
How we work?
8 core maintainers All pull requests are peer reviewed If you submit enough patches... Automated Tests
Run against XNA and MonoGame to ensure conformance Run unattended
Demos
Vector Rumble Catapult (mobile) VideoPlayer Role Playing Game
AndroidManifest.xml Changes
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="MyGame.Android"> <application android:label="MyGame" android:icon="@drawable/icon"> <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> </application> <uses-sdk android:minSdkVersion="8" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> </manifest>
Sometimes ads do not appear This usually because there are no ads available. Only occurs on new accounts Cannot position ads Currently android.view.GRAVITY is not available look up the values on android developer documents
Matchmaking
Publish an instance of the game for others to discover and join the game. Available through NetworkSession.Create and NetworkSession. BeginCreate Discovering an instance of a game to join. Available through the NetworkSession.Find and NetworkSession.BeginFind methods, which return a collection of AvailableNetworkSession instances. AvailableNetworkSession exposed properties.
public static AvailableNetworkSessionCollection Find( NetworkSessionType sessionType, int maxLocalGamers, NetworkSessionProperties searchProperties); AvailableNetworkSessionCollection availableSessions; int maximumLocalPlayers = 1; availableSessions = NetworkSession.Find( NetworkSessionType.SystemLink, maximumLocalPlayers, searchProperties);
Players
Exposed from the NetworkSession object, along with events indicating when players join or leave the session. Determine which player is host (NetworkSession.Host) and which players are local (NetworkGamer.IsLocal).
// Listen for invite notification events. NetworkSession.InviteAccepted += (sender, e) => NetworkSessionComponent.InviteAccepted(screenManager, e); if (NetworkSession.IsHost) { // Program logic here only if we are the hosting session }
Note: SendDataOptions passed to SendData Choose the value for options that are appropriate for the type of data being sent. Not all game data needs to be sent reliably, Sending excessive data using SendDataOptions. ReliableInOrder can cause client to lag
Example Game
CatapultWars CatapultNetWars
The Future
MonoGame v2.5 very soon Tonnes of bug fixes Fully ES 2.0 (GLSL shaders!) MonoGame v3.0 soon, too 3D API ( Thanks to Inflight Dev Studio ) HLSL Shaders
MonoGame's Future
API Extended networking support DirectX 11 backend for Metro CellSDK( http://www.cellsdk.com/ ) Networking ( alternative to Xbox Live ) Built-in advertising support. Platforms PlayStation Suite (started, but SDK is influx) Google 'Native Client' ( Bastion ) Raspberry Pi
Contact
Dominique Louis Twitter : @SoftSavage Email : [email protected] Kenneth Pouncey Twitter : @cocoamono Email : [email protected] Dean Ellis Twitter : @infspacestudios Email : [email protected] IRC #monogame, irc.gnome.org
Questions ??
monogame.codeplex.com(discussions) github.com/mono/MonoGame
Low-Friction Testing
MonoGame Build Bot
Queries the GitHub API Submits to the MonoGame Build Coordinator IRC Hubot from the GitHub Team For example
mgbot test develop mgbot test @kjpou1 a840f0e... mgbot test @mono pull 275
Build Node
Per-platform Runs on Linux, Mac and Windows iOS and Android are in development Polls the Build Coordinator for new builds Claims a build Fetches the source, applies patches Builds MonoGame Builds and runs the test assembly Submits results to the Build Coordinator