Blitz (34/64)

From:David McMinn
Date:18 Apr 2001 at 10:47:57
Subject:Re: moving shape

Hi amorel

> No matter what I try if i want the shape to move 135 degrees it either
> flickers a pixel up and down when I want it to move at same speed as 90
> degrees, or it does it smoothly but at twice the speed.

When you say flickers up and down, is that when you say x+1 in one frame and
then y+1 in the next - so you actually see it move right and then down
individually instead of right and down at the same time?

It's not actually twice the speed, it's the square root of 2 times the speed
(about 1.41) when you say x+1:y+1. The only way I can think of to make them
move at the same speed is to either speed up the shape moving at 90 degrees by
1.4 or slow down the shape at 135 degrees by 1.4.

This will slow the 135 degrees shape down by a factor of 1.4, but it might not
be the nicest thing to look at, and it certainly won't be the fastest code.
Speeding up the 90 degrees shape might be better.

pos.w=0
Repeat
If pos=0
x=x+1
y=y+1
Else
If pos MOD 3<>0
x=x+1
y=y+1
EndIf
EndIf
Blit shape,x,y

pos=pos+1
If pos=7 Then pos=0
Until 0



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@blitz-2000.co.uk
http://members.nbci.com/david_mcminn | ICQ=16827694
If ignorance is bliss, you must be orgasmic.

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list/-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list/-help@netsoc.ucd.ie