pros of sticking with directx(bad phraising)

Started by
18 comments, last by gharen2 16 years, 1 month ago
Quote:Original post by Mr_Threepwood
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.

And want to bet on how much undefined behavior your code relies on, how many bad or dangerous practices you use?

You already mentioned one: Pointers. The fact that you use (rely on) naked pointers is a pretty big hint that you're not far *enough* along C++'s learning curve. Which means you might not be in a position to judge how steep it is.

And since you seemed unaware of some pretty fundamental stuff in other languages aswell (object copies), I doubt you're qualified to compare the relative steepness of *those* languages' learning curves. [wink]
Advertisement
Quote:Original post by Spoonbender
Quote:Original post by Mr_Threepwood
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.

And want to bet on how much undefined behavior your code relies on, how many bad or dangerous practices you use?

You already mentioned one: Pointers. The fact that you use (rely on) naked pointers is a pretty big hint that you're not far *enough* along C++'s learning curve. Which means you might not be in a position to judge how steep it is.

And since you seemed unaware of some pretty fundamental stuff in other languages aswell (object copies), I doubt you're qualified to compare the relative steepness of *those* languages' learning curves. [wink]


Alright fair enough, I'm definitely not qualified to judge the languages. Was just saying that from as far as learning C++ goes it's not out of the question to use it as a starting language.

I don't know what a naked pointer is, and it's hard to find a clear definition so I very well could be using them (I'm not using void pointers is all I know). Thinking back, I should have known about the object copying thing since when you pass an object to a method in Java you can change it and it stays changed out of the function scope, so it's a reference, whoops.

As far an undefined behavior goes, what do you mean? Is there a quick example that would show me?

After I work through my current book (Programming role playing games with DirectX) maybe I should just take some time to learn the language some more.
(imo) C++ is out of the question as a starting language. It has its uses for some stuff, but providing a straightforward platform to learn programming is not one of them.

A naked/bald pointer is a nice plain normal C++ pointer. It's used to distinguish between them and smart pointers like boost::shared_ptr and the generic "pointer" which refers to anything that behaves like a pointer.

A nice simple contrived example of undefined behavior:

int x = 4;std::cout << x++ << --x << std::endl;std::cout << x << std::endl;

It sounds like I would be more proficient in xna as well as being less complex. But from the sounds of some of it, does directx offer any benefits to a hobbyists with a pretty good understanding of the language or is it mainly for professionals who can be proficient in it?
Sorry once again for the bad phrasing.
Quote:Original post by Telastyn
(imo) C++ is out of the question as a starting language. It has its uses for some stuff, but providing a straightforward platform to learn programming is not one of them.

A naked/bald pointer is a nice plain normal C++ pointer. It's used to distinguish between them and smart pointers like boost::shared_ptr and the generic "pointer" which refers to anything that behaves like a pointer.

A nice simple contrived example of undefined behavior:

*** Source Snippet Removed ***

Like all the stuff I've written about...

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

Another thing is I am currently not on vista so I can't use dx10 but does dx9 and the directx sdk have anything over xna? What benefits are gained?
On the question of picking whether or not to go (c++ / c#) DX9/10 or jump into (c#) XNA as a hobbyist. I would have to say c# only because of the ability to play your games on the XBox (ha-ha wow we can put our games on a console! thats new! ha-ha-ha).

The reality of it is that we have c++ jocks and c# jocks that always think that their language is better. Don't listen to 1/2 the people that just want to make their language community bigger, learn a language and then learn another one, and another one! c# is a very attractive language, but I would still pick c++ over c# any day. I will say this though, learn the language and how to be a programmer not how to make games. Games are just another form of software!

My main reason for staying with c++ over c# was the speed. After someone told me that the c# DX examples where running faster and with a better frame rate then c++, I had to see it for myself. The c++ code in those examples is horrible! If you take any code and code them both very efficiently, the c++ version will spank the c# version. Try it some day. I did on a radix sort with a binary merge of 16 million numbers on my colleges multiprocessor CPU's.

But if you want to be a hobbyist and not become of professional, learn C#. But if you ever want to make it into the game industry learn both languages and a few others.

Quote:I borrowed some books from the library and it seemed pretty hard and some what long to do. (Not bashing it at all).


Sometimes some languages are hard a first if your unfamiliar with language. But that passes in time as with all languages. No matter which graphics library you chose they will all be hard if you don't have the mathematics background to support your venture into 3d programming.
I see what your saying about learning the language beyond the want just to design a game. A concern of mine is with directx though, is that it won't be update like xna(with it as the announcement and as a major release).
XNA is not a DirectX replacement, though. They're similar, but they have very different goals and target audiences.
Quote:Original post by mysockshurt
I see what your saying about learning the language beyond the want just to design a game. A concern of mine is with directx though, is that it won't be update like xna(with it as the announcement and as a major release).


Xna is a fancy, high level wrapper around DirectX, so by definition this shouldn't be a concern.

You'll always be able to do more with directx than you can do with xna, just with more effort.

This topic is closed to new replies.

Advertisement