Switching from Java OpenGL to C++ DirectX 3D

Started by
10 comments, last by Promit 5 years, 9 months ago

I need advice or tutorial links from anybody that wants to help, but I'm trying to make a game using UWP, DirectX, and C++, because I need it to be able to upload to the Xbox Creators Program, https://www.xbox.com/en-US/developers/creators-program.

 

Judging by the responses and the information that I have received, I have decided to try and use C# to make a game using UWP and DirectX, considering my past experience and the similarities between Java and C# far surpass the ones between Java and C++.

Thanks for all of the helpful responses! 

Advertisement

Do you already have some experience in C++ and/or Direct X, or are you a rank beginner?

15 hours ago, Gnollrunner said:

Do you already have some experience in C++ and/or Direct X, or are you a rank beginner?

I have very minimal experience in C++, and no experience in DirectX

2 hours ago, chuffrey said:

I have very minimal experience in C++, and no experience in DirectX

Any chance I can push you towards C#? It's still fully UWP capable, you can still use DirectX, but it will be dramatically easier to move into from a Java background.

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

ive worked with it learn c++ and java ive had worked with directx before it can be a little tricky the libraries have to be in a certain order 

hello 

3 hours ago, jlandersadam@hotmail.com said:

ive worked with it learn c++ and java ive had worked with directx before it can be a little tricky the libraries have to be in a certain order 

Ok Well first off I'll point you here:

https://www.3dgep.com/introduction-to-directx-11/

It's very basic but at least it compiles and runs with the latest Visual Studio and it's also up to date.

Second I should warn you that Microsoft made a bunch of changes to Direct X and so a lot of the stuff in old DX11 programming books is out of date and won't compile or run without going through a couple hoops. However since you said UWP you probably want to use the new stuff anyway. You can read something about the changes to Direct X here.

https://blogs.msdn.microsoft.com/chuckw/2013/08/20/living-without-d3dx/

Frank Luna's books used to be excellent. Unfortunately his DX11 book is now out of date like the rest. It might be worth picking it up anyway and using it in conjunction with other sources. That's what I'm doing (mainly because I already had the book) but I'll say it's a bit iffy. Unfortunately I can't find a really good up to date Direct X11 book. I'm not sure one exists.

As for C++ the main difference you will have to deal with is the lack of a garbage collector, so you need to understand memory management. I strongly recommend using smart pointers (i.e. reference counting). That being said you shouldn't use them willy nilly. I tend to only use them where an object references another in a manner that implies ownership.  In functions I typically just expand things to normal pointers to avoid the overhead. Also if you have something like a back pointer, say a child object that points back to a parent, you typically want to use a straight pointer for that too, otherwise you get a nasty loop.  It's kind of a zen thing you have to get used to.  The standard library gives your smart pointers in the form of the std::shared_ptr template and the like. You can read about it here

https://msdn.microsoft.com/en-us/library/hh279674.aspx

I typically roll my own by having a smart object base class with a reference count in it, but people tend to yell at you a lot for not using the standard library.  Do what works for you.

The other thing about memory allocation is that when you get more advanced you tend to build your own allocators. Of course new and delete work fine, but for performance reasons people often build slab allocators and stuff like that. I literally have a memory allocation library that I've built up over the years with all sorts of allocators. You can read about "placement new" if you are curious. The name is a bit deceptive. It's just a facility that lets you implement custom heaps.

Well I guess that's it for now. If you have any other questions I'll try and see if I can answer them.
 

 

 

3 hours ago, fleabay said:

Your inability to come to a logical conclusion precludes you from obtaining your goal.

Dude, What does that even mean? LOL!

3 hours ago, Gnollrunner said:

Second I should warn you that Microsoft made a bunch of changes to Direct X and so a lot of the stuff in old DX11 programming books is out of date and won't compile or run without going through a couple hoops. However since you said UWP you probably want to use the new stuff anyway. You can read something about the changes to Direct X here.

https://blogs.msdn.microsoft.com/chuckw/2013/08/20/living-without-d3dx/

Frank Luna's books used to be excellent. Unfortunately his DX11 book is now out of date like the rest. It might be worth picking it up anyway and using it in conjunction with other sources. That's what I'm doing (mainly because I already had the book) but I'll say it's a bit iffy. Unfortunately I can't find a really good up to date Direct X11 book. I'm not sure one exists.
 

 

What's about going for DirectX 12 ? I think Frank's book on DirectX 12 is also available. 

http://9tawan.net/en/

1 hour ago, mr_tawan said:

 

What's about going for DirectX 12 ? I think Frank's book on DirectX 12 is also available. 

 I don't have it and it got some so so reviews on Amazon. At least one person told me directly it wasn't as good as his other books.  I have his DX9 and DX11 books so I know those are both very good.  But perhaps it's worth a go if nothing else is available.

I only have his DX10 book and haven't finished reading it yet, so I don't know about his DX12 book too...

http://9tawan.net/en/

This topic is closed to new replies.

Advertisement