-
|
|
|
Hi there. I was just checking out XNA, and was wondering just how fast it can run. I played the Racing Game (awesome game by the way), but I had to turn off shadows, high detail, and post-screen effects, and lower it to 640x480. At those settings, I got 30 FPS at best, and there were still lots of times where I was below 20 FPS. I don't have a state of the art computer; it's a laptop with an AMD Turion 64x2, and ATI Radeon Xpress 1150, and 1GB of RAM. How detailed is that example game, anyways? What kinds of features is it using that causes it to be that slow? And also... I'm not looking to make a state of the art game, either. I do want it to be 3d, yes. But I'd like it to play smoothly, at the very least, on my computer. My little brother has a computer with a 1.7ghz Celeron and an NVidia GeForce FX5500, and I'd like it to run halfway decently on his as well, if possible. I know he can at least play Quake 3. :P The point I'm trying to get to is, how fast is XNA? Will I be able to make a game that plays smoothly on lower-end computers? Or, for example, would a game with Quake 3 level graphics run at half the speed?
|
|
-
|
|
|
Remember that Quake3 is highly optimized. I'm sure the racing sample can be heavily optimized as well, but it's not as it's intended for learning purposes. The graphics portion of XNA simply wraps around DirectX 9.0, so any overhead is insignificant since most games are limited on what the GPU can do and not on the CPU.
I highly doubt a FPS with Quake 3 level graphics will perform at half speed. Using the same algorithms, draw calls, shaders, etc of Quake 3 should yield about the same performance (plus or minus 5 percent).
|
|
-
|
|
|
Okay... So basically what you're saying is that XNA is powerful enough, but it depends on the programmer, right?
|
|
-
-
- (0)
-
premium membership
-
Posts
193
|
|
Sure, it depends on the programmer. Remember Quake 3 (to continue with the same example) was written by a team of tens over a period of a few years, the Racing Game demo was written by one guy over a couple of months. There are, undoubtedly, ways to speed it up, that would seriously aid performance, but these weren't investigated due to time constraints (among other things).
It also depends on the artists. A really good computer artist will know the best ways to improve the performance of the game (reducing poly count, texture detail, shader complexity...) without sacrificing the visuals. So, performance is by no means just a programmer consideration. :-)
And it also depends on the hardware, and probably a load of other stuff too... So I'd be wary of picking one game (or even a sample of games) and saying "this is hitting the limits of what C#/XNA can do." Chances are the limits are probably things other than the language used.
Pandemonium, an occasionally updated blog about my game, XNA, games development, and the games industry; XapParse, a parser for XAP (XACT) files
|
|
-
|
|
|
Okay, then. Thanks, guys! :)
|
|
-
|
|
|
Quake 3 is going on about 7-8 years old, if you can't run Quake3 then you shouldn't be playing 3D games on that computer. Not saying you can't, I'm just saying that as a generalization. As a comparison, I'm getting around 100fps on the racing game with something like 1280x760 (or whatever widescreen is around that size).
As far as speed, that is up to you. XNA can handle just about anything you can make. For example, I'm working with some others on an engine right now, and after some optimizations we're currently able to display an entire 1024x1024 terrain, at full LOD at around 150 fps with MSAA enabled, not occlusion yet. If I turn on the quad-tree culling I'm getting around 400fps.
Compare this to when I first got terrains implemented, months ago, I was getting 10fps. It is what you make it. Expecting a 3D FPS like Doom3 is fine, if you want to take the time to make it from scratch, XNA certainly isn't an engine, just a very helpful API.
|
|
-
|
|
|
XNA is very slow. Because .Net is slow, i.e. Managed code is weak, especially in math. I have 3-4 fps when i have ~700 spheres in Lord Ikon's engine ( engine is cool ) on P4 - 3.00 Ghz, 2 GB DDR II, 320 mb 8800 GTS, as note, engine is write well.
|
|
-
|
|
|
That's simply not true. The FPS you're experiencing may have one or more of the following reasons: - Drawing the 700 spheres is not done using instancing
- Your CPU can't handle the physics calculations of 700 objects at the same time
- The physics calculations are not optimized in the engine
|
|
-
|
|
|
I get about 10-12 fps with 700 spheres. And I don't have any physics culling. The physics you're seeing is almost completely unoptimized. Also, I'm not doing any graphics optimizations. The new engine will have all of this.
The fact 700 spheres causes a bad framerate is because of my lack of optimization.
I'm glad you like the engine, thank you. Hopefully we'll have the new engine out in a few weeks, it'll be much better, and not just written by me.
|
|
-
|
|
|
Whoa, didn't expect that much more conversation. 100FPS on the racing game?! At that resolution?! What kind of computer are you running?! Well, anyways, I noticed the quickstart engine of yours just now. Would it be practical to use for anything at all? Right now, I just want to get comfortable with whatever I'm gonna be using for my game. I noticed one thing disappointing about it, though; it doesn't have built-in support for normal gamepads. Do you plan on adding this?
|
|
-
-
-
- (1758)
-
premium membership
-
Posts
1,385
|
|
JohnK:XNA is very slow. Because .Net is slow, i.e. Managed code is weak, especially in math.
Please don't spout nonsense like this unless you're prepared to show real data to back it up. Those statements are patently false.
|
|
-
|
|
|
The original engine would be practical if you were starting a simple FPS game. However it lacks physics, messaging, networking, animation, and some other things that most people are going to want.
The original engine was began as a simple 3D game template, to get people started with basic physics, terrain, and a camera. I started adding a lot to it and decided I might as well go with an engine.
Depending on how new you are to C#, XNA, or programming in general it could at least be of use to learn some stuff, like heightmaps, quad-trees, lod patches, camera systems, skies, 3d particle systems, input handlings for multiple controls at once, reflecting and refracting water. Although the engine isn't meant for tutorial so you'd be learning from the code.
The engine we're working on now will likely be enough to get anyone started on just about any 3D game. We'll hopefully have something to release for testing in a few weeks to a month. But a full featured version will be a few months.
|
|
-
|
|
|
Twilight in Zero:I noticed one thing disappointing about it, though; it doesn't have built-in support for normal gamepads. Do you plan on adding this?
![]()
By normal gamepads I'm assuming you mean something other than Xbox360 gamepads? Support for that just recently came in XNA 2.0, which was towards the very end of the original engine. Support for it likely won't be added to it. The only support for the original engine will probably be bug fixes. The new engine will have all of the features of the original, plus a bunch more, including support for different gamepads.
|
|
-
-
- (16722)
-
premium membership
MVP
-
Posts
11,282
|
|
Lord Ikon: Twilight in Zero:I noticed one thing disappointing about it, though; it doesn't have built-in support for normal gamepads. Do you plan on adding this?
![]()
By normal gamepads I'm assuming you mean something other than Xbox360 gamepads? Support for that just recently came in XNA 2.0, which was towards the very end of the original engine. Support for it likely won't be added to it. The only support for the original engine will probably be bug fixes. The new engine will have all of the features of the original, plus a bunch more, including support for different gamepads.
Well XNA (1.0 or 2.0) doesn't support 'normal' gamepads at all. By normal I assume you mean non Xbox gamepads. 2.0 added better support for some other kinds of xbox controllers such as guitar, drums, flight stick and wheel but didn't add anything for the old DirectInput controllers
There is a component which wraps DirectInput and makes an API that looks like XNA.Input - its here http://sourceforge.net/projects/xnadirectinput/
Lord Ikon - check the license you can probably just include it with your engine and save yourself some time.
Playtest Kissy Poo - a game for 4 year olds on Xbox and windows The ZBuffer News and information for XNA Follow The Zman on twitter, Email me Please read the forum FAQs - Bug/Feature reporting Don't forget to mark good answers and good playtest feedback when you see it!!!
|
|
-
|
|
|
The ZMan [MVP/Moderator]:
There is a component which wraps DirectInput and makes an API that looks like XNA.Input - its here http://sourceforge.net/projects/xnadirectinput/
Lord Ikon - check the license you can probably just include it with your engine and save yourself some time.
Thanks for the tip. I'll check it out.
|
|
-
|
|
|
Yeah, I actually used that DLL in one of the XNA tutorials so I could control it with my PS2 controller. I think it's ridiculous that XNA only natively supports XBox 360 gamepads, but whatever... The engine's not working at all for me, though. So I'll go find your thread and post my issue there.
|
|
-
|
|
|
I've posted the fix to the issue in the other thread if you'd like. In the future though you can post the issue directly on the engine website, we'll see it much faster, so you'll get an answer quicker.
|
|
-
|
|
|
David Hunt, don't be naive. There's many test on the web, and they shows how fast C# in math. C++ have brutal speed. Look at Garage Games Engine - TorqueX. There's beta availiable. So in demo's ( FPS Demo ) when i tested physics, i has 1-2 FPS on my previous PC. ( P4 3 Ghz, 2 GB DDRII, 128 GeForce 6600GT ) I don't think that GG have lamers and newbies. i.e. C# is very weak in math. On my old PC, i also test Dungeon Quest, and there was 3-5 fps, i.e. XNA is weak too. It's all in comphrasion.
|
|
-
|
|
|
You're right about it all being in comparison.
I believe C# is shown to have a 3-5% overhead. So your comparison is like saying a Dodge Viper is weak.
A Dodge Viper is weak?! Sure, when compared to a McLaren F1. It's all relative.
|
|
-
-
- (16722)
-
premium membership
MVP
-
Posts
11,282
|
|
If you are going to make such claims then you really should back them up with official benchmarks or some credentials for yourself that mean we should take your opinion seriously.
For example here is a pure math only that that shows no real difference between managed and native http://www.grimes.demon.co.uk/dotnet/man_unman.htm here's one that shows the opposite http://www.osnews.com/story.php/5602/Nine-Language-Performance-Round-up-Benchmarking-Math-and-File-IO/page3/
TorqueX is in beta - not a fair comparison.
Dungeon quest was written in 3 days so has no optimisation at all.
Any decent XNA game is going to have a lot of its processing done in shaders - these are the same shaders used in a C++ version of the game with zero performance difference.
Sure in theory XNA cannot be as fast as a native DirectX implementation since there is obviously an extra layer of interop to go through but for the most part that layer is very, very thin and has been optimised very well.
Managed code and JIT compilers can provide code that runs just as fast as C++ - check out this series where managed expert Rico goes head to head with C++ expert Raymond. http://blogs.msdn.com/ricom/archive/2005/05/10/performance-quiz-6-chinese-english-dictionary-reader.aspx Raymond does eventually win - but at quite a cost.
It *IS* unfair to call XNA weak without something more than a few unrealistic examples - that is the nerve you touched with David. Coming into the XNA forum with such opinions is verging on trolling... maybe you can provide a more substantial post on why you think that.
Note that we are all well aware of the floating point issues on the 360.
Please do not let this thread degrade into name calling - it will just get locked or worse. We don't tolerate trolling in here for very long!
Playtest Kissy Poo - a game for 4 year olds on Xbox and windows The ZBuffer News and information for XNA Follow The Zman on twitter, Email me Please read the forum FAQs - Bug/Feature reporting Don't forget to mark good answers and good playtest feedback when you see it!!!
|
|
-
-
- (12254)
-
premium membership
MVP
-
Posts
8,672
|
|
It really doesn't matter if C# is slightly slower. It's certainly fast enough for high-end games as seen in the Racing Game sample game. That last few percent only comes if you really know how to dig in deep and possibly even write some assembly into your C/C++ code. Your average C++ programmer will likely not write programs that utilize those last few percent that C# allegedly cannot get. So it is safe to assume that the average C# program will be just as fast as the average C++ program assuming the writers were equally skilled in their language and spent equal amounts of time working on optimizations.
Also, JohnK, it's partly what you said, but also partly how you said it that got David in a more aggressive tone. Your first post on the boards and you were just spouting off what is, in the simple context given, blatantly wrong. By comparison at a very high end, sure C# is slightly slower. But to blanket it with a statement like "XNA is slow because .NET is slow and .NET sucks at math" (I know that's not quite what you said), is simply naive. Also your other post doesn't really have any concrete evidence either. The GarageGames demo is most likely more optimized than Dungeon Quest considering Torque is the work of years and years of man hours and Dungeon Quest, at least initially, was written by a single man in three days.
Again, it's all relative, but for all intents and purposes, anything you are likely to do in C++, you will be able to do in C# with just as much speed and power provided you are equally skilled in each language.
|
|
-
|
|
|
Guys, relax. There is no aggressiveness in my posts, i think its affects of convertation from Russian to Eng, because i dont know English language. How you say, everything in my post is falsehood, so, i think, in this case, you must simply correct me, because i saw what i know, and there is no agression, and flame things. But from your side, i see real agression. I really sorry, if i hurt you. I like C# more that C++, and i repeat, i say what i knew , and i think that it was correct. So, be casual, and dont be agressive to the noobs, like me.
|
|
-
-
- (16722)
-
premium membership
MVP
-
Posts
11,282
|
|
Apologies from everyyone if the aggression or trolling (I have no idea if that translates into russian !) was due to the language difficulties. Your english is good enough that it really wasn't that obvious (and I have signatures turend off so I didn't actually see that you made a comment ;-) ).
However it doesn't matter what language you speak - claims like this need to be proven with more than a couple of pointers to beta or out of date products:
"XNA is very slow. Because .Net is slow, i.e. Managed code is weak, especially in math."
"There's many test on the web, and they shows how fast C# in math. C++ have brutal speed....i.e. XNA is weak too"
Playtest Kissy Poo - a game for 4 year olds on Xbox and windows The ZBuffer News and information for XNA Follow The Zman on twitter, Email me Please read the forum FAQs - Bug/Feature reporting Don't forget to mark good answers and good playtest feedback when you see it!!!
|
|
-
|
|
|
So, i have no links. I wasn't check this before typing the text. So, it's looking like "I saw its there, but don't know where." And its showing lamer in me. So, all peoples, sorry for my errors. I must shut up in this kind of themes.
|
|
|