Windows 8 Samples
Game Loop – JavaScript version only:
For WPF you can use :
using System.Windows.Media;
//...
public void Init() {
CompositionTarget.Rendering += CompositionTarget_Rendering;
}
//...
void CompositionTarget_Rendering(object sender, EventArgs e)
{
game.RunOneFrame();
}
For a controlled C# thread use:
if (Stopwatch.IsHighResolution)
{
PeriodicTimer = ThreadPoolTimer.CreateTimer(async(timer) =>
{
//Update:
while (GameRunning)
{
Stopwatch s = new Stopwatch();
s.Start();
Update();
while (s.Elapsed.Milliseconds < 8 )
{
//Spinning!
}
}
}, TimeSpan.FromMilliseconds(0));
}
MonoGame Source Code – Github.
MonoGame WebSite – Codeplex
Building Data and Services – Azure/ASP.net for High Scores!
XInput Windows Runtime Wrapper – Xbox Controller support:
Share Contracts – Sending data from one app to another. (Saddly WIN8 lost the ability to render XAML to PNGs)
Cloud Storage – Saving data that gets synced on all devices.
