Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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