Search:

Type: Posts; User: nothing909

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    62
    Views
    29,831

    So how am I supposed to delay it without delaying...

    So how am I supposed to delay it without delaying everything, there must be some way
  2. Replies
    62
    Views
    29,831

    I've already googled things and I've seen people...

    I've already googled things and I've seen people talking about a delay which im trying to implement, but the only problem I'm having is that it's not only delaying the paddle it's delaying the ball...
  3. Replies
    62
    Views
    29,831

    why can't i just line the y paddle up with the y...

    why can't i just line the y paddle up with the y ball, but when it moves the y paddle is slower than the ball, so sometimes when the player hits the ball back it cant follow it fast enough and it...
  4. Replies
    62
    Views
    29,831

    it is already coded like that. the ball will...

    it is already coded like that. the ball will always hit the paddle in the centre.

    i thought that adding the delay for the paddle increments that it would make the ball hit it off centre sometimes...
  5. Replies
    62
    Views
    29,831

    can you reword that, i dont know what u mean,...

    can you reword that, i dont know what u mean, what should i do?
  6. Replies
    62
    Views
    29,831

    its 1 player against the computer. the part of...

    its 1 player against the computer. the part of code i'm putting the delay in is the computer controlled racket. right now, the way the code is without the delay, the y of the racket will follow the y...
  7. Replies
    62
    Views
    29,831

    i think i've kinda worked out why this is...

    i think i've kinda worked out why this is happening and i'm hoping you can help me fix it.

    when i'm putting in a delay of say 50000, it is actually delaying like i want it to, but here's the...
  8. Replies
    62
    Views
    29,831

    if i set the delay to 50000, it will delay...

    if i set the delay to 50000, it will delay everything on the screen instead of just the racket (yR2) as intended.
  9. Replies
    62
    Views
    29,831

    this is honestly so confusing as to why this is...

    this is honestly so confusing as to why this is doing this.

    whats happening now is, when i change it to long int, the values no longer get truncated, but when i run the program, nothing will show...
  10. Replies
    62
    Views
    29,831

    when i put the number to like 40000, i get a...

    when i put the number to like 40000, i get a warning says the integer conversion resulted in a change of sign. do you know what the cause of this might be?
  11. Replies
    62
    Views
    29,831

    i can't post all the the code, there's tons of it...

    i can't post all the the code, there's tons of it with many different libraries.

    the code i provided is AI for a racket. the racket is tracking the y coordinate of the ball and moving with it. i...
  12. Replies
    62
    Views
    29,831

    Changing it the maximum amount without truncating...

    Changing it the maximum amount without truncating doesn't delay the racket movement, in fact it makes the screen a little laggy
  13. Replies
    62
    Views
    29,831

    when i try 500000000000, it says it results in...

    when i try 500000000000, it says it results in truncation
  14. Replies
    62
    Views
    29,831

    is the number is miliseconds?

    is the number is miliseconds?
  15. Replies
    62
    Views
    29,831

    okay, i've got the header file. i'm using the...

    okay, i've got the header file. i'm using the code



    void delay(int n)
    {
    volatile int i;
    for (i = 0 ; i < n ; i++)
    ;
    }
  16. Replies
    62
    Views
    29,831

    sorry, i feel like i'm being a nuisance because...

    sorry, i feel like i'm being a nuisance because of my inexperience programming, but can you show me how to write this possibly?
  17. Replies
    62
    Views
    29,831

    #include

    #include <unistd.h>
  18. Replies
    62
    Views
    29,831

    i'm so confused, i've never used dos.h before. i...

    i'm so confused, i've never used dos.h before. i thought creating a delay was an easy little thing.

    in my code the way it, can you explain how i can create a simple delay without using delay or...
  19. Replies
    62
    Views
    29,831

    i can't add that "source file cannot be found.

    i can't add that "source file cannot be found.
  20. Replies
    62
    Views
    29,831

    if i remove the unsigned int delay = 1000; and...

    if i remove the unsigned int delay = 1000;

    and i just have delay(1000);

    it now says on the delay(1000) line that delay is being declared implicitly. what does this mean
  21. Replies
    62
    Views
    29,831

    they're all global variables, that isn't the...

    they're all global variables, that isn't the problem
  22. Replies
    62
    Views
    29,831

    the code i provided is for a pong game, its just...

    the code i provided is for a pong game, its just delaying the racket movement
  23. Replies
    62
    Views
    29,831

    i don't think my compiler has the sleep function,...

    i don't think my compiler has the sleep function, it doesn't work.

    could you please look at my first post, with the code i gave and explain the reason why it wouldn't work because i still don't...
  24. Replies
    62
    Views
    29,831

    could you please explain, relating it to my code,...

    could you please explain, relating it to my code, how i can use a sleep function. i don't know if this is correct, but if i do:



    void AI(void){
    unsigned int sleep = 1000;


    if (yR2...
  25. Replies
    62
    Views
    29,831

    void AI(void){ unsigned int delay = 1000; ...

    void AI(void){
    unsigned int delay = 1000;


    if (yR2 > yBall)
    {
    if (yR2 > RACKET )
    {
    delay(1000);
    yR2--;
Results 1 to 25 of 33
Page 1 of 2 1 2