An Observation About moving fields

Started by Ebon Heart, January 17, 2012, 10:11:06 PM

Previous topic - Next topic

Ebon Heart

I was doing a proof of concept test, in which every frame matters for moving my creeper monster around (it's gonna rock, just fyi) and I came across a rather frustrating bug/feature. (I hope it's a bug) when moving pin fields, it doesn't seem to distribute distance-per-frame quite as evenly as I thought. What happened was,  I broke my little dragon thing for the test up into sections to move... and have it moving 1 subcell every 2 frames. It performs as expected except for the last few frames. As the fields approach their destination, the distance they cover per frame changes, and it's only in the last 2 subcells, too. I took some pictures... see below. In the 25th frame, it's fine. All the sections of the dragon are headed towards that top section. In the 27th frame, all of the rows move, just as I'd expect them to..... except the very top one. In the 28th frame, the top row finally moves a frame late, stretching out the dragon's squished head. Then in the 29th frame, the top field moves again, this time a frame early. (1 frame, instead of the normal 2, and the 3 just a moment before) And you can see the damage that one error has caused. As it continues, every row behaves like that, stretching the dragon drastically out of proportion. Can anyone explain why it behaves like that/how I fix it??? I'll also attach the map so you can watch what's happening frame by frame.
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

J

#1
Strange, I tried to speed up every section with 1 frame and it worked, I don't know why, but it did. The 3 fields moving the creeper to the next part only do that every 4 frames while a row of your dragon comes every 2 frames, duplicate them and give the duplicated ones an initial dalay of 2 frames.

Another way to fix this is just making the dragon as one field and move it out of the box (like I did in Day 24 with the cubes).

Ebon Heart

Quote from: J on January 18, 2012, 04:22:14 AM
Strange, I tried to speed up every section with 1 frame and it worked, I don't know why, but it did. The 3 fields moving the creeper to the next part only do that every 4 frames while a row of your dragon comes every 2 frames, duplicate them and give the duplicated ones an initial dalay of 2 frames.

Another way to fix this is just making the dragon as one field and move it out of the box (like I did in Day 24 with the cubes).
With the plans I have for it, that won't work. It's supposed to turn... And the real dragon is a huge thing, 8 blocks wide, 45 blocks long. But increasing the time it takes to move by 1 does work??? Interesting... (and yes, I know my timing for the teleporting fields is wrong, I've been testing solutions to that)
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

J

I didn't have much time to test it so there could still be some bugs in it, but I've never seen something like it did before. (They all did it on the same row)

Ebon Heart

Quote from: J on January 18, 2012, 08:02:25 AM
I didn't have much time to test it so there could still be some bugs in it, but I've never seen something like it did before. (They all did it on the same row)
I know, that's why it's so odd. I wonder if odd numbers would work better.... Oh well. I changed it up on the real level so that the fields are actually moving one cell farther than where the creeper is picked up.
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!

Ebon Heart

I finally got this to work! Basically, you have to decrease the total movement time by one half the time it should take it to cross one subcell. IE: You have it set to cross 10 subcells in 40 frames (4 frames/subcell), decrease the total movement time by 2 frames so that it crosses 10 subcells in 38 frames. It works perfectly. :D
When the going gets tough, the tough get going. The smart left a long time ago.
Check out the amazing A Tragedy Forgotten CW2 map series!