Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 14,141 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animation w/ bitmaps #221448
08/14/08 03:08
08/14/08 03:08
Joined: Aug 2006
Posts: 70
NJ
S
SirCamaris Offline OP
Junior Member
SirCamaris  Offline OP
Junior Member
S

Joined: Aug 2006
Posts: 70
NJ
I created one large bitmap and divided it into equal portions. Each portion serves as a single animation frame. I'm able to cycle through the frames, however my code to do so is redundant. Here is a sample:
while (1)
{if (key_cud == 1)
{animate_x = 0;
animate_y = 60;
wait(wait_time);
animate_y = 120;
wait(wait_time);
}
else animate_y = 0;
I tried "animate_y += 60;", but this only skips to 120, completely by passing frame 60. Please offer suggestions.

Re: Animation w/ bitmaps [Re: SirCamaris] #221452
08/14/08 03:36
08/14/08 03:36
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
im not sure what you re doing with your code there but animated sprites can be animated with frame , like my.frame+=10*time;

Re: Animation w/ bitmaps [Re: SirCamaris] #221453
08/14/08 03:36
08/14/08 03:36
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
have you looked in the manual?

while (1) {
my.frame += time_step; // 16 frames per second
if (my.frame > 30) { my.next_frame = 20; } // interpolate to start frame
else { my.next_frame = 0; } // interpolate to FRAME+1
if (my.frame >= 31) { my.frame -= 10; } // if end frame reached, skip back
wait(1);
}

use somewhere in the code
while(!key_cud){wait(1);}
to make it pause


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1