Jump to content

  • Log In with Google      Sign In   
  • Create Account


ZachHoefler

Member Since 30 Aug 2013
Offline Last Active Oct 06 2013 06:27 PM

Posts I've Made

In Topic: Open world 3D game without a specific game engine

22 September 2013 - 06:12 PM

I'll put it this way: 6 months of hard-core coding in C++ won't get you as far as like a week of scripting in Unity.

 

That said, there is value in doing what's been done before and learning how everything works. I highly recommend the book Game Coding Complete, if you want a breakdown of a lot of what goes into making a game engine. If what you want to do is just build something for the sake of building it and learning how to do it, doing it all from scratch can be fun! Being able to say "I wrote every part of this" is really satisfying.

 

If your goal is to make a product that eventually gets released, you really ought to just use a game engine. If you want something to do for fun as a hobby, go crazy with learning all of the lower-level stuff that goes on in a game! Though, even if you want to build your own "engine," I'd recommend working with other ones a bit just to see how they work and to get some ideas on how you might structure things.

 

In any case, the scope of your project idea is way too big as-is for something you would want to do alone. The content alone would take a loooong time, let alone the programming. Start smaller and work your way up from there as you build your skills. Given enough time and practice, you could conceivably achieve some cool results, but obviously whatever you make won't be able to compete with something that had dozens of people with expert knowledge working for years. If nothing else, build small tech demos before tackling a big project; 3D is hard.

 

Anyway, the only way to really appreciate the scope of work that goes into existing game engines is to try and do it yourself. Play around with different existing ones, and play around with implementing some of the concepts yourself. You may find yourself thinking "man, this is absurdly difficult and boring, I'm just going to use Unity," or you may find yourself saying "wow, this is awesome! I love graphics programming!". The only way to know what you'll like is to try it out and see.


In Topic: Effective C++ (book)

22 September 2013 - 05:33 PM

Effective C++'s content is still very relevant and up to date. It references a lot of stuff that was in std::tr1 which ended up as parts of C++11, so it still discusses some of the newer stuff anyway. The only major difference to be aware of is that you should now prefer std::unique_ptr instead of auto_ptr. Just look up new C++11 features at some point after you've read the book, as it doesn't go into e.g. lambda functions.

 

Also, the sections are generally pretty short, so it's a great book to pull out when you have a 5-10min break.

 

For the other books (More Effective C++ and Effective STL) I'm not sure offhand, but you're definitely good to go on the first book.


In Topic: Learning Visual C++ 2012

30 August 2013 - 02:54 AM

It's only a rather small portion of the book, but the part of Game Coding Complete goes through a bit of project setup before diving into coding (see the start of Ch4). It sets up external libraries, changes output directories for a cleaner solution directory, etc.

 

 

To include a static library to an existing project you need to do the following:
* Add the include path(s) to the library's headers.
* Add the library path to the library itself.

These are done in the project configuration tab.
* Add the library ("foo.lib") to the "Linker - Additional libraries" box

This should in theory be it, but you may run into linker errors if:
* The library in question requires other libraries to be included.
* The library was built in a different configuration than your project (I think this is Windows-only. /MDd or /MD flags needs to be same for both)

There are probably other considerations to be made, that other posters can supply.

 

So if I were to add foo.lib to my project using that, would I need to move the library to somewhere special? Or could I just do the full path to foo.lib?

It just has to be in one of the library directories you specified in the previous step. Not sure how VS handles two files with the same name in different directories, though.

 

If you want an example of someone including libraries/directories/etc, you could look up an example of including DirectX in a version of VS pre-2012. A quick Google search gives this example.


In Topic: passing std::shared_ptr to a function?

30 August 2013 - 02:41 AM

Generally speaking, unless the function needs to interact with the shared_ptr part of the pointer (for lack of a better term), just take a reference for the parameter. Barring anything too crazy, the function returns to where it was called once it's complete, so you shouldn't have to worry about the object being destroyed.

 

(NB: If the object might actually get destroyed for some reason while the function is running, e.g. due to threads, then yeah, you'll probably want to pass a shared_ptr)

 

 

I already know that it's pointless and that it's annoying as hell. I'm just wondering where it came from.
 
Did people really start doing this just for intellisense? I mean JFC, just upgrade to 2012.

It's the most compelling reason I have. If I type this-> I can then see all methods and members of a class. Type a few more letters, and see all of them with a certain prefix, like get or set. Saves on typing, checking names, and prevents typos.

This cannot work for unqualified names, in part because the set of candidates can be large, and in part because of argument dependent lookup. But when calling a method on a class, you don't want argument dependent lookup.

 

(emphasis mine)

 

Just press Ctrl+Space. That's the standard shortcut in most IDEs. =]


PARTNERS