[net.micro.amiga] Help with Animation

ray@unlv.UUCP (05/25/86)

	I am having troubles with the Animation system that comes with
	the system kernel (V1.1  Animate(), et al.).

	My animation object has 4 sequences, each sequence made
	up of an AnimComp with only 1 bob per comp.  I am *pretty*
	sure that I have initialized all of the structures for
	the AnimOb (an AnimComp, Bob, and VSprite for each view).

	I am trying to get my AnimOb to start in position 100-Y,
	50-X, but it always gets drawn in the upper-left corner of
	my screen.  I have set the AnX and AnY fields in the AnimOb
	structure to my desired initial values, but it seems to ignore
	it.  I have also set the X and Y positions in the Bob's VSprite
	structure to my initial values with no change.  I have mixed
	and matched setting the AnimOb only, the Bob only, and
	combinations of both, but still come up with the same thing-
	my AnimOb starts from the upper left corner.

	My AnimOb moves fine, the
		Animate();
		SortGList();
		DrawGList();
	calls work fine - at least as far as having my AnimOb
	move across the screen and change views, but the initial
	position is screwed up.

	Also note that I grabbed the swimming fish demo that was
	posted by C-A, and it ran fine, however, when I tried to change
	the X-Y positioning of that thing, the position stayed the
	same as before.

	There must be something very basic that I am missing.  If
	anyone out there could offer any help, it would greatly be
	appreciated.

	Thanks in advance.
					--Ray Tripamer
					University of Nevada, Las Vegas	
					!seismo!unrvax!unlv!ray

nick@hp-sdd.UUCP (Nick Flor) (05/27/86)

>	I am trying to get my AnimOb to start in position 100-Y,
>	50-X, but it always gets drawn in the upper-left corner of
>	my screen.  I have set the AnX and AnY fields in the AnimOb
>	structure to my desired initial values, but it seems to ignore
>	it.  I have also set the X and Y positions in the Bob's VSprite
>	structure to my initial values with no change.  I have mixed
>	and matched setting the AnimOb only, the Bob only, and
>	combinations of both, but still come up with the same thing-
>	my AnimOb starts from the upper left corner.
HAHAHAHAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAWHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA
Hint -- LSR  #6,DN ; This was my hint as to what was going on.

Sorry to laugh.  I ran across the same problem.  
None of the Amiga people were any help.  Neither was the net.  
Perhaps I should tell you to use WACK and single step through the
assembly language for the Animate command, (like I did) but I won't...

THE PROBLEM:
The problem is that most (if not all) the position variables/fields are fixed 
point numbers.  
AnX,AnY fields are fixed point numbers (26.6??? -- I forget), not 32.0.
I think RingTriggerX,Y and TransX,Y are 26.6 numbers too.
You were trying to start at 100,50, but since you specified a 32.0
number, the routine was plotting it at 100/64, 50/64.

So, multiply your numbers by 2^6, and everything should be alright.

Nuff said.

Now, will someone help me with my FFP problem.  Does someone have a program
that actually uses the SPSin, SPCos routines?  I can't seem to get it to
work.  And I don't want to single step with WACK again...
And is the net interested in a Robotron-like game?

Nicko 
-- 

----------
Nick V. Flor 
..hplabs!hp-sdd!nick

"You going to help me find a Thylacine?"
'Nope'
"But IBob needs the whiskers to close the gaps between our world and the next.
 Hideous creatures are pouring through even as we speak"
'What hideous creatures?'
"Richard Simmons! John McEnroe! Mary Lou Retton! Sally Jessie Raphael!
 I hardly know where to stop"

-- The Badger to the Wombat

mykes@3comvax.UUCP (05/28/86)

In article <237@hp-sdd.UUCP> nick@hp-sdd.UUCP (Nick Flor) writes:
>
>Now, will someone help me with my FFP problem.  Does someone have a program
>that actually uses the SPSin, SPCos routines?  I can't seem to get it to
>work.  And I don't want to single step with WACK again...
>And is the net interested in a Robotron-like game?
>
>Nicko 
>-- 
>

How about this for a trick (I bet it is even faster than FFP).  The standard
video game trick is to use your fixed point math and a calculator to generate
a lookup table of sines/cosines.  The overhead of the lookup has got to be
a lot less than the subroutine call to the FFP routine, it can be stored in
an optimal format (you should be doing all of your object locations in fixed
point).  As a matter of fact, I think I will post a short tutorial on how
the "true" coin-op arcade machine operating systems worked (I used to write
video games for Stern, makers of Berserk, Scramble, Super Cobra, etc.).

jdg@elmgate.UUCP (Jeff Gortatowsky) (06/02/86)

In article <523@3comvax.UUCP>, mykes@3comvax.UUCP (Mike Schwartz) writes:
> As a matter of fact, I think I will post a short tutorial on how
> the "true" coin-op arcade machine operating systems worked (I used to write
> video games for Stern, makers of Berserk, Scramble, Super Cobra, etc.).

I'd enjoy seeing this.  Don't make it too short!  Tricks & Tips are always
welcome!   Post away!
-- 
Jeff Gortatowsky       {allegra,seismo}!rochester!kodak!elmgate!jdg
Eastman Kodak Company  
<Kodak won't be responsible for the above comments, only those below>