• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1577 Excellent

About mrbastard

  • Rank
  1. Some misinformation in this thread....   You can make win32 applications that respond to touch and that run on windows 8.   x86-based tablets can run win32 applications, only arm-based windows 8 tablets can't.   The win32 wm_gesture messages work on windows 7 and windows 8.   You can make win32 applications that respond to gesture messages using any compiler/IDE that works with the windows 7 platform sdk or later.
  2. Don't use Singletons for Event Managers!

    Hopefully I'll get some time this weekend to turn my demo into a glyphlet :¬)
  3. Does the hierarchy change? If not, you don't need to store in a tree with actual parent-> child ptrs. Instead, store all the bones in an array/vector, and keep the index of each. Instead of traversing the tree, just look up using the index. Keep a map of strings to indices for lookup in asset loading / ui / scripting, but otherwise refer to joints by their index.
  4. That's an astute question. In addition to setting the number of elements on construction as suggested above, you can also use vector::reserve to ensure a reasonable amount of space is available, without actually changing the number of elements 'in' the vector. This allows you to control when the allocation occurs, while still allowing you to use push_back or insertion iterators. While that's no better in this case, it's worth knowing.
  5. [quote name='jwezorek' timestamp='1354564738' post='5006745'] You shouldn't go out looking to use any particular pattern; but sometime in the future you may [i]find yourself[/i] using one if you practice good design. At that point, if you need to explain the architecture of something to someone you can refer to its usage of the decorator pattern or whatever. [/quote] I wish I could +1 this harder, and beat lazy interviewers over the head with it.
  6. Is C++ too complex?

    People who dislike the compilation model may want to look out for (or even give feedback to the standards committee on) proposals for [url="http://isocpp.org/blog/2012/12/modules-update-video-available-doug-gregor"]Modules[/url]. There have been proposals mentioning partial classes for easier code-gen tooling as well, but I don't know whether this is part of the Modules working group or separate at this point.
  7. ars longa, vita brevis, laboro plus longa :¬(
  8. You may find that you end up needing more additional attributes on your cached assets, in which case you may want to use a small struct (with appropriate comparison operators) as the key, instead of a string.
  9. Help with String Hashing

    You probably don't want a 'real' hash function for this - just associate each string with an integer. For example you could start at zero increment for each string added, putting them as key and value in an std::map. Things get more complicated if you want to remove strings and reuse integers, but you probably won't need to. Edit: turns out this is called string interning. Thanks Hodgman!
  10. Using Constants in Headers

    As the constant is defined in a different translation unit, it's value cannot be known at compile time, only at link time.
  11. [quote name='Hodgman' timestamp='1353051820' post='5001470'] [font=courier new,courier,monospace]Assertion( Comparison( Adder( Integer(1), Integer(1) ).Result(), Integer(2) ).Result() ).Check();[/font] [/quote] Smalltalk says Hi (I wonder why it never got much traction [img]http://public.gamedev.net//public/style_emoticons/default/wink.png[/img] )
  12. Visual Studio 2012 Express

    That's based solely on [url="http://visualstudiomagazine.com/articles/2012/06/08/microsoft-announces-visual-studio-2012-express-for-windows-desktop.aspx"]this page[/url], where it (mis?)quotes Soma - "Traditionally, Express tools have not supported Visual Studio extensions. With the addition of Express for Windows Desktop, Windows developers can, however, take advantage of the latest functionality in the 2012 Express tooling, according to Somasegar". I did say it was my impression after a couple of minutes googling. Clearly your google-fu is weak.... but still stronger than either of our motivation to actually test this out ;¬)
  13. Visual Studio 2012 Express

    If you've already got Perforce, you could just download VS Express and try it. Personally I'd drop Perforce. Most version control systems don't need to be integrated into the IDE the way Perforce has to be, since they're capable of noticing when you changed a file all by themselves... FWIW, it seems VS 2012 Express supports extensions, but previous express versions did not. That's the impression I get from a couple of minutes googling - I haven't tried it.
  14. You can almost certainly do this with [url="http://msdn.microsoft.com/en-us/library/a4xbdz1e(v=vs.80).aspx"]Project Property Sheets[/url] Where I work IIRC there's a hierarchy of increasingly specific .vsprops files.
  15. Boost threaded application crashes

    Hard to tell, but possible - paste the entirety of the message you get, please [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] An unhandled exception could be a real c++ exception, or more likely SEH reporting an access violation.
  • Advertisement