pros of sticking with directx(bad phraising)

Started by
18 comments, last by gharen2 16 years, 1 month ago
Even though a lot of my posts seem odd(going from xna to c++ to directx to c# help). There was reason for that. For one club we did c++ programming so I learned the specifics of c++(things I did not know with c#) and I found it pretty enjoyable. I was playing around with xna because it seemed very easy to use and pretty fun but with my new found knowledge of C++, I decided to take a look at win32 and directx programming. I borrowed some books from the library and it seemed pretty hard and some what long to do. (Not bashing it at all). I see a lot of people talking about it on the forums and was curious about directx and ways to get into it(I know you need a baring on win32 first). I know knowledge is never lost as well as time because you are learning something new, but with not many new books on it as well as microsoft's site mainly dedicated to xna, is it still a good idea for a hobbyist to get into directx? Thanks a lot
Advertisement
Either way, you should avoid C++ and get stuff done. There is C# bindings for the straight DX stuff (google slimDX) if you're focusing more on eye candy demos than the game itself.
Unless, as a hobbyist, you intend to go down the professional development route eventually, taking the DirectX route over XNA may not prove to be very fruitful or particularly enjoyable. One of the biggest hints is how Microsoft is treating hobbyists. Hobbyist work is shuttled down the XNA route with plenty of wonderful learning resources and forums and the like. C++ DirectX resources are very much geared for the serious game studio developer. So even if you get somewhere with C++ and DirectX, you need to ask yourself, in the end, as a hobbyist, so what?
Quote:Original post by oler1s
Unless, as a hobbyist, you intend to go down the professional development route eventually, taking the DirectX route over XNA may not prove to be very fruitful or particularly enjoyable. One of the biggest hints is how Microsoft is treating hobbyists. Hobbyist work is shuttled down the XNA route with plenty of wonderful learning resources and forums and the like. C++ DirectX resources are very much geared for the serious game studio developer. So even if you get somewhere with C++ and DirectX, you need to ask yourself, in the end, as a hobbyist, so what?


It is also important to note that some people do enjoy a challenge. Half the fun is in the learning as they say.

It took me ages to settle on C as my language of choice, but once I did I found it very rewarding.
I don't understand this whole "C# is easier than C++" thing that everyone says, probably because I've never actually tried C#, but still C++ isn't really that intimidating. The only negative aspect I've encountered with C++ so far has been the ability to shoot yourself in the foot, whereas other languages I've tried (java, VB) try to prevent it. Once you get used to C++ I think it's a very nice, and makes going back to the other ones frustrating since you can't use pointers and know that it's wasting so much run time of stuff like making copies of entire objects.

As fir the DirectX vs XNA question, it's pretty much up to you. DirectX will be a harder learning curve, but it's got a lot of functionality and lets you do low level stuff. I've never used XNA myself, but it looked alright to me. Learn whichever one you want, it's not like learning either one won't benefit you, since most of the graphic techniques used are similar regardless of libraries.
Edit

Forum's been acting strange for me, I clicked submit and got an error on page so I pressed back and submitted, which caused accidental double post.
Quote:
It is also important to note that some people do enjoy a challenge. Half the fun is in the learning as they say.

It took me ages to settle on C as my language of choice, but once I did I found it very rewarding.


But nobody likes wasting their time fighting with complexity when they don't have to. If you want a challenge, work on a harder game/problem with the best tools available rather than tying one hand behind your back.


Quote:Original post by Mr_Threepwood
I don't understand this whole "C# is easier than C++" thing that everyone says, probably because I've never actually tried C#, but still C++ isn't really that intimidating. The only negative aspect I've encountered with C++ so far has been the ability to shoot yourself in the foot, whereas other languages I've tried (java, VB) try to prevent it. Once you get used to C++ I think it's a very nice, and makes going back to the other ones frustrating since you can't use pointers and know that it's wasting so much run time of stuff like making copies of entire objects.


I think you've made a fairly large, incorrect assumption (beyond the fallacy that bald pointers are commonly used in modern c++). Copies of entire objects (other than numeric primitives) are very, very rare in Java and the .NET languages. class = expression; does not copy as it would in C++; it's a reference assignment. Just as much overhead as a pointer assignment with none of the danger.
Quote:Original post by Telastyn
Quote:
It is also important to note that some people do enjoy a challenge. Half the fun is in the learning as they say.

It took me ages to settle on C as my language of choice, but once I did I found it very rewarding.


But nobody likes wasting their time fighting with complexity when they don't have to. If you want a challenge, work on a harder game/problem with the best tools available rather than tying one hand behind your back.


True. But it is important to keep your ultimate goal in mind when picking a language. If you want to do low level system stuff, it seems rather silly to start with Visual Basic for instance.

C (for me at least) was a good choice given my ultimate goal.
Quote:Original post by Mr_Threepwood
I don't understand this whole "C# is easier than C++" thing that everyone says, probably because I've never actually tried C#


well then :)

Quote:but still C++ isn't really that intimidating. The only negative aspect I've encountered with C++ so far has been the ability to shoot yourself in the foot, whereas other languages I've tried (java, VB) try to prevent it.


All useful languages more or less allow you to shoot yourself in the foot. The problem with C++ is the difficulty of avoiding it. If you haven't been working with it as long as I (or other "established" posters) have, there's a quite high chance that you shoot yourself in the foot regularly without even realizing it. (If only in that you miss simpler ways to get things done.)

Quote:Once you get used to C++ I think it's a very nice, and makes going back to the other ones frustrating since you can't use pointers and know that it's wasting so much run time of stuff like making copies of entire objects.


Um, no. Try reading some of these.

Quote:Original post by Zahlman
All useful languages more or less allow you to shoot yourself in the foot. The problem with C++ is the difficulty of avoiding it. If you haven't been working with it as long as I (or other "established" posters) have, there's a quite high chance that you shoot yourself in the foot regularly without even realizing it. (If only in that you miss simpler ways to get things done.)



Ok thanks for the link, I was under the impression that the other languages used object copies by default when you passed them into functions doSomething(myObject), but I guess that was wrong.

I may very well be shooting myself in the foot regularly in C++, but in terms of getting it to compile and run without problems I haven't had any issues. I try to follow the logic used in programming books I have, but I'm sure I'm missing something. Another thing is I originally learned Java as a first programming language, so I often find myself trying to implement things in C++ the way I would in Java which sometimes requires unnecessary workarounds.

Still though, I haven't found the learning curve on C++ that overwhelming. The worst part for me so far was when I was first beginning with pointers, and getting OOP working right, after that it's just been "learn a bit here and there" when I'm working with it.

This topic is closed to new replies.

Advertisement