Jump to content

  • Log In with Google      Sign In   
  • Create Account


Game Engine Programming in XNA


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 StevenZer   Members   -  Reputation: 111

Like
0Likes
Like

Posted 04 August 2012 - 08:49 PM

So I have this Question all over my head. Is it possible to create a perfect Game Engine in XNA?
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?

Sponsor:

#2 SamiHuutoniemi   Members   -  Reputation: 259

Like
0Likes
Like

Posted 05 August 2012 - 02:29 AM

Define perfect!

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 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 05 August 2012 - 03:47 AM

Only issue I can forsee is that alot of higher end engines are crossplatform whereas XNA and directX aren't. OpenGL can be used from C# on mono with either Tao, OpenTK or the mono XNA equivelant: Monogame.

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.


#4 StevenZer   Members   -  Reputation: 111

Like
0Likes
Like

Posted 05 August 2012 - 03:07 PM

So Which one i should choose to Start with?
XNA, OpenTK , SlimDX or SharpDX?

Edited by StevenZer, 05 August 2012 - 03:08 PM.


#5 j-locke   Members   -  Reputation: 815

Like
0Likes
Like

Posted 05 August 2012 - 05:06 PM

I think telling us your goals would help people give you a more useful opinion.

Why are you making this engine? What void are you intending to fill with it? What platforms do you want this to be usable on?

#6 AlexF   Members   -  Reputation: 166

Like
0Likes
Like

Posted 06 August 2012 - 03:41 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
Student of Computer Science - Digital Media and Games

Check out my blog, where I document my learning process in game development:
http://nighttimedeve...nt.blogspot.de/

Always thankful for help.

#7 lwm   Members   -  Reputation: 1397

Like
1Likes
Like

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.

current project: Roa


#8 6677   Members   -  Reputation: 1058

Like
1Likes
Like

Posted 06 August 2012 - 04:19 PM

It really depends on what your going for, if your only making 1 game then going full hog and making an engine is probably not worth the time and effort so the higher level tools offered from XNA or monogame will be more worth your time (make games not engines seems to get chanted alot). Which of the 2 you choose really depends on the platform, XNA has more tutorials available but if you need mac and linux support then you will have to use monogame, much of the XNA tutorial content should apply to monogame as the aim of the project is to create an open source XNA for mono.

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 LanceJZ   Members   -  Reputation: 108

Like
-2Likes
Like

Posted 21 October 2012 - 01:27 AM

Making a game engine even for one game is a good thing, if you ask me. It may take a week to create a game engine, but then it would only take you a few days to create the game.
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.
if (Try()) Do();
else DoNot();




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS