Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Sep 2012
Offline Last Active Mar 21 2013 10:54 AM

#5006776 Learning c++ by yourself.

Posted by on 03 December 2012 - 03:00 PM

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition) by Scott Meyers is a good intermediate text. You can get it for Kindle.

I'd have to say that the quality of discourse in published books is of a much higher caliber than that to be found in online tutorials. You can really bootstrap yourself into some good knowledge if you just take a few months to just read. In fact, that is what I am doing now. In just a few months I have gone from total noob at C++ to kinda knowing my way around, and starting to write some original programs, basic game demos, user interface code, etc.

The key is to just stick with it because you will probably want to quit, at least once weekly. Try to force yourself to program for some hours per day, also, and do all the exercises given in the book, but do them with zeal, adding features.

Best of luck.

#5006582 New is SLOW!

Posted by on 03 December 2012 - 07:00 AM

Hello all.

I just ran the following two functions 100 times each:

void passing(int j )
for(int i = 0; i < 1000000; ++i)
int f = 0;
void referrencing(int* j)
for(int i = 0; i < 1000000; ++i)
int* f = new int;
delete f;

here was the output:

passing: 2381801 ticks
referrencing: 787614789 ticks

That is almost 400x as slow! Is this an anomaly of me running windows on a virtual machine, or is new, delete always this slow as compared with local variable alloation? I also did not find that simply dereferencing j caused any significant slowdown in the code.

#5005636 Sockets and networking in c++

Posted by on 30 November 2012 - 03:03 AM

If you want a "complete" tutorial, I recommend the 1,500 page "Computer Networks - 5th edition, by Andrew Tanenbaum"

He has a very instructive and circumspect writing style. I don't think you'll get lost.

#5005244 DirectX11 2D Book

Posted by on 29 November 2012 - 03:50 AM


I would HIGHLY recommend following MJP`s advice and going with SpriteBatch. I have just finished up (well almost) a several months journey getting my spriting working well in D3D11. I have never used SpriteBatch, but I assume it is efficient and easy to use. Send me a PM if you`d like to see my code.

#5004941 unique_ptr private member

Posted by on 28 November 2012 - 05:51 AM


I just realized that I am trying to share the pointers, so shared_ptr will be better. Thanks for your help.

-Dave Ottley

#5004426 CS Degrees

Posted by on 27 November 2012 - 01:26 AM


Yes I'm 27 now. I also have a wife and one child on the way. Money is not my concern at all and I'm not entirely certain that I want to get a "job" but I am keeping that as one option on my path to improving my video game development skills. To be honest being an indie who can support myself 100% with game development is the current goal, but I'm just trying to keep my options open. I already have a (totally unrelated) B.S. in accounting, after which time I moved to Japan, where I did various things and ended up as a professional legal translator, which I still do for money, but spend 90% of my time programming (the translating business is feast or famine, and now is a famine time). I don't want to have to continue doing that forever, but it gives me all the money I need to support my family and live where I need to in order to do games. I just don't think I can fork over another $40k or what not to get another degree, when it is my personal opinion that there is more to be learned on the great internet, and with creative collaborations than by paying some university $40k to give me assignments. I was just wondering if coming into it the way that I am is a VERY long and hard road, or just a long and hard road.


-Dave Ottley

#5004294 CS Degrees

Posted by on 26 November 2012 - 02:21 PM


I am what some might call a "Mid-Career Transfer" into the business of writing games. I`m still a student of the art ini every way. While I spend my days reading what I consider to be highly academic and instructive literature, I do not have a CS degree. My question is how many professional game developers out there don`t have CS degrees? It`s not that I think I can`t do it without one, it`s more of a curiosity about the numbers. How many people are there out there like me, who just quit what they were doing in their 20s and started making games? Are any of them successful (in terms of product quality, not financial gain).

I have been locked in my room reading for about a month now, and I can just feel myself "getting a degree" but in a much shorter time. I was wondering if others also see this as a feasible learning option and route into the game industry, either as an indie or on a larger-scale team.

-Dave Ottley

#5003207 Help with String Hashing

Posted by on 22 November 2012 - 05:54 AM


I am trying to implement a user-friendly way to label and identify my in-game assets and entities. I have been using an enumeration system where each class of entity or asset will have an enumeration entry, making the program easier to understand. For me, this works. However, I have read about string hashing and how this can be used to give designers and level editors (i.e. myself in the future) the ability to search for and create entities and assets using strings, but still maintains the run-time performance of integer identification.

However, I have not yet been able to find a suitable example of how (and when) hashing could be used in a video-game case to provide this functionality. I assume that the hashing would have to be done at compile time to make the system as fast as integer identification, but then, how would that enable the level editor and other offline tools to use strings?

If someone could provide a concise example of how string hashing works with regard to asset and entity identification I would be greatly appreciative.

Thank you as always.

- Dave Ottley