Sign in to follow this  
shadowisadog

[.net] XNA and 3d?

Recommended Posts

Hey everyone :). I wanted to ask a few newbie questions here here, in the hopes that you guys could answer them. I am a c++ developer who has been developing games for a while now (Speedy Solitaire) but I have become interested in XNA for its ease and development speed. I have been playing with XNA and I created a pong game in it, however I am a bit confused as to how to go about developing a 3d engine. I am aware of the concept of the scene graph, but can anyone provide some pointers as to how everything comes together? Some things I am confused on: A) Is a scene graph used to handle "states" or do I need to use my own system for this? For my pong game I coded a frame manager that had transitions but I was wondering if I needed it. I think they are two different things, but I just want to make sure. B) How would you guys go about structuring a 3d engine. I can load models and I have drawn a quad to the screen using TriangleLists and shaders, however I am unsure as to the best way to combine all of these. How would you guys go about logically structuring a 3d engine? Thanks!

Share this post


Link to post
Share on other sites
Honestly? I would say that you would be better off just working on a 3D project without aspirations of making a 3d engine. They say necessity is the mother of invention. As you come across issues and problems, you will do research and find how others have solved the same problem. After a while, you will start to learn what parts of your code are reusable, which ones are not, and how to refactor your non-reusable code to be reusable.

At that point you will find yourself with the knowledge to make an engine :-)

Though it's not specific to C#, you can check out the five part Enginuity articles which talk about game engine design (you can safely ignore all the memory management stuff which doesn't apply to managed code).

Edit: here's links to the other articles in the series:
http://www.gamedev.net/reference/articles/article1954.asp
http://www.gamedev.net/reference/articles/article1959.asp
http://www.gamedev.net/reference/articles/article1973.asp
http://www.gamedev.net/reference/articles/article2011.asp

Share this post


Link to post
Share on other sites
Thanks for taking the time to reply. I have read the Enginuity articles before and while there is some good stuff in there, it seems to fall a bit short of covering all of the design patterns.

I appreciate your advice to learn the correct engine structure through trial and error, however as many 3d games have been created and as a person who has experienced first hand the costs associated with a flawed design when it comes to a project, I simply do not have that kind of time as this is a time critical project.

If I have to reinvent the wheel then I will, but I hope that someone here will be kind enough to save me some trouble ;).

I highly appreciate any advice that is given on this matter.

Thank you.

Share this post


Link to post
Share on other sites
Quote:
Original post by joelmartinez
You could also check out this article which was published last night:
http://blogs.msdn.com/etayrien/archive/2006/12/12/game-engine-structure.aspx

:-)


haha Thanks! Just what I was looking for too. Seems there's a lot of us C++ developers giving XNA a go. Does anyone have any comments on that article (besides the few that are at the bottom of that blog)?

Share this post


Link to post
Share on other sites
Quote:
Original post by joelmartinez
Though it's not specific to C#, you can check out the five part ... articles which talk about game engine design (you can safely ignore all the memory management stuff which doesn't apply to managed code).


Hah man IF I ONLY KNEW ABOUT THIS A FEW YEARS AGO! I had to learn all that crap on my own through trial and error. Of course I prolly would have read it and just told myself naa you dont need all that. Of course you learn real quick that you do need all that(minus the already built stuff out there through STL and boost and such). Anywho, those are some great articles that I think just about EVERY programmer new to game development NEED to read, it should be a requirement.


Share this post


Link to post
Share on other sites
I actually asked superpig if we might see XNA versions of those articles in another thread. He was ambiguous in his response, only saying something like, "we can do better than that ;-)"

Based on his gdnet journal, it seems he's been playing with XNA recently ... Hopefully that means an XNA version of those articles :-P

Share this post


Link to post
Share on other sites
Quote:
Original post by kindjie
... Does anyone have any comments on that article (besides the few that are at the bottom of that blog)?

I haven't actually played with any of that code, but the FlatRedBall engine has a similar "Screens" construct ... I can say that it's a really good structure to give your game. Makes asset management relatively simple.

btw, if you're curious ... the FRB engine is currently written in MDX, but is undergoing a port to XNA. Should be ready sometime early next year :-)

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