Search:

Type: Posts; User: blackCat

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    3,248

    Hmmmmm...tiles then. I'll look into that. ...

    Hmmmmm...tiles then. I'll look into that. Thanks!
  2. Replies
    2
    Views
    3,248

    Scrolling background??

    Im using Visual C++ 2005 to program a 2D spaceship navigating across a scrolling background. The background is a simple picture, which I have copied and pasted a few times to extend it in paint.
    ...
  3. Replies
    9
    Views
    2,517

    Cheers guys, I've got something kinda working now...

    Cheers guys, I've got something kinda working now with the following...

    The only trouble I'm having now is that the angle of the ship does not appear to be updating until I press the thrust key. ...
  4. Replies
    9
    Views
    2,517

    is dAngle in radians? Yes I'ts converted to...

    is dAngle in radians? Yes I'ts converted to radians in the spaceship class.

    bvy = -10 * cos(dAngle); I got this from a website, which i was trying out.

    I could try stepping through it - I'm...
  5. Replies
    9
    Views
    2,517

    Firing bullets from rotating ship???

    I'm trying to get bullets to fire from the ship in the direction it is rotated. I've tried using the following, but it keeps firing long, weird lines to the top left corner of the screen. I have to...
  6. Replies
    1
    Views
    3,178

    Nevermind, I've figured it out... Swapped...

    Nevermind, I've figured it out...


    Swapped this:



    //Adjust bearing angle according to the above key press
    velocity.setBearing((dAngle/360*6.282), velocity.magnitude());
  7. Replies
    1
    Views
    3,178

    Velocity in rotation using 2D vectors???

    I'm rotating a sprite using the following, but when the spaceship, which is circular, is facing towards the left side of the screen and I press the thrust key it slows down? Any help? Velocity,...
  8. Replies
    9
    Views
    2,224

    Thats right. Heres the full function... I...

    Thats right. Heres the full function...

    I could just make do with three of these functions within the accelerometer driver for all 3 axis and not pass an array. However, I was making a hacking...
  9. Replies
    9
    Views
    2,224

    X is the reading from an accelerometer's x axis. ...

    X is the reading from an accelerometer's x axis. The new X reading gets fed into the filterReading(...) function and the array of previous readings is used to filter the reading before returning it...
  10. Replies
    9
    Views
    2,224

    There you go... /******Header file...

    There you go...



    /******Header file code********************/
    struct accProperties
    {
    int xAxis;
    int yAxis;
    int zAxis;
  11. Replies
    9
    Views
    2,224

    Array address passing help please??

    I'm trying to pass the actual array address into the filterReading(...) function so it can be modified and returned. The parts highlighted in bold below are the relevant parts. Any help please? Oh...
  12. Ha ha thats quality that guys. Thanks. P.s. ...

    Ha ha thats quality that guys. Thanks.

    P.s. now I feel guilty for not doing it myself.
  13. Speeding up animation as velocity increases???

    When moving a chopper picture around the screen using 3 different chopper pictures, how does one increase the animation speed as the chopper speed increases in velocity?

    The drawHelicopter...
  14. Thread: rand() help?

    by blackCat
    Replies
    4
    Views
    1,208

    Thanks!

    Thanks!
  15. Thread: rand() help?

    by blackCat
    Replies
    4
    Views
    1,208

    rand() help?

    I'm trying to generate random numbers between -10 and +10. Any help...below is what I've tried:


    srand(time(NULL));
    for (int i=0;i<10;i++)
    cout << ((rand() % -10) + -10 + 10) << endl;
  16. Replies
    4
    Views
    4,563

    Thanks!!

    Thanks!!
  17. Replies
    4
    Views
    4,563

    Copying 32 bits into 16 bit integer???

    accelProps.xAxis is a 32 bit integer reading from an accelerometer...

    Int16U xVal = accelProps.xAxis;

    Will the above copy the first 16 bits of the 32 bit integer into the 16 bit integer?
Results 1 to 17 of 17