Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Getting started with procedural game engine programming

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 JarvisP   Members   


Posted 25 January 2014 - 05:30 PM


Hello all,

As a personal interest, I would like to start developing a 3D game engine for creating procedural environments. Having read these forums for a while, I know that many of you will be inclined to advise against making my own engine so I want to start off by saying that I understand your opposition. This is something I want to do out of personal interest as a learning experience (and just for something extra to tinker with).

To give a little background about myself, I already know how to program (c++, java, python, etc). I have a BS and MS in Computer science and am currently a software engineer at one of the major software companies. I did my MS focusing on machine learning and natural language processing but have never really done any graphics programming (which is one of the motivations for this project). 

In this post, I'm primarily looking for advice on where to start in terms of general advice and materials that are helpful (books are good). So these are the current questions that I have. 


1) What are  the primary trade-offs between openGL and directX development? Would you advise against either of those for a beginner or for my use case (if so, why)?


2) Given your answer to the first question, what resources would you recommend to begin learning either of those tools? (this includes resources that cover libraries for sound, i/o, ui, etc.)


3) Do you have any resources about procedural game engines (about any aspect) or procedural generation in general? 


4) (related to question 2) What resources would you recommend to learn about game engine development (tips, tricks, architecture, etc.)?


I'm thinking that c++ would probably be the best language to target here but I'm open to thoughts about choice of language as well.


Thanks for your thoughts

#2 pyrotekgames   Members   


Posted 25 January 2014 - 10:30 PM

Hey! Good to see someone with similar interests as me :) I'm no expert in the field, but here's my experience:


1.) I generally like OpenGL because it's cross-platform. I work on a mac so DirectX is out for that....so I don't have much advice here.


2.) Depends on the language....I use Java and therefore follow the LWJGL tutorials. For C++, I'd probably go through the NEHE tutorials. There's also plenty of general openGL documentation all over the internet, as well as a few good programming channels on Youtube that do good tutorials (For example, I followed Oskar Veerhoek on youtube to get FBO's and such ironed out on my game engine using LWJGL).


3.) There's many good things online, for example this. That procworld website introduced me to using Grammars for creating procedural buildings and other structures. I also HIGHLY RECOMMEND Texturing and Modeling a Procedural Approach by David Eberly....it'll walk you through noise, fractals, perlin, texturing, terrain, etc. I constantly use it as a good source of procedural knowledge.


4.) Many things exist for game engine architecture, design, etc. Theres the David Eberly books (he seems to know his stuff, right...?) on game engines. They are good examples of a full game engine and documentation and discussion on why he made choices, but most of it is tailored to a general purpose engine. I've learned the most form looking at source code and documentation of engines that are already available to learn overall architecture tips.


As for language, C++ is fine and it's all up to you! I chose Java because I was more familiar with it and I could code so, so much faster in that language (5 years experience compared to my 1.5 years in C++). Since LWJGL is available for Java, that was great! 


Good luck and have fun! If you're interested start a journal to document your work :) I'd love to see where this goes.



#3 dejaime   Members   


Posted 26 January 2014 - 12:58 AM

1 - With DirectX you'd have a harder time porting if you ever want to make your engine work on a Mac, Linux, PS3/PS4. But other than that, there's not much difference as far as I can tell. Maybe someone more experient can inform you better than I can. I am used to higher-level rendering such as Ogre3D, Gizmo3D and SDL...


2 - OpenGL SuperBible

The book goes through a lot on OpenGL and is pretty up-to-date (July 2013).

I think it is on the sixth edition already, so I guess it is a pretty proven title.

The only problem is that it only covers OpenGL, so no peripherals here, completely focused on rendering.


4 -  Game Engine Architecture, Jason Gregory

This book doesn't have much in terms of code, but gives a good insight on general game engines.

Also, the second edition is just coming out any month now, so it will be as updated as it gets.


And, if you know how to use it, C++ is definitely a solid choice.

Edited by dejaime, 26 January 2014 - 01:13 AM.

#4 Vilem Otte   GDNet+   


Posted 26 January 2014 - 07:31 AM

I will just note, that DirectX has still few advantages over OpenGL in terms of development:

- It has much more features (OpenGL basically equals Direct3D, but you have also DirectCompute, DirectSound, etc. etc. in there), of course you can use other open-sourced portable libraries in place of Direct* ones

- There are "no vendor wars" in DirectX, for example we all had to wait years before AMD (ATi) implemented framebuffers in their OpenGL drivers; it is not as bad as it was,but still, compared to Direct3D it is bad;

- All in all, people won't care whether you used DirectX or OpenGL (+ other libraries), they will care only about the results ... honestly - if you want to learn, I'd suggest trying out both


Of course OpenGL also has some (portability is one of its strengths, extensions can be counted both - an advantage (features are in there when they are released), and disadvantage (vendor wars), and of course there are more)


Just an edit - I will also join the people suggesting Game Engine Architecture by Jason Gregory, it's awesome book.

Edited by Vilem Otte, 26 January 2014 - 07:32 AM.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

#5 GameCodingNinja   Members   


Posted 26 January 2014 - 01:38 PM

As I agree with the use of OpenGL portability, if you plan on making a game to sell, all your sales will be on the Windows platform. So use OpenGL because you perfer it over DirectX. Also, XAct make it very easy to add complex sound scripting into your engine.

#6 / Nathan2222_old   Members   


Posted 26 January 2014 - 02:24 PM

Use directx if you want it on windows products (pc, xbox etc.) or opengl if you want it on others.

Total LOC: ~3M Lines
Total Languages: ~32
I can do ALL things through Christ - Jesus Christ
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy

#7 LorenzoGatti   Members   


Posted 27 January 2014 - 03:37 AM

If you are interested in procedural environments, why don't you implement them on top of an existing game engine? You only need fairly low-level control over batching, vertex buffers and geometry shaders; many game engines should be suitable.

Omae Wa Mou Shindeiru

#8 JarvisP   Members   


Posted 29 January 2014 - 02:56 AM

Thanks for all the suggestions. From looking around it seems that going with DirectX would also allow for easier usage of code from the Nvidia developer examples which might be useful.

To answer your question, Lorenzo, I would primarily like to build my own for the learning experience and to have a complete top-to-bottom understanding of the system. However, toying with other engines might also be useful. Do you have any suggestions for engines that allow for such low level control?

#9 WhiskyJoe   Members   


Posted 29 January 2014 - 03:25 AM

Most people have already given you solid advice, just giving my 2 cents:


1. It doesn't really matter to be honest, you are doing this for yourself as a learning experience. Go with whatever feels best to you. I started with OpenGL and later on dived into DirectX11 because I wanted to extend my knowledge about it. Once you know one, you can use that knowledge to create less of a knowledge gap to the other (mainly due to the fact that you know what it takes to set it up and can search for equivalent functionality).


That being said, I keep hearing that DirectX is slightly easier to get into, but I don't know that myself, I have had no problems with either.


2. When it comes to setting up the engine/framework, there are plenty of resources online that can guide you through the process. Like Lorenzo already mentioned, you don't really need a lot of stuff to get started with producing procedural content. These 2 links (next to already mentioned stuff) should help getting you started with that: Click! and Click!


3. I can also recommend Texturing and Modeling a Procedural Approach for the sake of procedural stuff, it helped me out a bunch when I was toying around with procedural generation


4. Nothing to add to what has already been said.


When it comes to languages, C++ is probably the most used in combination with what you want, but that doesn't mean you can't get away with other languages. Pick what feels most natural :)


Good luck! :)

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.