Sign in to follow this  
JosephParrilla

XNA/SlimDx questions

Recommended Posts

JosephParrilla    171
Hey guys,,

So Ive been using XNA for a little while now and I must say its really nice coming from using Java. I am really mostly interested in 2D for games, but I really want to mess around with graphics programming as well. Since I dont plan on doing any Xbox/Windows Phone stuff, does it make sense for me to use SlimDX instead of XNA? From what I can tell, XNA is not just a simple wrapper around Direct3D for C#, but it completely covers up the Direct3D calls. Would it make sense for me to do my game development and graphics dabbling in SlimDX instead, so that I could use generic DirectX books and resources and easily apply them?

Im not really too concerned about the fact that XNA doesnt use the latest DirectX version, my concern is more about being able to use true Direct3D. The alternative to this, it to keep using XNA for my game development, and use normal C++/ Pure DirectX to learn 3D graphics programming. This is an option, but to me its just more of a hassle to use two different languages and technologies. If SlimDX is similar to XNA as far as 2D game capabilities, and also fully exposes the Direct3d API... it seems like it would make more sense to kill two birds with one language/API :) Any thoughts? I really do like XNA... but I want to be able to learn true Direct3D as well.

Share this post


Link to post
Share on other sites
[quote name='Joe P' timestamp='1312824540' post='4846268']
Hey guys,,

So Ive been using XNA for a little while now and I must say its really nice coming from using Java. I am really mostly interested in 2D for games, but I really want to mess around with graphics programming as well. Since I dont plan on doing any Xbox/Windows Phone stuff, does it make sense for me to use SlimDX instead of XNA? From what I can tell, XNA is not just a simple wrapper around Direct3D for C#, but it completely covers up the Direct3D calls. Would it make sense for me to do my game development and graphics dabbling in SlimDX instead, so that I could use generic DirectX books and resources and easily apply them?

Im not really too concerned about the fact that XNA doesnt use the latest DirectX version, my concern is more about being able to use true Direct3D. The alternative to this, it to keep using XNA for my game development, and use normal C++/ Pure DirectX to learn 3D graphics programming. This is an option, but to me its just more of a hassle to use two different languages and technologies. If SlimDX is similar to XNA as far as 2D game capabilities, and also fully exposes the Direct3d API... it seems like it would make more sense to kill two birds with one language/API :) Any thoughts? I really do like XNA... but I want to be able to learn true Direct3D as well.
[/quote]

Dude I find 3D with XNA hard enough... Don't you think it'd be easier to continue C# + XNA and learn more about 'game logic' without too much technicality slowing you down?
And then when your comfortable go on to C++ + DirectX?

Share this post


Link to post
Share on other sites
JosephParrilla    171
[quote name='Watermelon Chris' timestamp='1312826776' post='4846282']
[quote name='Joe P' timestamp='1312824540' post='4846268']
Hey guys,,

So Ive been using XNA for a little while now and I must say its really nice coming from using Java. I am really mostly interested in 2D for games, but I really want to mess around with graphics programming as well. Since I dont plan on doing any Xbox/Windows Phone stuff, does it make sense for me to use SlimDX instead of XNA? From what I can tell, XNA is not just a simple wrapper around Direct3D for C#, but it completely covers up the Direct3D calls. Would it make sense for me to do my game development and graphics dabbling in SlimDX instead, so that I could use generic DirectX books and resources and easily apply them?

Im not really too concerned about the fact that XNA doesnt use the latest DirectX version, my concern is more about being able to use true Direct3D. The alternative to this, it to keep using XNA for my game development, and use normal C++/ Pure DirectX to learn 3D graphics programming. This is an option, but to me its just more of a hassle to use two different languages and technologies. If SlimDX is similar to XNA as far as 2D game capabilities, and also fully exposes the Direct3d API... it seems like it would make more sense to kill two birds with one language/API :) Any thoughts? I really do like XNA... but I want to be able to learn true Direct3D as well.
[/quote]

Dude I find 3D with XNA hard enough... Don't you think it'd be easier to continue C# + XNA and learn more about 'game logic' without too much technicality slowing you down?
And then when your comfortable go on to C++ + DirectX?
[/quote]

That definitely makes sense. The thing is though, Im really not extremely interested in 3D for games right now. I wont really be concerned with "game logic" while doing 3D programming. I really enjoy 2D game development. I wanted to lean DirectX as more of a fun thing to do... you know. learn to write shaders, ligthing, etc, not related directly to games. I am kind of thinking about game development and 3D graphics programming as two totally separate things. Sure I might move on and use 3D in personal game projects eventually, but right now I kind of just want to mess with low level graphics engine stuff... and create some tech demo sort of applications. I figured that if Im really trying to learn graphics for graphics sake, and not for specific use in a game, it would make sense to use pure DirectX versus going through a game centered library like XNA. Basically I am wondering if I do mess with 3D in XNA, would any of the skills translate over to pure DirectX, or is it basically an entirely different beast? Obviously XNA uses DirectX, but that doesnt mean you will learn DirectX while using it. I mean, Unity3D uses OpenGL, but you wont learn a damn bit of OpenGL with it. :)

Share this post


Link to post
Share on other sites
Hmmmmm I'd learn them both at the same time then personally (since you'd be doing 2 separate things).. So that's C# + XNA and C++ + DirectX..
As far as how much you learn from XNA that can be applied to DirectX I'm not sure...

Share this post


Link to post
Share on other sites
JosephParrilla    171
[quote name='Watermelon Chris' timestamp='1312827849' post='4846289']
Hmmmmm I'd learn them both at the same time then personally (since you'd be doing 2 separate things).. So that's C# + XNA and C++ + DirectX..
As far as how much you learn from XNA that can be applied to DirectX I'm not sure...
[/quote]

You see, thats my dilemma :) For pure 2D game development, XNA is just perfect for me... and I really have no reason to go to something like SlimDX as it really wont give me any advantage in that regard. As for creating 3D graphical applications and writing tech though, I thought it might not be the best idea to do it through XNA, although it is certainly possible. I am possibly considering trying to spend the next few years doing graphics and potentially looking for a job in it, and because of this.... I thought it would be best to get closer to true Direct3D. Thats why I considered SlimDX, it would allow me to use C# (which I prefer over C++) for 3D graphics, it would allow me get a similar feel to XNA as far as my 2D games go (at least I think this is true, although from what I can tell SlimDX doesnt really help with game stuff like XNA does), it would allow me to learn actual Direct3D programming instead of XNA's wrap around it. So basically I could use the same language/API for both 2D game development and 3D graphics programming on the lower level. From what I can tell, using SlimDX and C# would easily translate to using pure DX and C++ later on... if I wanted to get a job in the field for instance.

Simply, if I want to pursue graphics programming seriously, I feel like doing it through XNA is probably not the best idea. I dont want a career in game development, so Ill use whatever I like the best for that because no one is judging me on it.. But graphics have always been extremely interesting to me, and I have done some openGL programming in the past and really enjoyed it, so I feel like it is a possible choice for an actual career. So learning a true graphics API seems like it makes sense.I just dont think I am prepared to deal with both C#/XNA and C++/DX simultaneously... I would rather focus.

Share this post


Link to post
Share on other sites
inavat    317
Game development and computer graphics are two worlds that happen to intersect very heavily, but they are different worlds. You simply have to figure out what you want. Things aren't that complicated.

If you want to make games, use XNA. XNA is for making games.

If you want to learn rasterizing-based real-time commercial computer graphics, use D3D or OpenGL. You don't need to write games to learn this realtime rendering techniques, and in fact slogging away at a game can hamper your progress. Writing a game involves loads of tedium that for the most part isn't instructive.

You want a career in game development, but what sort of career do you want? If you want to be a gameplay programmer, then you want to show gameplay. I personally feel that you shouldn't even be writing whole games; it's a waste of time. I think you're better served by finished, polished demos of gameplay techniques that show you've acquired mastery over them. But whether you choose to create demos or whole games, you could use XNA if you want to go C++ heavy or something like Unity3D if you truly want to focus on showcasing your implementation of gameplay-related algorithms.

If you want to be a graphics programmer, same thing. Don't write games, it's a waste of time. Show mastery of techniques with polished demos.

If you just want to make games as a hobby, then do whatever's fun.

Share this post


Link to post
Share on other sites
JosephParrilla    171
[quote name='A Brain in a Vat' timestamp='1312829055' post='4846297']
Game development and computer graphics are two worlds that happen to intersect very heavily, but they are different worlds. You simply have to figure out what you want. Things aren't that complicated.

If you want to make games, use XNA. XNA is for making games.

If you want to learn rasterizing-based real-time commercial computer graphics, use D3D or OpenGL. You don't need to write games to learn this realtime rendering techniques, and in fact slogging away at a game can hamper your progress. Writing a game involves loads of tedium that for the most part isn't instructive.

You want a career in game development, but what sort of career do you want? If you want to be a gameplay programmer, then you want to show gameplay. I personally feel that you shouldn't even be writing whole games; it's a waste of time. I think you're better served by finished, polished demos of gameplay techniques that show you've acquired mastery over them. But whether you choose to create demos or whole games, you could use XNA if you want to go C++ heavy or something like Unity3D if you truly want to focus on showcasing your implementation of gameplay-related algorithms.

If you want to be a graphics programmer, same thing. Don't write games, it's a waste of time. Show mastery of techniques with polished demos.

If you just want to make games as a hobby, then do whatever's fun.
[/quote]

Well I said in the above post.. I DONT want a career in game development. It is and always will be a hobby of mine... nothing more. Graphics on the other hand have many other applications beyond game programming, and I really think that is a solid career choice for me. I do want to be a graphics programmer, but I am not going to stop writing games completely. Sure I am going to have to take a ton of time away from writing games to focus on graphics and get really good, but Im not going to totally stop. I write my games for my own enjoyment and if anybody else enjoys them... well thats a bonus.

I want to take graphics programming seriously and find out if it is truly something I can see myself doing for a living.This isnt a question of whether I should make games or program graphics. I know I will continue to write games in my spare time regardless of my day job. I just think its time for me to focus in on a specific area of computing that interests me and I can have a job in some day. In the bit of OpenGl that Ive done so far, I really enjoyed. Also, it doesnt hurt that the graphics skills can help boost my hobby of writing games.

Saying that writing games is a "waste of time" if I want to be a graphics programmer is silly. I agree, writing games is not the road to being a good graphics programmer, but Im not using it as that. they are two totally separate goals of mine. I write games for fun and enjoyment. I dont think that It will make me a good graphics programmer. At the same time I need to have an actual career that I enjoy, and I want to have a crack at graphics because the field has interested me in the past. Bottom line, I want to be a full time graphics programmer, and a hobbyist game developer. There does not need to be any overlap of the two.

Share this post


Link to post
Share on other sites
inavat    317
Sorry, the part about you not wanting to enter game development as a career. Frankly, I think that's smart.

That's fine to do something as a hobby, I didn't mean to imply that you shouldn't.

If you really want to enter the computer graphics world in a way that's not bound to game programming, then you need to learn real theory rather than simply practical implementation. This is how you learn computer graphics as part of a Computer Science degree at a university: you learn the theory from the ground up, and it involves lots of math lots of topics that have absolutely zero to do with games.

Almost all non-game graphics work (even a lot of what comes out of Microsoft Research) is either in OpenGL (if they're doing realtime rasterized graphics) or it's done in software. So, regarding preparing yourself for that type of career, I don't think either XNA or D3D is a good choice.

Are you planning on going to school for this, or are you already in school? I ask because it's going to be very hard to enter a computer graphics-related career without a degree in Computer Science or some related field. That's even more true if you don't want to do games.

Share this post


Link to post
Share on other sites
inavat    317
And Ke-Sen Huang's [url="http://kesen.realtimerendering.com/"]repository of past SIGGRAPH conference papers[/url] will eventually be invaluable to you.

Share this post


Link to post
Share on other sites
JosephParrilla    171
[quote name='A Brain in a Vat' timestamp='1312830502' post='4846309']
Sorry, the part about you not wanting to enter game development as a career. Frankly, I think that's smart.

That's fine to do something as a hobby, I didn't mean to imply that you shouldn't.

If you really want to enter the computer graphics world in a way that's not bound to game programming, then you need to learn real theory rather than simply practical implementation. This is how you learn computer graphics as part of a Computer Science degree at a university: you learn the theory from the ground up, and it involves lots of math lots of topics that have absolutely zero to do with games.

Almost all non-game graphics work is either in OpenGL (if they're doing realtime rasterized graphics) or it's done in software. So, regarding preparing yourself for that type of career, I don't think either XNA or D3D is a good choice.

Are you planning on going to school for this, or are you already in school? I ask because it's going to be very hard to enter a computer graphics-related career without a degree in Computer Science or some related field. That's even more true if you don't want to do games.
[/quote]

Gotcha, just a misunderstanding. Games are fun to make and all, but to be honest... I know the reality of the field. I want to have a job that is both interesting, fun, and will not leave me poor :) I love writing 2D games, and I will always be up until 2am working on them. Working in a big game studio just doesnt appeal to me as a day job, I feel like I would enjoy writing graphics tech a lot more.

Ok back on topic. Yes I am in school... I am on my final year of my Bachelors in CS. My school doesnt have many graphics courses,,, although the one we do have I will be taking next semester. The only reason I considered using D3D is because since I am already using XNA for my hobby game stuff, I thought it would make sense to go graphics in D3D considering Im already sort of using it.

I have the linear algebra background as well, so I feel like I can grab onto the graphics stuff pretty well. Any more advice ?Are you thinking that it might make sense for me to just keep at XNA for my game stuff, but for serious learning about graphics... work on C++ and OpenGL?

Share this post


Link to post
Share on other sites
Starnick    1892
Well several things about XNA:

1. It's completely shader based, so it removes all the fixed-function pipeline stuff you'd find using the D3D 9 API directly. Additionally, they've made the API very similar to the Direct3D10+ API, so it doesn't quite resemble D3D9 anymore.

2. It is designed to be cross-platform (well, cross-platform with windows devices :)) some things that go for PC don't go for Xbox, or take the Windows Phone as it doesn't support custom Shaders. This is especially true for XNA 4.0 because they use magic and unicorns to create consistency (e.g. the Instancing API - and the magic/unicorns was the technical term used by one of their developers hehe).

3. On the other hand it's not like Unity, a lot of things (like working with effects, the graphics device, render targets, textures, and so on) will have an analogous object/functionality you'd be working with if you used the native API. XNA isn't a game engine, you're going to have to still create all that yourself, but it does give you an advantage with giving you a nice Game class, a content pipeline, and the idea of components/services to get started quickly, if you want to do games. So it does hold your hand sometimes, but you can still just use XNA as a wrapper for graphics functionality and ignore some of that fluff too.

SlimDX on the other hand tries to be minimal and replicate the experience of using the underlying D3D API directly, in most cases it's a one-to-one correspondence (although .NET-ified). So if you're serious about getting your hands dirty and learning the actual graphics API -and- use C#, then SlimDX would be what you want. Just like how OpenTK would be your best bet to use OpenGL with C#. The MSDN Direct3D docs or Direct3D tutorials out there can be applied to SlimDX very easily, and you'll probably be using the official documentation a lot, since SlimDX pretty much tells you to refer to them :).

Share this post


Link to post
Share on other sites
inavat    317
Just a little clarification. OpenGL and D3D are very comparable, and I think D3D is awesome -- frankly it's almost consensus that it's better than OpenGL these days. I suggested OpenGL if you're doing something regarding realtime rasterization simply because it's what everyone in non-game circles tend to use. You're welcome to buck this trend, as you see fit.

Sounds like you're well on your way. Start reading SIGGRAPH papers, if you haven't already. They'll give you an idea of what subtopics you might be interested in, and where the cutting edge research is.

A long time ago, I had to choose between a job at the Johns Hopkins University Applied Physics Laboratory, working to develop real-time 3D imaging techniques for guided cardiac surgery, and a game job. I picked the game job, and I often wonder if that was a poor choice.

Share this post


Link to post
Share on other sites
[quote name='A Brain in a Vat' timestamp='1312829055' post='4846297']
Game development and computer graphics are two worlds that happen to intersect very heavily, but they are different worlds. You simply have to figure out what you want. Things aren't that complicated.

If you want to make games, use XNA. XNA is for making games.

If you want to learn rasterizing-based real-time commercial computer graphics, use D3D or OpenGL. You don't need to write games to learn this realtime rendering techniques, and in fact slogging away at a game can hamper your progress. Writing a game involves loads of tedium that for the most part isn't instructive.

You want a career in game development, but what sort of career do you want? If you want to be a gameplay programmer, then you want to show gameplay. I personally feel that you shouldn't even be writing whole games; it's a waste of time. I think you're better served by finished, polished demos of gameplay techniques that show you've acquired mastery over them. But whether you choose to create demos or whole games, you could use XNA if you want to go C++ heavy or something like Unity3D if you truly want to focus on showcasing your implementation of gameplay-related algorithms.

If you want to be a graphics programmer, same thing. Don't write games, it's a waste of time. Show mastery of techniques with polished demos.

If you just want to make games as a hobby, then do whatever's fun.
[/quote]

Spot on I'd say, although if your not entirely sure on what to specialise in playing around with XNA might be beneficial. A year ago I thought web development is my future, few months after that it was desktop applications and now I'm into game dev... It pays to be some what experimental.

Share this post


Link to post
Share on other sites
JosephParrilla    171
Well I am fairly confident that I want to keep game making as a hobby. I really dont need to ruin something that I love to do by adding deadlines, a boss, etc.

Ive learned about a few fields of computing from graphics to AI to machine learning, and the one that really stood out was graphics. I must admit I havent done much, just some basic OpenGL, but what I did was a blast.

I just want to continue to make games as a hobby, but begin to hone in on graphics programming in an attempt to make a career out of it. If a super awesome graphics job in the game development field pops up, I guess I would do it. But my goal is not to do graphics as a way into game development. They are two different parts of my life... anyways, the vast majority of my game development interest is in 2D.

Share this post


Link to post
Share on other sites
JosephParrilla    171
[quote name='A Brain in a Vat' timestamp='1312831413' post='4846321']
Just a little clarification. OpenGL and D3D are very comparable, and I think D3D is awesome -- frankly it's almost consensus that it's better than OpenGL these days. I suggested OpenGL if you're doing something regarding realtime rasterization simply because it's what everyone in non-game circles tend to use. You're welcome to buck this trend, as you see fit.

Sounds like you're well on your way. Start reading SIGGRAPH papers, if you haven't already. They'll give you an idea of what subtopics you might be interested in, and where the cutting edge research is.

A long time ago, I had to choose between a job at the Johns Hopkins University Applied Physics Laboratory, working to develop real-time 3D imaging techniques for guided cardiac surgery, and a game job. I picked the game job, and I often wonder if that was a poor choice.
[/quote]

Thanks a lot. So would you say that for getting into graphics seriously, bare bones OpenGL and C++ is the way to go? My original post was made because I had some thought that I could use one API for both my game development and my graphics programming, even though I wasnt relating the two things. But now that I think of it, if I really want to be serious about graphics, it must make sense to use the actual graphics API and not wrap it with too much abstraction.

Share this post


Link to post
Share on other sites
Flimflam    665
Keep in mind that SlimDX, while an excellent library, is basically a direct copy of the original native DirectX library, with only very necessary changes made to make it possible. It preserves all the C++ style api coding which can be a bit of a culture shock to someone who is not used to C++ already.

If you're making games, it's perfectly reasonable to stick with XNA even if you have no intention on targeting WP7/360. It's a great library for writing Windows games. You'll be hard pressed to find need of a feature from SlimDX that isn't available in XNA if you are newish to writing games. The one obvious exception to this is gamepad support. I've used SlimDX in XNA projects merely for gamepad support, as XNA only supports the 360 controller via XInput.

Share this post


Link to post
Share on other sites
JosephParrilla    171
[quote name='Flimflam' timestamp='1312859226' post='4846504']
Keep in mind that SlimDX, while an excellent library, is basically a direct copy of the original native DirectX library, with only very necessary changes made to make it possible. It preserves all the C++ style api coding which can be a bit of a culture shock to someone who is not used to C++ already.

If you're making games, it's perfectly reasonable to stick with XNA even if you have no intention on targeting WP7/360. It's a great library for writing Windows games. You'll be hard pressed to find need of a feature from SlimDX that isn't available in XNA if you are newish to writing games. The one obvious exception to this is gamepad support. I've used SlimDX in XNA projects merely for gamepad support, as XNA only supports the 360 controller via XInput.
[/quote]

Thanks, Ive done more C++ programming than I would have liked to :) So Im fine with that. I think I might take some advice I got here and just keep using XNA for games, but to really explore graphics for graphics sake... use straight OpenGL with C/C++

Share this post


Link to post
Share on other sites
[quote name='Flimflam' timestamp='1312859226' post='4846504']
The one obvious exception to this is gamepad support. I've used SlimDX in XNA projects merely for gamepad support, as XNA only supports the 360 controller via XInput.
[/quote]

Sorry to hijack the thread but: http://www.gamedev.net/topic/607977-how-can-i-get-input-from-a-joypad-xna-or-directx/ you get an xbox 360 controller emulator! Genius! xD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this