Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


xzbobzx

Member Since 27 Apr 2011
Offline Last Active Nov 28 2012 12:12 PM

Posts I've Made

In Topic: Trouble with 2D speed vectoring.

08 November 2012 - 01:14 PM

I think this is all you need:

double const pi = atan(1.0)*4.0;
double const degrees = pi/180.0;

Velocity_X = -Speed * sin(Rotation * degrees);
Velocity_Y = Speed * cos(Rotation * degrees);

You need to make sure your angles are in radians before you pass them to cos() or sin().


That works great!
Thanks man, massive kudos.

In Topic: How do I set up SDL in visual C++ 2010 express?

03 May 2011 - 10:58 AM

By default, when you run your program from within the IDE, the working directory is set to "$(ProjectDir)", which is the directory containing the project file and source files. However, if you were to run your program from outside the IDE, then the working directory is the directory of the executable. You can change the working directory of a program by going to the project properties (alt+f7), and changing the "Working Directory" field under "Debugging->General".


Ah, ok, so it should work if I placed the 'hello.bmp' in the folder containing the .exe?

Edit: it worked.

In Topic: How do I set up SDL in visual C++ 2010 express?

03 May 2011 - 10:52 AM

I also get this sometimes:
LINK : [external drive]\SDL_Tutorial\Debug\SDL_Tutorial.exe not found or not built by the last incremental link; performing full link
[external drive] being, of course, my external drive. :|

In Topic: How do I set up SDL in visual C++ 2010 express?

03 May 2011 - 09:32 AM

Also didn't work... :|

In Topic: How do I set up SDL in visual C++ 2010 express?

03 May 2011 - 08:45 AM

Tried all other options, doesn't do anything... :c

PARTNERS