Path: chuka.playstation.co.uk!news From: alex@teeth.demon.co.uk (Alex Amsel) Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Make a sprite change its frames Date: Mon, 28 Apr 1997 11:31:47 GMT Organization: Into Beyond Lines: 28 Message-ID: <336589c9.2505158@news.playstation.co.uk> References: <3363978B.1456@mbox.ulisse.it> Reply-To: alex@teeth.demon.co.uk NNTP-Posting-Host: teeth.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent .99g/32.335 On Sun, 27 Apr 1997 20:14:35 +0200, Paso did quoth at me: >Hi, >what's the best way to implement 2D sprite changing during movement? >I mean, in a game like a platform, how can I put down some code to make >frames changing during a sprite movement? (like a man walking) > >I already have some ideas but I want to know the best and fast way to do >this job. Each sprite refers to a texture page and a u,v coordinate. So you could layout your frames next to each other or whatever, and in each frame update the u,v and possibly texture page information. e.g. 2 frame animation Frame 1: u = 0, v = 0 Frame 2: u = 32 v = 0 This could be valid if your sprite was 32x32 and the next frame was definately to the right of the 1st frame. * Alex Amsel * Into Beyond Web Design & JAVA Programming * * http://www.intobeyond.com * WWFC Utter Rubbish 1996-7* MM - "Steve Corica is every bit as good as that Kinkladze"