What does the structure of a 3D game engine look like?

Started by
12 comments, last by yckx 12 years, 1 month ago
Unity is a good starter engine as well, similar to xna but is already packaged so you don't have to decide what renderer, physics engine, etc you just start adding components and attach code to make them do stuff. It also works cross browser with a "flash like" plugin as well for nice 3d web games. Not sure what it would take to write 3d multiplayer games in c++....a team I imagine.

But xna would lead you through the entire process of learning all about game engines and probably prepare you better for openGL development down the road..
Advertisement

C++ is rarely, if ever, a good first language to learn.


I have to disagree with that statement. I learned C++ as my first language and I feel that was the best language for me to start with. My reasoning for this is because it forces you to learn the nitty-gritty details and really understand how almost all aspects programming works. This is assuming of course you have the right materials to help you learn the proper way of doing things. I would highly recommend purchasing a good book to help you with this; Accelerated C++ is a good choice and is also fairly cheap. The college I went to did an experiment one year where they tried to teach freshmen C# as their first language. This failed miserably and they switched back to C++ the next year. The problem they ran into is that C# holds your hand so much for beginner-level stuff that the students really didn't understand the core concepts of programming when they had to use a lower-level language like C++ or when they delved into advanced concepts in later classes. Most of the students from that year ended up retaking their first programming classes the following year.

That said, if you don't really want to learn and excel at programming so much as you just want to code up a simple game, then C# is an excellent starting point. That's also not to say you can't learn C++ after learning a higher level language first, it's just that it will most likely be a lot more frustrating and perhaps even more confusing than had you started with C++ or another lower-level programming language. In the end, you can really start with whatever language you feel like. Learning a new imperative language after you already have one down is generally rather trivial. Learning a functional programming language like LISP and Haskell can be very frustrating, but you won't need those for game development since game development is OOP (Object-Oriented Programming) based.

The reason I make such a big deal about how much hand-holding high-level languages like C# or Java do is because if you really want to get serious about game development then you are eventually going to need to understand advanced memory management and many optimization tricks because you're going to want to eek out as much performance as you can. Many of these things can't even be done is C#, you'll have to embed and call C++ code from within your C# program if you wish to do so. There's a reason almost every professional video game is written in C++ and that reason is because C++ is very nonrestrictive. As others have noted before though, that same freedom C++ gives you also allows you to very easily shoot yourself in the foot; something which is much more difficult to do in C#.


EDIT: If you just want to get started writing games, I second using C# with the XNA framework like Dynamo_Maestro and Imbarns mentioned. Not only is it easy and does a lot of the heavy lifting for you, there is all kinds of good documentation, support, and tutorials out there for it. You can also run your games on your XBox 360 if you have one.

EDIT 2: I was so busy responding to that quote I forgot to answer the original question. If you want to see what some 3D game engines look like then a good place to start would be open-source engines. Note that many of these will require a version control tool to download like GIT or Mercurial. You'll have to look into that on your own, but I highly recommend learning how to use a DCVS tool or at least SVN.

Professional

Community Created

  • OGRE 3D (Note that this is just a 3D render engine meaning it will only draw things, not run the code for your game.)

Unity is a good starter engine as well, similar to xna but is already packaged so you don't have to decide what renderer, physics engine, etc you just start adding components and attach code to make them do stuff. It also works cross browser with a "flash like" plugin as well for nice 3d web games. Not sure what it would take to write 3d multiplayer games in c++....a team I imagine.

But xna would lead you through the entire process of learning all about game engines and probably prepare you better for openGL development down the road..


You know what, I used to share this opinion and I believe this site recommends Unity as a way to learn to program games, but I actually am starting to believe that isn't a good idea. I simply think starting in Unity would actually be a fair amount more difficult than XNA or otherwise, as you not only need to learn the language, but also the Unity way of doing things. I'm not recommending against Unity, I just not sure it's really a great place to start.

I have to disagree with that statement. I learned C++ as my first language and I feel that was the best language for me to start with. My reasoning for this is because it forces you to learn the nitty-gritty details and really understand how almost all aspects programming works. This is assuming of course you have the right materials to help you learn the proper way of doing things.

That very assumption is why C++ is such a difficult first language. Without a good instructor a lot of the language's concept can be terribly confusing, and bad practices develop, even with a good book. And many, perhaps most, people here will begin learning C++ from websites that may have outdated, inaccurate, or poorly though out information; or from library books, which may be similarly out of date.

There are plenty of more general programming concepts that can be learned from easier languages without the distraction of needing to worry about lower-level stuff that is part and parcel of C++. I appreciate the example you gave of your school trying C# as an intro language, but I don't believe a single attempt of a single semester (or year) is enough data. I understand the school's decision to return to C++ since it's priorities don't really lend themselves to a more extended trial. But the anecdote as given lacks enough data to claim that C# is the reason the students were I'll prepared. It seems to me that the followup course (at a bare minimum) would also need to be restructured

So, yes, with the right instructor (and student) C++ can be a satisfactory first programming language. But I can't recommend it as a starter language in the general case.

This topic is closed to new replies.

Advertisement