Return to Index  

Still the problem

June 7 2003 at 3:03 AM
Andrew 
from IP address 195.92.168.169


Response to also...

 

This is the situation:
I've made a pong game in graphics mode on screen 12. To give handicaps to players and to vary the ball speed I require them to move at different speeds. I would like to do this without having them "jump", so they move by moving 2 or 3 pixels at a time, I want them to move through every pixel they go through. This helps collisions to work. I had thought of moving the characters in the way you described but I had realised that it would not work due to the way I've programmed the game.

What I've tried is this (since the last post). Each loop of the program involves the for..next delay, and the key inputs. Then for each player, A and B, they each have a delay set at the start, for example 2 for A and 5 for B. So A does a movement every 2 loops of the program and B every 5 loops (which is quite easy to set up). The problem I have now is that if one is not moving the program runs faster, so the speeds always vary. Maybe this is because when the players are not moving the program skips past their part involving movement of the bat etc. If I changed this (so that it runs through anyway and pastes their position on the screen despite no movement) would it work? Or do I need to use a different method to achieve what I want?
Thanks for all your help
Andrew

 
 Respond to this message   
Responses

Create your own forum at Network54
 Copyright © 1999-2009 Network54. All rights reserved.   Terms of Use   Privacy Statement