HaywireGuy

Members
  • Content count

    257
  • Joined

  • Last visited

Community Reputation

208 Neutral

About HaywireGuy

  • Rank
    Member
  1. My trip to Japan (many pictures)

    Quote:Original post by Chokki Quote:Original post by Ravuya What the fuck is up with that giant spider?If Japan's cartoons and comic books are any indication, it's probably part of the national defense force against giant robot attack. If Japan's console games are any indication, it's prbably part of the national defense force against giant crab. Nice trip though, I've been trying to pick up Japanese, hoping that I can go Japan someday soon.
  2. What music do you program to?

    Command & Conquer MP3 I recorded off the original CDs, inspires me in game programming.
  3. WM_SIZE being called constantly

    Hi there, you can detect for WM_EXITSIZEMOVE instead of WM_SIZE. WM_EXITSIZEMOVE, well as the name suggests only gets sent at the end of the sizing operation. Hope that helps.
  4. gdi vs. gdi++

    GDI is not efficient (good enough for simple 2D games though). GDI+ is natively built into Windows XP as part of the operating system, talks directly to the hardware device driver, so it should be faster on XP. The only time (that I know of) for GDI+ to be slower than GDI is when it runs on non-XP OS, that's when GDI+ runs on the already-slow GDI. I have used both but practically there isn't so much a difference, for my use case.
  5. char* to LPCWSTR

    I kinda inclined to Seleton's recommendation, you can switch from MBCS to Unicode, and vice-versa, with just a single compilation flag. But instead of TEXT I prefer to use TCHAR and _T macro:     TCHAR szString = _T("Content");
  6. Character count does not necessarily mean "byte count" for a given string under Unicode build of your software: WCHAR wch[] = L"Hello"; ASSERT(5 == wcslen(wch)); // String length (Cch) is 5 characters. ASSERT(12 == sizeof(wch)); // String size (Cb) is 12 bytes (Null). Pros and cons? I'll stick to character count when it comes to strings: extern TCHAR *szString; const int cchSize = _tcslen(szString); // Straightforward. const int cbSize = _tcslen(szString) * sizeof(TCHAR); // Need multiplication. Maybe it's just me.
  7. Custom Windows?

    Nice clock there Gan! Enlighten, if you know you're going to ship on Windows 2000 and newer operating systems, you can utilize what is generally known as "Layered Window" (instead of window region). It provides smooth blending with the rest of windows on your desktop, so you don't get those jagged edges like you see in the WMP picture above (layered windows support per-pixel alpha blending). As most people have moved on to Windows 2000 or newer OSes, it is IMO a wiser choice than using window regions :) I have done both approaches and found that layered windows are easier to implement. Check this link for more details on how it's done.
  8. assert in release

    ASSERT(DoSomething()); In this case DoSomething() will not be executed in Release build. Try one of these options instead: if(!VERIFY(DoSomething()))     return false; or bool bResult = DoSomething(); ASSERT(bResult); if (bResult)     return false; "VERIFY" is the same as ASSERT, the only difference is that it evaluates the statement also for Release build (without popping up message boxes). As Jack said assertion statements are meant to catch careless mistakes made in Debug build, these assertions should never be fired even if they are in Release build.
  9. Documenting Classes

    Quote:Original post by kpanghmc I think a better question is: why are you putting feathers on monkeys? :) "Impossible Creatures" maybe? Anyway, Microsoft Visual Studio 2005 has got a very nice documentation feature built into it. Check this out. Personally I'd prefer "documenting" the code in declaration (header file), because any other clients that use the header will also be able to see them. e.g. if you ship a library, it's more likely that you ship headers instead of source files. So... commenting in header is a better idea, IMO.
  10. Instead of "while(stack.empty())" you might want to do "while(!stack.empty())" (while the stack is *not* empty).
  11. Good LCD monitors?

    Too bad you're on tight budget, otherwise you can get this one from Dell, heard it's having the same LCD panel as Apple (from LG), not sure how true is that. Dell 3007WFP
  12. Old Games!!!

    Quote:Original post by rip-off Quote:Original post by HaywireGuy And my first RTS, Command & Conquer. Personally I think Westwood didn't make better RTS after C&C... i loved the original red alert, its my favourite. i preffered it to c&c. but to each his own( havent played some of the latest ones ) What so facinating about C&C was actually the installation screen, to me it was quite original. Can somebody post the screenshot of that?
  13. Gamedev Story Thread 2

    "I left my underwear on the dinning table and my niece is dropping by for dinner!!". He then thought...
  14. Black Hole Question

    Quote:Original post by TheUberCuber Just throwing tons of matter together doesn't guarantee the creation of a black hole. If you brought these stars together, once they're next to each other they would have resistances because they are matter... I tend to think their gravitational pull will force each other together and finally collapsing into a huge mass, creating a black hole. Like if earth does not rotate fast enough, it might one day be sucked into the sun. But then I might be wrong.
  15. Gamedev Story Thread 2

    ... Steven was tickling his feet. Having been kicked in the eye Trinity shouted "YOU SON OF...