Jump to content
  • Advertisement
Sign in to follow this  
DyeGuardian

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

This topic is 2485 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'm wondering what the structure of a 3D game engine is. I can't seem to find any online resources whatsoever on the subject. If I play to write an engine, I need to know what the structure of a good functioning engine is. And how it all works with each other and such.

Thanks.

EDIT: Also I've been looking into SDL and OpenGL but I have no idea how to implement them into or with an engine.

Share this post


Link to post
Share on other sites
Advertisement
Honestly, if you're asking this question then you're not ready to write an engine. Don't worry about engines; write games. Once you get a few under your belt you'll begin to see parts that can be reused, bits that could be reused if they were coded a bit more generically, etc. Essentially your engine will grow and evolve over time from these bits. Without doing this you simply lack necessary experience to know how to approach things and what to avoid.

Share this post


Link to post
Share on other sites

Honestly, if you're asking this question then you're not ready to write an engine. Don't worry about engines; write games. Once you get a few under your belt you'll begin to see parts that can be reused, bits that could be reused if they were coded a bit more generically, etc. Essentially your engine will grow and evolve over time from these bits. Without doing this you simply lack necessary experience to know how to approach things and what to avoid.


Thanks for the reply. I am learning C++ at the moment, do you suggest I make games in this language?

I appreciate you taking the time to reply, I realize that I often thing bigger than realistic. I'll make a some small games (THAT FUNCTION!). Thanks.

Share this post


Link to post
Share on other sites
C++ is a great language but its often not the right choice for people stating with programming. If you have experience with any other programming language then by all means go ahead with C++. If not, I'd recommend starting with some easier language like Python so that you can understand the logic of programming.

Here is something to get you started if you are new to programming and are willing to start the Python way:

1. Invent your own Computer Games with Python (Beginner Level)
http://inventwithpython.com/index.html

2. Making games with Python and Pygame. (Intermediate Level)
http://inventwithpython.com/pygame/

Both these books are free for online reading and are enough to get you started on the right track. Happy game programming! wink.png

Share this post


Link to post
Share on other sites

I gues I could give some more immediately helpful advice ;)

C++ is rarely, if ever, a good first language to learn. It's possible, and many have gone that route, but people tend to recommend Python or C#, and you can get some decent early results with either language.

People often suggest starting with some simple text-mode games before moving on to shiny graphics: guess-the-number, is probably easiest and most common. Some people like to work their way up to a simple text-mode RPG. These programs help ensure you know the fundamentals of the language before tackling more complex problems.

Once you make the jump to graphics, the recommended path is: Pong, Tetris, Pac-Man, then some knd of platformer. Pong is about as simple a graphical game can get, but still offers plenty of opportuniy to learn. Each game builds on concepts learned from the previous one and introduces new problems to solve and game elements to consider.

Don't worry so much about making it "the right way." your focus should be on making it work. Nearly any chunk of code can be improved, and it's all too easy to fall into the trap of improving existing, working code rather than finishing the damn game. If you don't like the way you coded something or think there must be a better way, comment he he'll out of it so you can find it again after the game is finished and playable, and ask about it here. Apply what you learn to your next game. Applying it to your last game rarely grants any obvious reward.

I would recommend sticking with 2D for a while. There is little if any real difference in the code, but 3D assets are more complicated than 2D assets (and generally take additional skills and software to create, although there are plenty available online if you can find something that suits your needs) and dealing with that added ccomplexity can distract you from where your focus should probably be.

Elements of a game engine include audio, graphics, user input, AI, asset management, game logic, save/load system, physics, networking… There are other possible systems and not all those listed are needed in every game. Each of those is a complex subject in it's own right, as well as the task of integrating them into a cohesive whole.

That should give you some stuff to think about and some direction, at least. Good luck and enjoy the ride. This hobby is both among the most frustrating and most satisfying experiences I've found ;)


Thanks so much for your big reply. I'm glad I could find the advice I needed, I think I'll create a free blog simply to track my own progress on. Maybe I'll post up my games as well. Hell maybe I'll get more support off that :P

Thanks!

Also, do you recommend C# over python because I plan to switch to C++ later?

Share this post


Link to post
Share on other sites
To be honest I'm not yet familiar enough with C# and Python to recommend one over the other. C# does have a more similar syntax to C++, but once you really have enough experience syntax tends to become less of a concern.

I strongly encourage you to begin a programming blog. You can have one right here at GD.net, and many people do. Documenting your progress helps in many ways: putting what you learn into words helps to reinforce the concepts in your mind; discussing your ideas for games helps you to develop them, and gives others the opportunity to provide input, which may lead to improved ideas; it gives you something you can look back on over time and see just how far you've come, giving you a sense of accomplishment; and it allows others to see what you're doing, which can inspire them to begin or resume game programming, and possibly have their own blog, which serves to expand and improve the entire community.

Share this post


Link to post
Share on other sites

To be honest I'm not yet familiar enough with C# and Python to recommend one over the other. C# does have a more similar syntax to C++, but once you really have enough experience syntax tends to become less of a concern.

I strongly encourage you to begin a programming blog. You can have one right here at GD.net, and many people do. Documenting your progress helps in many ways: putting what you learn into words helps to reinforce the concepts in your mind; discussing your ideas for games helps you to develop them, and gives others the opportunity to provide input, which may lead to improved ideas; it gives you something you can look back on over time and see just how far you've come, giving you a sense of accomplishment; and it allows others to see what you're doing, which can inspire them to begin or resume game programming, and possibly have their own blog, which serves to expand and improve the entire community.


Thanks a lot for all your helpful advice.

Share this post


Link to post
Share on other sites

To be honest I'm not yet familiar enough with C# and Python to recommend one over the other. C# does have a more similar syntax to C++, but once you really have enough experience syntax tends to become less of a concern.

I strongly encourage you to begin a programming blog. You can have one right here at GD.net, and many people do. Documenting your progress helps in many ways: putting what you learn into words helps to reinforce the concepts in your mind; discussing your ideas for games helps you to develop them, and gives others the opportunity to provide input, which may lead to improved ideas; it gives you something you can look back on over time and see just how far you've come, giving you a sense of accomplishment; and it allows others to see what you're doing, which can inspire them to begin or resume game programming, and possibly have their own blog, which serves to expand and improve the entire community.



Python has one advantage in that it is interactive, which is incredibly useful for learning to program. This means you can "watch your code execute" as you write it. On the other hand, the tooling support for C# is way better. Hell even MonoDevelop is a better IDE than the best of what's (freely) available for Python, although Komodo comes close. Additionally, Microsoft has put out a literal TON of learning materials for C#.

As a matter of opinion, I vastly prefer C# over Python, but then Python has always rubbed me the wrong way.

Share this post


Link to post
Share on other sites
I would recommend C# over python, mainly because of all the components and features of .net, plus your transition to C++ will likely go smoother if you started with C#, I am not really familiar with python, I typically dislike dynamic languages but for the sake of goals, C# may be a better option mainly because of its similarities to C++ and because it has XNA.

If you plan to use DirectX (or even openGL) in the future you can make use of SlimDX / OpenTK. I cant speak for OpenTK since I havent used it but SlimDX has all the features of DirectX and is really nice to work with, though I would suggest practising with XNA before DX/OpenGL

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!