Reputation: 33058
Just to do some tests I have exeuted Microsofts XNA sample "Shooter" on Windows 7, Windows Phone 7 and iPhone (using Monogame).
Besides the fact the Monogame runs the game in portrait instead of landscape, I have noticed that the movement of the player sprite behaves really different.
On Phone 7, you tap anywhere, keep your finger on the screen and while moving it, the sprite follows the movement relative to the finger.
On iPhone however, the sprite first doesn't move at all, then moves extremely fast and moves up to the screens bounds. This makes the player uncontrollable.
The code used is:
while ( TouchPanel.IsGestureAvailable )
{
GestureSample gesture = TouchPanel.ReadGesture();
if ( gesture.GestureType == GestureType.FreeDrag )
{
player.Position += gesture.Delta;
}
}
Does that have to be different for iOS?
Upvotes: 0
Views: 537
Reputation: 827
The MonoGame Team is working on achieving parity with XNA. There are a few hurdles but we still think these are surmountable.
The 2 areas in iOS we are hoping to get right for the MonoGame 2.5 release is Gestures and supporting Landscape mode properly.
I hope this helps.
D.
Upvotes: 1
Reputation: 26505
I haven't updated from GitHub in a little while, but when we started using MonoGame for a project we found the TouchPanel didn't work quite right.
It is a hard problem: how would you flatten event-driven touch events to a static class like XNA has?
To workaround it, we forked MonoGame to have our own TouchPanel implementation that just used regular C# events instead. This could be ugly if you need to support regular XNA as well.
Upvotes: 1