1. Hazy and vague
- Posted by Paul Kerslake <paulk at UNISERVE.COM> Aug 06, 2000
- 347 views
------=_NextPart_000_0054_01BFFFBF.08B0BCA0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In my last e-mail I wrote: Here's a biggie: I know how to make a program that can move an image=20 (text or bitmap) around the screen using the arrow keys (or any other=20 key fot that matter), but, how can I have frames? e.g. Having a bitmap of a space-ship and, when it moves, animate the fire=20 coming out the back. I got an e-mail back telling me it was hard to figure out just what I=20 wanted.... I find this rather hard to explain... I think what I'm looking for is=3D how to make an animated bitmap that repeats itself. - Sorry for the enigma ------=_NextPart_000_0054_01BFFFBF.08B0BCA0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>In my last e-mail I = wrote:<BR><BR><EM>Here's a=20 biggie: I know how to make a program that can move an image <BR>(text or = bitmap)=20 around the screen using the arrow keys (or any other <BR>key fot that = matter),=20 but, how can I have frames?<BR><BR>e.g.<BR>Having a bitmap of a = space-ship =20 and, when it moves, animate the fire <BR>coming out the = back.</EM><BR><BR>I got=20 an e-mail back telling me it was hard to figure out just what I=20 <BR>wanted....<BR>I find this rather hard to explain... I think what I'm = looking=20 for is=3D<BR>how to make an animated bitmap that repeats = itself.<BR><BR><BR><BR>-=20 ------=_NextPart_000_0054_01BFFFBF.08B0BCA0--
2. Re: Hazy and vague
- Posted by Undetermined origin c/o LISTSERV administrator Aug 06, 2000
- 355 views
Paul Kerslake wrote: > In my last e-mail I wrote: > > Here's a biggie: I know how to make a program that can move an image > (text or bitmap) around the screen using the arrow keys (or any other > key fot that matter), but, how can I have frames? > > e.g. > Having a bitmap of a space-ship and, when it moves, animate the fire > coming out the back. > > I got an e-mail back telling me it was hard to figure out just what I > wanted.... > I find this rather hard to explain... I think what I'm looking for is= > how to make an animated bitmap that repeats itself. > > - Sorry for the enigma Ok. Basically, make a sequence of bitmaps in the animation, and a variable with an index into the animation sequence (i.e. the frame). Then, in a loop, display the current frame, wait a short while, increment the index (set it back to 1 after it's gone through the animation), and display the new frame. The way to implement this depends on the specifics of your program (i.e. what events your program has to handle etc.). I wrote a simple game in Euphoria a while ago. As it got more complex, the system I had used to process events, redraw the screen etc. became unmanagable. I wrote an event system library (Event System for Euphoria or ESE - it's in the archives) and a game library to go with it. You might find it useful. The graphics portion is not quite complete, but it has several other features including keyboard event handling and timers amoung other things. It provides a simple event interface, and also allows some extremely simple cooperative multitasking. This way you can handle keyboard events etc. and still use timers to time your animation (so it won't be choppy). Jeffrey Fielding JJProg at cyberbury.net