Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Animated sprites, jpgs and Pngs

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Oct 2003 00:36 Edited at: 9th Oct 2003 00:37
I've tried to introduce an Animated Sprite into my HUD. If I use a PNG file, it doesn't show up at all. If I use a jpg, I simply get a grey square

Here's the code, I've never used animated sprites before so I may be doing something very wrong. The texture image is 2 frames, side by side, the image is 60x30.



To test everything else is Ok, I created a standard sprite from the same image. This was OK.

Can anyone help me here?

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 9th Oct 2003 02:10
First off, there are some MAJOR bugs with animated sprites, specially the PLAY SPRITE command. see here: (http://www.thegamecreators.com/?m=forum_view&t=15999&b=15)

Best bet for now until bug is fixed is to have an extra frame and make first frame blank. You can then set frame to first 'proper' frame and play rest of frames.

Following code will make a 90 * 30 bitmap which is 3 frames side by side. frame1 is blank, frame2 is small circle, frame3 is big circle.
It will play last two frames with interval at half a second



If your mansion house needs haunting, just call Rentaghost!
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 9th Oct 2003 09:29
How about making the frames as separate images and handling the sprite images by hand?

Login to post a reply

Server time is: 2024-05-05 10:49:50
Your offset time is: 2024-05-05 10:49:50