[net.micro.amiga] Sprite and VSprite info?

hsgj@batcomputer.TN.CORNELL.EDU (Dan Green) (07/29/86)

   Sprites:  We've gotten physical sprites to work, and can move a couple
of them around with no problem; using the WaitTOF() and MoveSprite()
it is real easy.  Unfortunately we are experiencing flicker.  WaitTOF
(wait until top of frame passes) should synch our sprite with the display
so that it doesn't get cut off by the raster line, but the sprite is
still flickering.  Even Forbid() and Permit() around the entire program
(in case the kernel procs are interrupting) doesn't help any.
   Another problem:  VSprites.  Can't get these things to work at all.
The RKM is very vague on how one actually goes about defining these.
We've followed what info was given, which I think consisted of linking
it into a Gels structure, but there were many ambiguities and the acid
test -- running the thing -- produced a lot of smoke...

   So does anyone know of a good reference work on sprites or the
graphics lib.  Neither the new Addison Wesley RKM, nor the Commodore
one seem to cover it in enough detail.  Thanks for  any help.

Oh by the way, to the person who was interested in more forums for
discussing Amiga stuff:  Try Bix.  There are lots of Amiga developers
on that network too.  Contact BYTE Mag for info.   PS: No one on Bix
seems to be able to convince VSprites to work either.

-- Dan Green
-- 
ARPA:  hsgj%vax2.ccs.cornell.edu@cu-arpa.cs.cornell.edu
UUCP:  ihnp4!cornell!batcomputer!hsgj   BITNET:  hsgj@cornella

rj@amiga.UUCP (Robert J. Mical) (07/30/86)

In article <763@batcomputer.TN.CORNELL.EDU> hsgj@batcomputer.TN.CORNELL.EDU (Dan Green) writes:
>   Another problem:  VSprites.  Can't get these things to work at all.
>The RKM is very vague on how one actually goes about defining these.
>We've followed what info was given, which I think consisted of linking
>it into a Gels structure, but there were many ambiguities and the acid
>test -- running the thing -- produced a lot of smoke...

Do you have the 1.1 ROM Kernel Manual?  VSprites are defined pretty well
in there.  Refer to pages 2-113 to 2-129.  If you are programming under
Intuition, ignore the references to the MrgCop() and LoadView() functions,
and instead use the Intuition functions MakeScreen() and RethinkDisplay().

IMPORTANT:  a flaw in the RKManual -- after you initialize your GelsInfo
structure (by calling InitGels()) you *must* set the GelsInfo pointer
in your RastPort to the address of your GelsInfo structure.  This
little detail is omitted from the RKManual.  You most probably want
to use the RastPort of your Screen if you're using Intuition.  Something
like this:
    struct RastPort *rport;
    struct GelsInfo ginfo;

    InitGels(&headsprite, &tailsprite, &ginfo);
    rport = &OpenedScreen->RastPort;
-or-
    rport = address of your own RastPort if you're not using Intuition.

    rport->GelsInfo = &ginfo;


Hope this helps you guys.  Keep the faith.  RJ >:-{)*

carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (08/09/86)

In article <763@batcomputer.TN.CORNELL.EDU> hsgj@batcomputer.TN.CORNELL.EDU (Dan Green) writes:
>
>   Sprites:  We've gotten physical sprites to work, and can move a couple
>of them around with no problem; using the WaitTOF() and MoveSprite()
>it is real easy.  Unfortunately we are experiencing flicker. ...

>   Another problem:  VSprites.  Can't get these things to work at all.


   I just sent a dbuf.gels.c to the mod.amiga.sources moderator.
This is an example of double buffering with 2 Bobs and 2 VSprites in
an Intuition screen.

   I also sent ScrollPF.c (scrolling dual playfield example) and
ScreenDump.c (dumps highest window or screen with user settable image
and output options).

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=