PDA

View Full Version : Dink Tiles 19 to 23



08-12-2002, 01:20 PM
Seth,

It seems the top 50 square pixels of tiles 19 to 23 don't actually update/change/cycle (or whatever you call it) - these are the firey pit tiles, and the top left is the left corner of the pit. Is this deliberate or a bug? Is there a defined limit on the delay between these tiles updating or does it depend upon the speed of the computer, memory etc?

Please let me know as I want to replace these tiles with another set, but not having them all change is preventing this.

08-12-2002, 01:42 PM
Okay... found a work around... just expand the tile size and put the missing 50 pixel square somewheres else... hehehe... should've thought outside the square first!

I'm still interested in finding out if this non-changing part of the tile is intentional and what the delay is though if you read this Seth. http://www.rtsoft.com/ib3/iB_html/non-cgi/emoticons/smile.gif

Seth
08-13-2002, 03:40 AM
I don't remember this so it must have been a bug. The animation speed is hardcoded into the .exe so it can't be changed. :/ The animation speed of the tiles should be the same speed on any computer.

08-13-2002, 12:06 PM
What is the speed in milliseconds, I'm curious....

SimonK
08-13-2002, 01:03 PM
Oh... and the playback seems to be influenced by the number of sprites on the screen... sort of like a kick start is needed when lots of new ones are coming without a preload. NB this is just an excuse to post http://www.rtsoft.com/ib3/iB_html/non-cgi/emoticons/tounge.gif

Seth
08-14-2002, 12:14 AM
When sprites are being loaded all game functions are frozen.

Also I went and took a look at the timing code and it's pretty weird, the water tiles flip randomly between 0 and 2000 milliseconds and chooses a random frame.

The fire tiles bounce through the anim in order but the timing code looks comment out so maybe it changes every frame? Or maybe it's actually using the random water timing. Heck, here is the code:

(disclaimer, this is ancient stuff, I no longer make variables called "cool" just for fun)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">void process_animated_tiles&#40; void &#41;
{
RECT rcRect;
int cool;
int flip;
int pa;

//process water tiles

if &#40;water_timer &#60; thisTickCount&#41;
{

water_timer = thisTickCount + &#40;&#40;rand&#40;&#41; % 2000&#41;&#41;;

flip = &#40;&#40;rand&#40;&#41; % 2&#41;+1&#41;;




for &#40;int x=0; x&#60;96; x++&#41;
{
if &#40;pam.t&#91;x&#93;.num &#62; 896&#41; if &#40;pam.t&#91;x&#93;.num &#60; &#40;896+128&#41;&#41;
{

cool = pam.t&#91;x&#93;.num / 128;
pa = pam.t&#91;x&#93;.num - &#40;cool * 128&#41;;
rcRect.left = &#40;pa * 50- &#40;pa / 12&#41; * 600&#41;;
rcRect.top = &#40;pa / 12&#41; * 50;
rcRect.right = rcRect.left + 50;
rcRect.bottom = rcRect.top + 50;


lpDDSTwo-&#62;BltFast&#40; &#40;x * 50 - &#40;&#40;x / 12&#41; * 600&#41;&#41;+playl, &#40;x / 12&#41; * 50, tiles&#91;cool+flip&#93;,
&rcRect, DDBLTFAST_NOCOLORKEY&#124; DDBLTFAST_WAIT &#41;;

}
}

}

//end of water processing


//if &#40;water_timer &#60; thisTickCount&#41;
{

// water_timer = thisTickCount + &#40;&#40;rand&#40;&#41; % 2000&#41;+1000&#41;;

if &#40;fire_forward&#41; fire_flip++;
if &#40;&#33;fire_forward&#41; fire_flip--;

if &#40;fire_flip &#60; 1&#41;
{
fire_flip = 5;
fire_forward = false;
}

// if &#40;fire_flip &#62; 4&#41;
// {
// fire_flip = 4;
//fire_forward = false;
//}



for &#40;int x=0; x&#60;96; x++&#41;
{
if &#40;pam.t&#91;x&#93;.num &#62; 2304&#41; if &#40;pam.t&#91;x&#93;.num &#60; &#40;2304+128&#41;&#41;
{

cool = pam.t&#91;x&#93;.num / 128;
pa = pam.t&#91;x&#93;.num - &#40;cool * 128&#41;;
rcRect.left = &#40;pa * 50- &#40;pa / 12&#41; * 600&#41;;
rcRect.top = &#40;pa / 12&#41; * 50;
rcRect.right = rcRect.left + 50;
rcRect.bottom = rcRect.top + 50;


lpDDSTwo-&#62;BltFast&#40; &#40;x * 50 - &#40;&#40;x / 12&#41; * 600&#41;&#41;+playl, &#40;x / 12&#41; * 50, tiles&#91;cool+fire_flip&#93;,
&rcRect, DDBLTFAST_NOCOLORKEY&#124; DDBLTFAST_WAIT &#41;;

}
}

}

//end of water processing



}
[/QUOTE]<span id='postcolor'>

SimonK
08-14-2002, 02:10 AM
Thanks Seth... I don&#39;t know code very well... can&#39;t see immediately where the delay factor for fire figures... but it&#39;ll give me something to mull over http://www.rtsoft.com/ib3/iB_html/non-cgi/emoticons/wow.gif

-WC-
08-14-2002, 10:29 PM
Keep posting code, i&#39;m collecting it&#33; http://www.rtsoft.com/ib3/iB_html/non-cgi/emoticons/smile.gif

Dukie
08-15-2002, 10:58 PM
It&#39;s Seth&#39;s actual code&#33;&#33;&#33;
I can&#39;t believe I get to witness this..
More&#33;&#33;&#33;&#33; (Like the Dink Smallwood source http://www.rtsoft.com/ib3/iB_html/non-cgi/emoticons/laugh.gif )