Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Endurion

Member Since 21 Feb 2002
Offline Last Active Today, 01:48 AM

#5248693 Visual Studio 2013 raw string support missing

Posted by Endurion on 24 August 2015 - 11:42 PM

From the MSDN site you seem to have to add brackets inside the quotes:

 

std::string test = R"(\hello)";




#5244129 default install folder for windows game

Posted by Endurion on 02 August 2015 - 04:48 AM

You might try the guest account (or a samey common other user account) for testing. Install the game, run the game under the other account (via Shift-right click, run as...) and see if it works.

 

A bit annoying to debug this way, but doesn't require changing logged in user.




#5243952 Constant speed for dragging of 3D objects by mouse

Posted by Endurion on 31 July 2015 - 11:21 PM

Frame time shouldn't be used here at all?

 

Unless you want to push the object which would then be going on its way all by itself the object should simply be placed under the current location of the mouse.




#5238791 Monogame explorer crashes when doing a simple shader?

Posted by Endurion on 07 July 2015 - 08:59 AM

Just an additional info on fullscreen debugging in VS:

VS does show an error message, which is the actual problem. It displays the "debug or abort" dialog, which cannot be shown in full screen modes (because the main window of an app that goes fullscreen usually gets topmost set)

In such cases press Escape and then try to abort debugging (Shift-F5 is the default debug cancel key AFAIR)


#5238307 2D Platform C++ Templates?

Posted by Endurion on 03 July 2015 - 10:57 PM

Here's an old game I made for Dr. Dobb's Challenge back in the days: It's using DX8 in the back and comes with the full source. No other external libraries are required. You may have to search for an old DX8 SDK though:

 

http://www.georg-rottensteiner.de/en/games.html#Dr._Dobb's_Challenge_




#5238139 How to run a DX8 application on windows 7 64-bit

Posted by Endurion on 03 July 2015 - 02:02 AM

I can run my DX8 apps fine on Win 7 64bit (C++ though).

 

Is there any error code in that exception? That might give some hints on what exactly fails.




#5232533 should WndProc process WM_QUIT?

Posted by Endurion on 03 June 2015 - 01:40 AM

Little note on WM_QUIT: If you have more than one message pumps going (different threads); or nested pumps (modal windows for example), you may have to repost the WM_QUIT message if you receive it in one of the inner loops.

 

Mr. Chen says this: http://blogs.msdn.com/b/oldnewthing/archive/2005/02/22/378018.aspx




#5230785 Platformer movement and collision

Posted by Endurion on 25 May 2015 - 02:16 AM

The code snippet is completely missing the jumping part, so we are bound to guess.

 

My 8ball suggests a common mistake: Turn gravity off when jumping.

 

 

Or post at least the jump code and any code that controls both jumping and falling.




#5226908 DirectInput vs Windows API input

Posted by Endurion on 02 May 2015 - 10:52 PM

Be aware though, some parts of DirectInput are NOT available otherwise: Named controller parts (Axis, buttons, etc.) and calibration data.

 

Unfortunately I can't find the site anymore where they (not MS) explained how to use Raw Input generally but fetch the calibration and controller part info from DirectInput's registry entries.

 

My current library uses Raw Input to fetch HID data plus DirectInput data (not the library itself though) to interpret data. It's nicer for the player to select a named device than "some gamepad at USB port 17".




#5226646 How to store the file's messages?

Posted by Endurion on 30 April 2015 - 10:53 PM

Store it so that it's optimal to use during playing.

 

Since a song goes from start to step strictly forward a System.Collections.Generic.List<struct/class> might be your best bet.

 

You already have a enum, so convert from string to enum during the load phase. Put all data in a struct/class, Add the instance to your container and you're set.




#5221534 Issues with IDE Linker? Why is this happening, and how do i fix it?

Posted by Endurion on 05 April 2015 - 05:37 PM

Your BaseItem.h and Inventory.h have the same include guards. So Inventory.h including BaseItem.h will actually never include the content of BaseItem.h.

Just rename the include guard to BASEITEM_H.


#5221405 C\C++ - win32: how create regions by images?

Posted by Endurion on 04 April 2015 - 05:47 PM

This is a interesting read on WS_EX_TRANSPARENT. It might not do what you think it does:

http://blogs.msdn.com/b/oldnewthing/archive/2012/12/17/10378525.aspx


#5220065 C#: How to best track in-game "states" of things (i.e. using bitwise...

Posted by Endurion on 29 March 2015 - 07:40 PM

You could for example use an enum, set the values to the various bits and annotate it with [Flags].
 
It's a C++-ism, and not that common, but it nevertheless works:
 
 
[Flags]
enum RenderType
{
  None = 0x0,
  DataUri = 0x1,
  GZip = 0x2,
  ContentPage = 0x4,
  ViewPage = 0x8,
  HomePage = 0x10 // Next two values could be 0x20, 0x40
}
You can use it like a normal type, but will have to cast to uint for storing/restoring.

RenderType renderFlags = RenderType.GZip | RenderType.HomePage;


#5215371 Returning a true in a function that has a bool return type

Posted by Endurion on 09 March 2015 - 12:48 AM

Sounds suspiciously what might happen if you write out of bounds somewhere (and probably somewhere else).

 

Are the convertedCoords always in bounds of _board?




#5210931 Disassociate mouse with its position

Posted by Endurion on 16 February 2015 - 01:51 AM

DirectInput is officially deprecated for keyboard and mouse.

 

Unfortunately it has one nifty advantage: All the possible buttons/axis/etc. of a gamepad/joystick get human readable names assigned, and you get calibration info; something I haven't gotten from RawInput.

 

In my engine I use RawInput plus DirectInput to match up controller info.






PARTNERS