Search:

Type: Posts; User: misterFry

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    6,663

    After implementing collision detection, timing...

    After implementing collision detection, timing for animation, and a few other things, I've realized that the way I implement gravity doesn't fit in with my collision detection.

    ... the reason...
  2. Replies
    7
    Views
    6,663

    I used a 10 millisecond deltaTime wait between...

    I used a 10 millisecond deltaTime wait between each redraw of the object, and increased the velocity by 9.82*deltaTime each frame.

    Thanks for the help.
  3. Replies
    7
    Views
    6,663

    Would you include every single pixel as a step...

    Would you include every single pixel as a step when moving the object toward the point of gravity or is that overkill or even practical?

    If every pixel on a 800x600 screen was modeled as one foot,...
  4. Replies
    7
    Views
    6,663

    Gravity calculations for falling object

    I need a little direction on how to handle gravity.

    What is the best way to implement acceleration due to gravity for a falling object? More specifically, how should each check/iteration on the...
  5. Replies
    3
    Views
    1,067

    Comparing a struct array...

    I'm writing a program that reads some files. The first file contains a list of data for books, and the second file contains information for markets from where the books are bought. The first file has...
  6. Replies
    7
    Views
    1,272

    I've solved the problem. In another program (the...

    I've solved the problem. In another program (the final for the course) where I was doing the same 'getline()', I discovered that the length of separate strings (getline vs. cin[ifstream]) were...
  7. Replies
    7
    Views
    1,272

    edit: WS isn't a variable, it's a stream...

    edit:

    WS isn't a variable, it's a stream manipulator. They both work, but now whenever I try to output the variables, i get a list of 8 items, and then when outputting the price, they overwrite...
  8. Replies
    7
    Views
    1,272

    Thanks for the tip. It's working fine with...

    Thanks for the tip.



    It's working fine with that.
  9. Replies
    7
    Views
    1,272

    structs and doubles?

    I'm writing this program that reads a text file which lists an item, and then it's price, and on and on...



    This is part of the code... the problem I'm having is reading the file. With this...
  10. Replies
    11
    Views
    2,811

    As far as I can tell, it was because i wasn't...

    As far as I can tell, it was because i wasn't assigned a value when declared. I set it to zero and can add all the variables I want now. As far as reading initially before a while loop, I read...
  11. Replies
    11
    Views
    2,811

    32570! Well, that's the first time I've ever...

    32570!

    Well, that's the first time I've ever run into a problem when not assigning a value to a variable when declaring it. I always figured it was unnecessary to do, but got into the habit of it...
  12. Replies
    11
    Views
    2,811

    76 89 150 135 200 12 100 28 178 189

    76
    89
    150
    135
    200
    12
    100
    28
    178
    189
  13. Replies
    11
    Views
    2,811

    I figured as much. I'll just paste the whole code...

    I figured as much. I'll just paste the whole code since it's relatively small. This is an assignment for a course, which should be obvious... :)

    This program reads from a file with multiple lines...
  14. Replies
    11
    Views
    2,811

    Segfault with additional variable?

    Has anyone encountered a situation where simply declaring an additional variable causes a segfault when reading a file? I have the following int variables declared:



    int array[20], i = 0,...
  15. Replies
    4
    Views
    14,797

    Ok, thanks for the replies. After nothing else...

    Ok, thanks for the replies. After nothing else worked, I just used a for loop to get what I needed from the array.



    int i;
    for (i = 0; i <= 8; i++){
    cout <<...
  16. Replies
    4
    Views
    14,797

    Well, it's not technically part of the...

    Well, it's not technically part of the assignment. I just wanted to fool around with the 2d arrays because half of the chapter is about them. My program is working fine now, but it's just the section...
  17. Replies
    4
    Views
    14,797

    substring of character arrays?

    I'm using the following code to put the contents of a a file into a 2D array.



    getline(readFile, line, '\n');
    while (!readFile.eof())
    {
    strcpy(getTheLine[s], line.c_str()); ...
Results 1 to 17 of 17