'Tiling' platforms - random gaps between Actors
TesseractEngine
Member Posts: 180
Hi all,
I'm working on a side scroller. Platforms and other scenery have been assigned a Motion.Linear.Velocity.X of -200. Some of this scenery is repeating, so, for example, I've got a 480 wide x 100 high Actor that's followed immediately to the right by another instance of the same Actor. There's a rule on the Actor that when Self.Position.X gets to < 240, it's to move to 720.
Problem is, the Actors get gaps between each other. Randomly-sized gaps. I'm assuming that because the Actors are in constant motion, the Self.Position.X change just isn't happening instantaneously, hence the gaps.
Anyone experienced this and found a workround?
Many thanks in advance,
- Mark
I'm working on a side scroller. Platforms and other scenery have been assigned a Motion.Linear.Velocity.X of -200. Some of this scenery is repeating, so, for example, I've got a 480 wide x 100 high Actor that's followed immediately to the right by another instance of the same Actor. There's a rule on the Actor that when Self.Position.X gets to < 240, it's to move to 720.
Problem is, the Actors get gaps between each other. Randomly-sized gaps. I'm assuming that because the Actors are in constant motion, the Self.Position.X change just isn't happening instantaneously, hence the gaps.
Anyone experienced this and found a workround?
Many thanks in advance,
- Mark
Best Answers
-
hotMagic Posts: 266We had a similar problem in Zig Zag Zombie. If you peek at the title screen, it has a parallax cinema. We ended up overlapping the lower brick pieces because, even when the math was right, we got gaps. That's rough if you have a tile-able art piece., but we didn't. So that's one work around.
-
rhinokey Posts: 158@TesseractEngine yeah thats what i'm doing " 'tile' Actors by placing them one after the other. There's no gaps appearing within any Actor, the gaps are between Actors,"
each "platform" in my video is at least 3 actors, a left end cap, middle and right endcap, the longer platforms have more middle actors in them.
are you using constrain attribute to make them move? or change attribute? i use constrain to keep any random weirdness from slowing them down. i also use constrain on y to keep them from movin down when the actor lands on them.
Answers
Luckily, this 'endless runner' version which needs the repeating scenery is only a prototype for the publisher. The finished levels will all be pre-built, not repeated.
None-the-less, though, if anyone else has any experience with getting the method to work exactly as planned, I'd love to hear about it...will help a heck of a lot with other planned games.
BTW, @hotMagic...I got Zig Zag Zombie when I read your Dev Profile about a month ago, great work!
I'm using tiling platforms with a lin motion movement and I'm not getting any gaps in them. I'm using a system where one platform spawns the following one offset from itself.
theres no overlaping and it seems to work fine.
on second thought, for the lin x i am not setting it in its motion panel, i am using a constrain atribute maybe the constrain is why i get no gaps
So, to clarify...I'm not using Tile in any of the Actor attributes. I'm trying to 'tile' Actors by placing them one after the other. There's no gaps appearing within any Actor, the gaps are between Actors, despite the maths being spot on for moving the off-screen Actor back to right-hand offscreen. Is this what you've done here, too, or is each platform one long Actor?
I made an example project earlier to illustrate the gaps:
http://tesseractengine.com/platformTileTest.gameproj.zip
Run it for a few cycles - I see gaps randomly appearing (sometimes) between the Actors. Size of gaps seems totally irregular, and are different sizes on different devices.
Ooh, nearly forgot to mention - this is using Constrain, too.
if you have a left middle and end like i do you could make the middle and end platforms move slightly faster but constrain to the correct movement as soon as they bump into the leading platform to make them bunch up. that's a pretty ghetto workaround, but just a suggestion.
That's an intriguing couple of thoughts... I'll try a version that spawns and destroys, see what that does... and I love the ghetto workaround, nice lateral thinking!
Thanks again mate.
Lump Apps and My Assets
Thank you!
Lump Apps and My Assets