Do you know the best way to simulate flying??
twinpix
Member Posts: 49
I am developing a game with a plane "flying" in the center of the screen. The plane doesn't actually move so to simulate flying, I have trees below it that scroll left to right.
Basically the Tree behavior I created moves the Tree to off-screen far right after it passes the left side of the screen and out of view. Then it just continues looping across the screen and makes the plane look like it's flying.
Tree Actor:
Move: (direction 180, Speed 200, Relative to Screen)
Rule: When (self.Position.X) < (-self.Size.Width) then Change Attribute (self.Position.X) to (game.SceneWidth +500)
Is this the best way to implement this? Should I use Spawn Actor/Destroy Actor instead?
I'm hoping to have lots of actors moving like the trees and I need the best way to manage memory so it will play at a fast frame rate.
Suggestions?
Basically the Tree behavior I created moves the Tree to off-screen far right after it passes the left side of the screen and out of view. Then it just continues looping across the screen and makes the plane look like it's flying.
Tree Actor:
Move: (direction 180, Speed 200, Relative to Screen)
Rule: When (self.Position.X) < (-self.Size.Width) then Change Attribute (self.Position.X) to (game.SceneWidth +500)
Is this the best way to implement this? Should I use Spawn Actor/Destroy Actor instead?
I'm hoping to have lots of actors moving like the trees and I need the best way to manage memory so it will play at a fast frame rate.
Suggestions?
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Destroying actors does not release them from memory. This is ridiculous and needs to be fixed by Gendai FAST.