Jump to content
  • Advertisement
Sign in to follow this  
Toolmaker

[.net] Starting out with 3D in C#?

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've coded for a long time in C++ and wrote a few games(Tetris/Pong/Asteroids in 2D, and a MUD server which is coming along really nice). However, I want to move into the realm of 3D. But, as C# is way nicer than C++ in general terms of usage, I wonder if there are any GOOD resources out there, to get me started with 3D. Toolmaker

Share this post


Link to post
Share on other sites
Advertisement
The Managed DirectX 9 SDK should be a good starting point, assuming you want to do D3D. I learned the basics from there, then filled in the blanks with Managed DirectX 9 Graphics and Game Programming Kickstart by Tom Miller (project lead of Managed DirectX). I don't have any experience doing OpenGL on .NET, but there are some libraries out there for that as well. For the more general 3D side of things, Real-Time Rendering and Computer Graphics: Principles and Practice are two must-haves. The first one being an introduction go general 3D graphics stuff, and he second being an encyclopedia of graphics techniques. If you aren't familiar with Algebra II and Trigonometry, you'll need that knowledge to do 3D graphics as well. Good luck!

Share this post


Link to post
Share on other sites
Quote:
Original post by Johnny Watson
I learned the basics from there, then filled in the blanks with Managed DirectX 9 Graphics and Game Programming Kickstart by Tom Miller (project lead of Managed DirectX).

I also recommend this book, its served as a great reference and tutorial.

The other book I bought is "3d Math Primer for Graphics and Game Development." It's been worth its weight in gold to me since I've had little background in linear algebra.

Best of luck.

Share this post


Link to post
Share on other sites
Thank you guys. I'll mess around a bit, and I'll buy the since I got a truckload of book coupons waiting for me.

1 more question: Someone told me that building a (simplistic) 3D engine in MDX is much harder than DX. I kind of found this strange, as the MDX interface was meant to make life easier, not harder...

How much experience do you guys have, and if you guys have experience with both, which way do you prefer?

Also: Rate++ for the people who replied :)

Toolmaker

Share this post


Link to post
Share on other sites
I don't think it is harder, just the amount of resources on the net in reference to programming with DX are immensly in more quantity than those for MDX.

Might want to check out Coding4Fun...

Share this post


Link to post
Share on other sites
imo opinion for what its worth building 3d games is much much more simple in mdx then regular dx. Technically all you need to get a scene up and running is

Device device;

InitGraphics()
{
PresentParameters para = new PresentParameters();
para.Windowed = true;
para.SwapEffect = SwapEffect.Discard;
para.AutoDepthStencilFormat = Format.D16
para.EnableAutoDepthStencilFormat = true;

device = new Device(.....)

}

OnPaint()
{
device.Clear(Target | ZBuffer , Color.Blue,1.0f,0);
device.BeginScene();
device.EndScene();
device.Present();

this.Invalidate();
}


now thats form memroy (I dont have any code on me) but thats pretty much it. Thats even easier then OpenGL far as Im concerned. Now granted pending on what you want to do there could be a lot more code involved but to get a basic game up and working thatll do it for you. Looks pretty simple to me :-)

Share this post


Link to post
Share on other sites
Quote:
Original post by Toolmaker
Someone told me that building a (simplistic) 3D engine in MDX is much harder than DX. I kind of found this strange, as the MDX interface was meant to make life easier, not harder...


I would keep some salt handy (you can get a 50lb bag at your local feed store -- that hould last a couple of weeks) when fielding comments of this sort. DirectX it really the same under the hood regardless of your choice of managed or unmanaged so -- though I am no C++ expert -- you can probably change statement in your mind to something like:

"building a (simplistic) 3D engine in MDX is not particularly different than DX"

Now coding at all in a managed language is different, but we should all know better by now than to venture an opinion as to its relative difficulty or usefulness.

The truth is you don't really have to build a simplistic engine at all in MDX as the SDK comes with one (ie: the Sample Framework).

Share this post


Link to post
Share on other sites
Well the structure of classes and what not is a little bit different. I dislike the fact that there is no way to define global variables for an entire project...

Share this post


Link to post
Share on other sites
Quote:
Original post by Krisc
Well the structure of classes and what not is a little bit different. I dislike the fact that there is no way to define global variables for an entire project...


Do you mean in Managed Code? Something like:

public class Global {
public static int Variable = 123;
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!