a couple days ago I started game developing in MonoGame with Visual Studio 2017 and porting my code which i wrote in WinForms to MonoGame. Now I have a problem with the fullscreen mode. I searched the internet and the only thing I found out is that it depends on the resolution the monitor has.
In the default window mode of the application the screen looks like follows:
Now when I switch to fullscreen mode - this happens:
Now my problems are:
- One can not see it on the picture because I used the print button and pasted in to paint but the image is largely strechted.
- The right part of the screen is cut off
- the sprites are moved to the top.
I'm using
graphics.ToggleFullScreen();
Is there a way to keep the original status like it is in window mode? Maybe to put flexible bars for a 4:3 mode and keep the sprite positions? My positions are fixed. So use something like
spriteBatch.Draw(Params.CUR_SPRITE_P1, new Rectangle(Convert.ToInt32(POSITION_P1.X), Convert.ToInt32(POSITION_P1.Y), 750, 476), Color.White);
for the player position and the screen (to implement scrolling).
Or maybe adjust everything in full screen mode bu keep the positions of the sprites on different screen resolutions...
Thank you a lot!
question from:
https://stackoverflow.com/questions/65926503/problem-with-fullscreen-resolution-in-mono-game 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…