Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6040
| 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-19 20:05 +0000 |
| Organization | None |
| Message-ID | <5853d6e7f9basura@invalid.addr.uk> (permalink) |
| References | <5852bdfc1cbasura@invalid.addr.uk> <mpro.q7d0hi02ez29u026f.news@stevefryatt.org.uk> <5853462123basura@invalid.addr.uk> <mpro.q7ez2g027ab040401.news@stevefryatt.org.uk> <mpro.q7fjw401gp24s01ps.news@stevefryatt.org.uk> |
In article <mpro.q7fjw401gp24s01ps.news@stevefryatt.org.uk>, Steve Fryatt <news@stevefryatt.org.uk> wrote: > On 19 Mar, Steve Fryatt wrote in message > <mpro.q7ez2g027ab040401.news@stevefryatt.org.uk>: > > On 18 Mar, Richard Ashbery wrote in message > > <5853462123basura@invalid.addr.uk>: > > > be a problem with the way the program collects the sprite data? > > > > As Druck says, VDU23,27,1,n| is ugly, and quite dated. I wouldn't > > be completely surprised if it doesn't take the ORIGIN setting > > into account, but I can't see any reference to that foible in the > > manual. > You're grabbing a screenshot from (-330,-330) to (330,330) relative > to the current origin (0,0), but at the same time, you're moving > that origin around to shift the centre of your square. But, of > course, this /also/ moves the centre of the (-330,-330) to > (330,330) screen grab, so the grabbed area will /always/ be > perfectly centred on the square that you've just plotted. Ah! yes obvious when I think about it. > I still don't like VDU23,27,1,n| though... Although this method of creating a sprite group is probably poor/deprecated it's easy to understand. I need to get my head round the alternative (OS_SpriteOp). Although I've been told its easy the last time I looked I didn't find it plain sailing - I need a good tutorial - I'll do a web search and see what turns up. > > However, using ORIGIN seems unnecessary anyway. Why not just plot > > at the required coordinates, and bypass all of the problems? > By not moving the (0,0) point around, but instead plotting the > square at the desired coordinates relative to a single, fixed > origin, the square will, of course, move within the static > (-330,-330) to (330,330) rectangle as intended. Excellent explanation - thanks :-) Of course your program changes work superbly. Again thanks. > I would suggest treating ORIGIN as a command to call once, after > MODE. After that, always calculate the exact coordinates that you > need for each stage of the graphic. This is no harder than moving > the origin, as you can see from my code, and completely avoids this > kind of confusion. Yes, I see that now and is vastly better. Richard
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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