Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 01 Jun 2012
Offline Last Active Jan 24 2015 07:31 AM

#5083978 std::vector of pointers

Posted by on 07 August 2013 - 04:27 PM

@Crusable what SyncViews says is correct and you're trying to store temporaries in a vector, but I also see something else.

Although it is harmless, you seem to be using the auto keyword in your for loop here:

	for(auto iter = m_Map.begin(); iter != m_Map.end(); ++iter){
		(*iter)->render(scrRegion, scrSize, window); //<- does not go to the function

But why not go the distance, since you are already using c++11, and use a range based for loop instead of explicitly using iterators?

	for (auto tile : m_Map)
		tile->render(scrRegion, scrSize, window);

Isn't this the nice?

#5030185 New c++11 video tutorials, tell me what you think.

Posted by on 08 February 2013 - 02:39 PM

I hope you are prepared for some constructive criticism.


From what I have seen so far, 8, 10 through 13, I haven't found anything from the new c++11 standard. Don't encourage the use of using namespace directives without explaining what namespaces are, what they do, and how to use them first. Consider condensing some of the material, there are videos less than three minutes and two whole videos just for loops. Note somewhere in the playlist description, in the videos, or in the first video that c++11 won't be "covered" until "lesson 23" or some point in time.

#5008218 Udp server on homePC

Posted by on 07 December 2012 - 02:37 PM

Considering no packets reach the server, the problem could possibly be with network address translation. Look up information on "udp punch through", or "udp hole punching".

#5007209 game loop

Posted by on 04 December 2012 - 04:28 PM

First off I would suggest you refine your whitespace and indentation syntax as well as your naming convention.
You are passing a constant delta time to update. Why? I don't know. Instead you should probably be calculating the delta time between previous and current frame and passing that to update. Update then uses the delta time by multiplying it by a constant.

Edit: should work harder on my critical reading.

#4999498 Event System in C++

Posted by on 09 November 2012 - 06:53 PM

If you are looking for libraries that implement signals and slots you have many options. You have a whole range of options from heavy, feature rich boost::signals its thread safe sibling boost::signals2, libsigc++, sigslot, cpp-events, and ting. I've actually released an extremely lightweight implementation that uses c++11 called nano-signal-slot. It all boils down to what you estimate you will need. I would not recommend an old or dead implementation as maintainability could become an issue. I would suggest boost::signals2 as that is the thread safe version of boost::signals, and performance between the two is similar. http://www.boost.org/doc/libs/1_52_0/doc/html/signals2.html