Okay I’m new to this. Ex GSer. I just want to translate in x in a constant motion from offscreen on one side to offscreen on the other side. Then repeat itself. I can move with translation.to.x no problem. Is this the best way? And how do I repeat this? Also, I would like so randomly generate these “actors” across the screen. Thanks!! [import]uid: 10062 topic_id: 3293 reply_id: 303293[/import]
http://developer.anscamobile.com/forum/2010/02/11/continuous-scrolling-background [import]uid: 7911 topic_id: 3293 reply_id: 9897[/import]
See this
http://developer.anscamobile.com/forum/2010/10/30/moving-object
Also there is a discussion about GS and ive written a bit about the need to forget how GS works. There is really nothing in Corona that will help you develop a game except maybe the physics and sprites. For everything else you will need to develop you own functions / modules.
So forget about actors and the like and welcome to display objects and lots of lua!
Transitions are ok for just moving things simply, like a logo animating on for a splash screen. When chained together you can form complex animations but for most things, like in game movement you will probably need to program it.
So me it sounds like you want enemies flying across the screen, or something like that. On that basis a transition is ok, but its not the most practical as its pretty fixed in what it does, and what happens when you want something more complex, you wont be able to extend it.
Another way is with an enter frame loop and increasing ( or decreasing ) the .x value of the object. From this you could alter the .y as well and have it fly up and down. To extend that, you can then make the movement conditional with a couple of if statements, like if it gets close to the player you would stop the y movement and increase the x rate so it charges at the player.
Best was to start is to look in the Code Exchange, the samples Ansca provide and then start small and build up some sample projects to get the hand of things, like it sounds like you are doing.
Ive added a joystick in the code exchange, download it and play with the demos to see some movement
heres a physics one ive done ( quickly )
http://www.alienhorde.com/files/movement.zip
[import]uid: 5354 topic_id: 3293 reply_id: 9898[/import]
Sounds good. yea I’m really green at this stuff. But i’m going to give it a good try! Thanks! [import]uid: 10062 topic_id: 3293 reply_id: 9899[/import]