Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!metro!ipso!fawlty!johnmac From: johnmac@fawlty.towers.oz (John MacLean) Newsgroups: comp.sys.apple2 Subject: Re: Animation Keywords: Animation Message-ID: <557@fawlty.towers.oz> Date: 26 Apr 91 05:40:27 GMT References: <1991Apr17.061057.22357@cs.uow.edu.au> Reply-To: johnmac@fawlty.ips.oz (John MacLean) Organization: Tower Technology, Lane Cove, NSW, Australia Lines: 35 In article <1991Apr17.061057.22357@cs.uow.edu.au> u9050728@cs.uow.edu.au (Shane Kelvin Richards) writes: > Hello. I am hoping someone can help me. I am developing a set of >animation routines for the //GS. So far its okay, BUT things are becoming >a tad slow when many objects are on the screen. Heres how I am doing it.. > [LDA / AND / ORA / STA instruction sequence deleted] > My question is, is my basic ideas/techniquie correct? Am I using >the wrong method for fast shape manipulation. OR am I using the correct >method and I should just try to improve upon my code and optimise where >I can? > For simplicity I only let shapes move by 2 pixels so that they >always fall on a byte boundary. Also, I am usin the 320x200 resolution. > Any ideas, what other techniques are there? >+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- >Shane Richards >u9050728@cs.uow.edu.au >+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- At this level there is nothing wrong with the technique you are using. One thing you can do is use the //ec softswitches, and to move zero page up to the super hires screen. Of course, this can be a bit nasty if your using GS/OS / interrupts / etc. Make sure you're using the most optimal addressing modes, you have the data bank set to bank 1 etc, etc. It is also a good idea to base your animation on VBL interrups / so that your code does not slow down as you add more and more shapes - just set a limit that has acceptable speed, and update every 3,4,5 VBLs - whatever seems reasonable. John MacLean. -- This net: johnmac@fawlty.towers.oz Phone: +61 2 427 2999 That net: uunet!fawlty.towers.oz!johnmac Fax: +61 2 427 7072 Snail: Tower Technology, Unit D 31-33 Sirius Rd, Home: +61 2 960 1453 Lane Cove, NSW 2066, Australia.