Bad performance on Windows compared to XNA and FNA, is there a way to improve it?

Hi,

I have a game that’s in the works for many years, I started on XNA and the graphics were fully optimized a year ago or so (basically, all the costly stuff were placed in a single texture sprite batch), I’m planning to release it next year and I’d like to use Monogame since XNA is dead for almost 4 years now. Being able to support OSX is also desirable. I’m having some problems though.

On XNA the game runs just fine, I’ve ‘ported’ it to Monogame, the code is almost identical, but the performance hit was considerable. I’ve also tried FNA and although it’s much faster than Monogame it’s still not on the level of XNA, it’s somewhat acceptable though. I read that FNA is better because it uses SDL, is it possible to use SDL in Monogame too, at least on Windows? Or even better, is it possible to achieve the XNA level of performance with Monogame? I already tried the usual suspects, double checking blend mode and making sure the build is on release with optimizations, and all that stuff. So far on FNA I’m having 3/4 of the FPS of XNA and on Monogame I’m having 1/3. I don’t think there’s anything else to optimize really, the game use a lot of sprites in some scenes and that is the problem I think. If I could reach the same performance from XNA I won’t need to change the graphics, but otherwise I will have to think about downgrading them a bit to support more machines. Maybe a low quality option, but I’d just like to extract the raw performance if that’s possible at all, the game doesn’t leave much room for that kind of setting and it’s going to be a pity since the arts were so fine tuned through many years.

I know XNA doesn’t support newer DirectX versions (latest is 9, which is terrubly old), and also it has problems on newer versions of Windows, so I don’t want to use it, but if it’s not possible to achieve the performance on Monogame, is it OK to still release a game using XNA or should I just use FNA perhaps? I’m not sure what are the implications of using either and I guess FNA is more recommended, but it’s still not 100% so if there are no big problems in using XNA maybe I could just use it and if problems appear in the future I could release a Monogame version, hopefully on par in terms of speed.

Any input is really appreciated. Thank you very much

Is FNA F# MonoGame?

A bit new to it and seen it mentioned a bit recently… Web searches prove… Silly…

Thanks in advance, sorry for sidetrack…

@MrValentine FNA is a Monogame alternative. And according to what I’ve read, and from @Tato informations, it looks like it’s good.

1 Like

Any links?

I will likely stick with XNA MG as it has more resources but I would like to see more info…

Thanks.

Is a reimplementation. Uses SDL2 and other libs. Fna. Please reply me if you can get it work, I had troubles with unmanaged dlls.

1 Like

Also, if you’re using Nez (UI), either MG and FNA works.

FNA started as a fork of MonoGame that concentrated solely on the three desktop OpenGL platforms and strict XNA 4 compliance. We don’t offer support for FNA here. It has its own support channels.

Latest MonoGame uses SDL2 as well for desktop OpenGL platforms.

2 Likes

Doesn’t MG utilise DX11.1 at the moment?

@KonajuGames any idea how to improve Monogame’s framerate?
Here in this case, massive use of spriteBatch makes MG running at one third of XNA’s speed.

@Tato which version of MG are you using? (DesktopGL? SlimDX?)

@raizam You don’t always have to use Sprite Batch… you can draw your update draw calls anywhere… if you can optimise it that way, give it a go, there are a lot of performance enhancements that you can adapt…

Possibly relevant Post on StackOverflow

This is why I love bing… LOL?

Some higher up stuff relates to another dev tool, but here is my search phrase:
Clicked To Bing>

I’m not the one using SpriteBatch @MrValentine :slight_smile:

But I would be curious how manual draw calls are performing as well.
We would need more benchmarks I think.

Umm then why ask this?

Do you have any new keywords in your Draw() method?
MG’s SpriteBatch should be faster than XNA, as for FNA, i don’t know.

MonoGame offers DX11 and OpenGL on Windows.

1 Like

MG SpriteBatch 1679fps

XNA SpriteBatch 602fps

<mic drop/>

2 Likes

very impressive
I feel better now :slight_smile:

2 Likes

I always say, It is most likely your code, try to improve that first, move it into another language say Python to see if you see any difference…

Once you have jumped through the optimisation hoop, Look at your toolset, the framework, in this case MonoGame/XNA etc.

Then consider your hardware… or do this first… :scream:

Try latest develop branch if you’re having performance issues. It’s pretty stable in general and a lot has changed since the last release.

Or that too yeah :dizzy_face:

LMAO
You made my day =)

1 Like