Pablo Marty
2012-08-21 22:58:57 UTC
Hi Ladies and Guys
I have found out what my problem was: a simple, but very important SDL bug. As I had told you before, the keyboard input didn t move my character (Mario) ... and I was ignoring the Events class in order to introduce multithreading to my program
I tried in a new simple program, that just tests these functions (Keyboard.IsKeyPressed(Key) and Mouse.IsButtonPressed(MouseButton))
and they ALWAYS return false, that s they don t recognize the key press and the mouse button press
// this app never ends or crashesusingSdlDotNet;usingSdlDotNet.Graphics;usingSdlDotNet.Input;usingSystem.Drawing;namespace
{KEYBOARDclassProgram{
{
{
}
}
}
}publicstaticvoidMain()Video.Initialize();Video.SetVideoMode(800, 600, 24);for( ; ; )Video.Screen.Fill(Color.Orange);Video.Screen.Update();if(Mouse.IsButtonPressed(MouseButton.PrimaryButton)) break;if(Keyboard.IsKeyPressed(Key.Escape)) break;
Can you confirm this and tell me how to solve it? It seems there are not too many list members that use C# with SDL, but I supposse and hope that someone is able to terminate with this problem ... my Mario game really was getting very nice
Thank you very much
Pablo
Asesinar y comer un perro o un gato es lo mismo q hacerlo a una vaca, un pollo, un cerdo o un pez. El genocidio no discrimina. No seas complice de genocidas. No seas genocida. En la vida tarde o temprano todo vuelve. No comas cadaveres. No seas necrófago.
I have found out what my problem was: a simple, but very important SDL bug. As I had told you before, the keyboard input didn t move my character (Mario) ... and I was ignoring the Events class in order to introduce multithreading to my program
I tried in a new simple program, that just tests these functions (Keyboard.IsKeyPressed(Key) and Mouse.IsButtonPressed(MouseButton))
and they ALWAYS return false, that s they don t recognize the key press and the mouse button press
// this app never ends or crashesusingSdlDotNet;usingSdlDotNet.Graphics;usingSdlDotNet.Input;usingSystem.Drawing;namespace
{KEYBOARDclassProgram{
{
{
}
}
}
}publicstaticvoidMain()Video.Initialize();Video.SetVideoMode(800, 600, 24);for( ; ; )Video.Screen.Fill(Color.Orange);Video.Screen.Update();if(Mouse.IsButtonPressed(MouseButton.PrimaryButton)) break;if(Keyboard.IsKeyPressed(Key.Escape)) break;
Can you confirm this and tell me how to solve it? It seems there are not too many list members that use C# with SDL, but I supposse and hope that someone is able to terminate with this problem ... my Mario game really was getting very nice
Thank you very much
Pablo
Asesinar y comer un perro o un gato es lo mismo q hacerlo a una vaca, un pollo, un cerdo o un pez. El genocidio no discrimina. No seas complice de genocidas. No seas genocida. En la vida tarde o temprano todo vuelve. No comas cadaveres. No seas necrófago.