31
Technical forum / Re: The illusion of vehicle movement across the scene (on the X-axis)
« on: November 25, 2017, 07:35:44 PM »
Hey Mnemonic!
1. Do you mean something like this?
2. I want the vehicle to move left, like in the example gif from my original post. Will the code resemble something like:
Or do I understand you correctly at all?
3. I am creating a simple replica of the scene. How many layers should be in the scene? 3 or 4? I mean for background, emerging and disappearing house and back trees, the car itself (with floor region), and foreground with trees. Should those foreground tree entities be recycled one by one or as one long sprite?
THANK YOU for your kind reply and inspiration!
The van is basically staying in the same place (moving a little to the left and right)
1. Do you mean something like this?
Basically you'd need just one script, that would move it's owner entity by decreasing its X position, and if X is lower than some threshold, it would increase it again and repeat the process.
2. I want the vehicle to move left, like in the example gif from my original post. Will the code resemble something like:
Code: WME Script
Or do I understand you correctly at all?
while everything else moves. For example, the trees would be "recyclable" entities, that move from right to left, and when they're off screen, they skip back all the way to the right and then move through the screen again. Same for the fog, houses etc.
3. I am creating a simple replica of the scene. How many layers should be in the scene? 3 or 4? I mean for background, emerging and disappearing house and back trees, the car itself (with floor region), and foreground with trees. Should those foreground tree entities be recycled one by one or as one long sprite?
THANK YOU for your kind reply and inspiration!