Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6031

Re: Saving animated sprites from a simple BASIC graphic program

From Richard Ashbery <basura@invalid.addr.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Saving animated sprites from a simple BASIC graphic program
Date 2020-03-18 17:44 +0000
Organization None
Message-ID <5853462123basura@invalid.addr.uk> (permalink)
References <5852bdfc1cbasura@invalid.addr.uk> <mpro.q7d0hi02ez29u026f.news@stevefryatt.org.uk>

Show all headers | View raw


In article <mpro.q7d0hi02ez29u026f.news@stevefryatt.org.uk>, Steve
Fryatt <news@stevefryatt.org.uk> wrote:
> On 17 Mar, Richard Ashbery wrote in message
>     <5852bdfc1cbasura@invalid.addr.uk>:

> > How should I do this please? Some simple code examples would be
> > appreciated.

> Is there any chance of seeing your current code?

MODE 1920,1080,32 : OFF
T2=0
 n=0
REM Set up rotation variable for square
FOR m=0 TO 6*PI-PI/12 STEP PI/6
  REM Set offset for ORIGIN (full circle)
  X1=SIN RAD(T2)*100
  Y1=COS RAD(T2)*100
  ORIGIN 1920+X1,1080+Y1
  T2+=10
  GCOL 3,63 : PROCdraw_square
  z=INKEY(10)

  REM Generate sprite group for animation
  MOVE-330,-330
  MOVE 330,330
  VDU 23,27,1,n|
  n+=1

  REM Erase previous square after a delay
  GCOL 3,63 : PROCdraw_square

NEXT m
END

DEF PROCdraw_square
FOR T = 0 TO 2*PI STEP PI/2
  X=SIN(T+m)*200
  Y=COS(T+m)*200
  IF T=0 THEN MOVE X,Y ELSE DRAW X,Y
NEXT T
ENDPROC

As suggested by Chris I've eliminated CLG and substituted the EOR
GCOL 3,63. Running program displays an offset square as expected but
when the sprites are saved the offset is missing and clearly absent when
viewing sprites in !Paint. Could this be a problem with the way the
program collects the sprite data?

The rather strange looking FOR m=0 TO 6*PI-PI/12 STEP PI/6 statement
ensures the rotation of the shape returns to its start position and
avoids judder when the animation starts again.


Richard

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-17 16:57 +0000
  Re: Saving animated sprites from a simple BASIC graphic program "John Williams (News)" <UCEbin@tiscali.co.uk> - 2020-03-17 17:28 +0000
    Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-17 20:30 +0000
      Re: Saving animated sprites from a simple BASIC graphic program "John Williams (News)" <UCEbin@tiscali.co.uk> - 2020-03-17 21:12 +0000
        Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-17 21:23 +0000
      Re: Saving animated sprites from a simple BASIC graphic program News <chrisjohnson@spamcop.net> - 2020-03-17 23:39 +0000
  Re: Saving animated sprites from a simple BASIC graphic program Steve Fryatt <news@stevefryatt.org.uk> - 2020-03-17 22:44 +0000
    Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-18 17:44 +0000
      Re: Saving animated sprites from a simple BASIC graphic program druck <news@druck.org.uk> - 2020-03-18 20:55 +0000
      Re: Saving animated sprites from a simple BASIC graphic program Steve Fryatt <news@stevefryatt.org.uk> - 2020-03-19 00:08 +0000
        Re: Saving animated sprites from a simple BASIC graphic program Steve Fryatt <news@stevefryatt.org.uk> - 2020-03-19 07:38 +0000
          Re: Saving animated sprites from a simple BASIC graphic program News <chrisjohnson@spamcop.net> - 2020-03-19 10:17 +0000
          Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-19 20:05 +0000
            Re: Saving animated sprites from a simple BASIC graphic program Steve Fryatt <news@stevefryatt.org.uk> - 2020-03-19 21:10 +0000
              Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-19 21:59 +0000
      Re: Saving animated sprites from a simple BASIC graphic program Matthew Phillips <spam2011m@yahoo.co.uk> - 2020-03-19 08:23 +0000
        Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-19 13:34 +0000
          Re: Saving animated sprites from a simple BASIC graphic program Matthew Phillips <spam2011m@yahoo.co.uk> - 2020-03-19 21:10 +0000
            Re: Saving animated sprites from a simple BASIC graphic program Richard Ashbery <basura@invalid.addr.uk> - 2020-03-19 21:40 +0000
  Re: Saving animated sprites from a simple BASIC graphic program "Derek.Moody" <derek.moody@casterbridge.net> - 2020-03-17 18:05 +0000

csiph-web