IF (UserInput$ = "o") AND (Player1.Y > 1) AND (Get1Input = 1) THEN
' Move P1 up
Player1.Y = Player1.Y - 2
Get1Input = 0
ELSEIF (INKEY$ = "l") AND (Player1.Y < 175) AND (Get1Input = 1) THEN
' Move P1 down
Player1.Y = Player1.Y + 2
Get1Input = 0
END IF
for the player and it only moves the player slightly up/down about every 5 or so seconds.
HOWEVER, with using this code to exit the program:
Check your movements. The IF statement looks for a coordinate greater than 1 while your move is 2. Sooner or later it could be 0 or 1 which will not move anything.
Also where is the code to actually move the object? You just change the coordinate variable value in the code provided.
Dot variables are used for TYPE variables normally. Where is that code?
If you continue asking questions while supplying SPARSE information and code then I will ignore your posts and so may others.
' Save the old positions for blanking
Player1.OldX = Player1.X
Player1.OldY = Player1.Y
Player2.OldX = Player2.X
Player2.OldY = Player2.Y
' Blank the sprites
PUT (Player1.OldX, Player1.OldY), sprPlayer1
PUT (Player2.OldX, Player2.OldY), sprPlayer2
If you are using INKEY$ for 2 players pressing keys at the same time it will not work well.
Use Scancodes instead. You can store multiple presses into an array so that more keypresses can be checked. See my Q-basics demo download below. Check Chapter 12 for scan codes and a multikey code example. Chapter 13 shows how the GET and PUT routines can move sprites on a background. Even diagonally.
DIM SC(127) AS INTEGER
DO
t! = TIMER + .05
DO ' 1 Tick (1/18th second) keypress scancode read loop
a$ = INKEY$ ' So the keyboard buffer won't get full and beep
code% = INP(&H60) ' Get keyboard scan code from port 96
IF code% < 128 THEN SC(code%) = 1 ELSE SC(code% - 128) = 0 ' place true/false values into array
LOOP UNTIL TIMER > t!' loop until one tick has passed
' coordinate change code
' GET and PUT code
LOOP UNTIL SC(1) = 1 'escape exit