Game Engine Programming in XNA
#1 Members - Reputation: 111
Posted 04 August 2012 - 08:49 PM
Like there are Big Game Engines developed in C++ using Direct3D.
Unity3D.
UDK.
And Many Other.
If its not possible than is it possible in just C#?
Like i tried to find the Direct X tutorials for C# but failed to find any good one.
So that's my question Is it possible to make a Perfect Game Engine in XNA or at least in C# using Direct3D?
#2 Members - Reputation: 255
Posted 05 August 2012 - 02:29 AM
You CAN make a good engine with both XNA and DirectX. Which to choose depends on many things.
I would not go for the combination C# and DirectX though, since the API is written for C++, and Microsoft's wrapper is outdated.
#3 Members - Reputation: 1050
Posted 05 August 2012 - 03:47 AM
Of course cross platform might not be one of your aims. If you want to use C# with directX your only options now are XNA (much higher level though), slimDX or sharpDX. SlimDX is apparently the more mature project.
Either way its possible to make a game engine using C#. Perfect is a separate matter, what I see as perfect you may not see as perfect.
Edited by 6677, 05 August 2012 - 03:52 AM.
#6 Members - Reputation: 166
Posted 06 August 2012 - 03:41 AM
I think it might work for a game engine for small and fun games but you lose a lot of performance next to C++ engines I guess
Check out my blog, where I document my learning process in game development:
http://nighttimedeve...nt.blogspot.de/
Always thankful for help.
#7 Members - Reputation: 516
Posted 06 August 2012 - 04:36 AM
I think you also have to remember what C# is lacking compared to C++. If you wan't to do a real game engine a big part of it is that system layer with memory management and the likes. There you need direct memory manipulation.
I think it might work for a game engine for small and fun games but you lose a lot of performance next to C++ engines I guess
Yeah. For number crunching, C# is still a bit slower than C++ for various reasons (I really hope to get SIMD-support in the MS CLR) and there's always going to be some overhead when calling the native DirectX API from managed code. However, almost all current "real" games I play are GPU-bound (on my system), so the CPU-overhead isn't really noticeable in a lot of cases.
If you primarily want to create an engine, I would suggest going with SlimDX or, if you're really concerned about performance, SharpDX, because they are closer to native DirectX and offer more freedom. If you want to create a game though, I have to say that XNA is probably "good enough" for the majority of projects while offering some nice abstractions and tools.
Edited by lwm, 06 August 2012 - 06:48 AM.
my last project: Roa. working on something new now.
#8 Members - Reputation: 1050
Posted 06 August 2012 - 04:19 PM
If you are looking to make a full on engine then slimDX or sharpDX should be your windows choice, if cross platform support is needed then OpenTK would be your other choice. These are much lower level API's. slimDX and sharpDX are straight wrappers of directX, almost impossible to get any lower, OpenTK I think has a few simplifications over bog standard openGL, there is also the Tao framework which seems to be a dead project. These will offer alot more control and flexibility in your engine that you won't get with XNA or monogame. XNA is stuck on directx 9 aswell whereas both slimDX and sharpDX can do 9, 10 and 11.
#9 Members - Reputation: 107
Posted 21 October 2012 - 01:27 AM
If you want to see a simple 3D game engine using XNA 4, you can have a look at mine on my web site. It is used in a tutor on making a game engine.
I hope that helps anyone who comes across this.
Thank you for your time.
else DoNot();






