Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 17 Jan 2010
Offline Last Active Today, 12:20 PM

#5269335 Practicality of a C++ Garbage collector

Posted by DoctorGlow on 04 January 2016 - 10:22 PM

I never use unique_ptr, since a data member is way much simpler:

class A { ... };class B {public:    A a;};
But this pattern is not always possible or desirable.

#5262472 Old unused variable trick for assert : sizeof

Posted by DoctorGlow on 17 November 2015 - 03:34 PM

I use slightly different technique, 


void Foo(int /*SomeParameter*/)


This way, I get also quick documentation and shut up compiler warning.

#5260198 GameNet: Simple RPC System for Games - Sample Game included (C++11)

Posted by DoctorGlow on 02 November 2015 - 03:03 PM

Not to pick at the code, but seeing this in header file:


using namespace std;

using namespace glm;


Makes me a little hesitant about the rest of the code.

#5247214 Code Review

Posted by DoctorGlow on 17 August 2015 - 02:08 PM

std::string are objects (class) and can be expensive, specialy if it needs to copy data, so I "always" pass by const ref.

#5247205 Code Review

Posted by DoctorGlow on 17 August 2015 - 01:48 PM

Quick glance at the code, you pass parameters by value specially std::string, you do not use const anywhere including marking methods which do not change state of an object. Those two things would be give me the impression that you are a junior.

#5239612 How can i save player data, and how to prevent cheating?

Posted by DoctorGlow on 10 July 2015 - 02:51 PM

For me is, why would you do any kind of cheat prevention for a single player game? If I want to "cheat" myself, why make it harder for me? Maybe some parts of the game are too hard and I am not willing to spend some hours of getting better at that part. IOW, I am not competing with anybody else and I play games for my own enjoyment and not somebody else.

#5235324 [Win32] Crash log: StackWalker not showing full callstack

Posted by DoctorGlow on 17 June 2015 - 02:15 PM

YMMV, but rather then rolling your own crash handler, you could try Google Breakpad (https://code.google.com/p/google-breakpad/)

#5224933 GUI liblary C++

Posted by DoctorGlow on 22 April 2015 - 05:06 PM

I have used cef toolkit (https://bitbucket.org/chromiumembedded/cef) before and with some good results (not the easiest library to work with). There also couple or so derived projects from it that may be better solution, do not remember from top of my head, but I'm sure google will find it for you.

#5221487 Visual Novel Mechanics in Unreal Engine

Posted by DoctorGlow on 05 April 2015 - 11:04 AM

Since you already using EU4, I would use Blueprints to at least a prototype. It seems that your project would fit well in BP and they are pretty powerful and you can do a lot. For any harder problems or performance issues, you can always step into C++.

#5219772 Safe Property System

Posted by DoctorGlow on 27 March 2015 - 10:24 PM

My approach lately has been to use google proto buffers for saving and loading to and from disk, and then actually create sqlite db in memory to represent that data during run time, and rest of the system then deals only with that database. By using sqlite for data representation, it gave me quite bit of flexibility and it seems easier to deal with changes. In most case it usually only required small adjustment to query as the needs grew or changed. The actual conversion to and from proto buffers is contain only in one file. And to top it off, by using sqlite (mostly as intermediate format here), it allowed me to add more verification and validation by using sqlite language, like constraints, triggers, etc, so data become even more validate with almost no work on my end.

#5219465 Win 7 crash without error message

Posted by DoctorGlow on 26 March 2015 - 04:23 PM

What about trying to log to a file and at various locations and bits of your program, it may generate large file. Other option is to build with pdb file even in release and then run it under debugger or attach debugger and hopefully when it crashes you may get "decent" stack.

#5207574 Profiling tools

Posted by DoctorGlow on 29 January 2015 - 06:36 PM

Sleepy possibly?


#5190204 How do you transform objects to screen?

Posted by DoctorGlow on 30 October 2014 - 02:18 PM


Best way is to forget all the transforms and provide vertex position coordinates in projection space - that is, in range [-1.0, -1.0, 0.0, 1.0] to [1.0,1.0, 1.0, 1.0].

i think i can make that work by making a separate shader that does not have any world transforms, but i am re-using the same shader for many things, how can i set a world matrix to have no effect when it is used?


Identity matrix (http://en.wikipedia.org/wiki/Identity_matrix).

#5172310 Visual Programming

Posted by DoctorGlow on 08 August 2014 - 10:20 AM

I think true tests for this would be to "eat your own dog food". IOW, try to make a game with this and see how well it works out, and I mean something more complicated, rather then simple pong or Tic-Tac-Toe. This should give you good insight into your project/library, how well it works, how much changes, custom code you had to do, etc. Once you finish, you can try another different game and then you end up with cool and useful samples code for your perspective customers.

#5172124 Debugging a system hang (entire OS freezes)

Posted by DoctorGlow on 07 August 2014 - 02:57 PM

I would try to log as much as I could to a file (flush it out or close the file after each write). Then when it hangs, reboot, and look over the log file. This may give you at least approximate area where it hags.