Hello,
I recently started using Corona and Lime(Coming from the flash and AIR world) and so far I’m very happy. I’m creating a top down game where you move boxes. Pretty simple. I want my movement to be tied to the grid. For example, when you hit left, the character will move 32 pixels to the left. I’m not 100% understanding movement in Corona and Lime as it seems to be very physics based. I’m still getting my bearings here as far as resources go, so a point in the right direction would be appreciated!
[import]uid: 114566 topic_id: 20232 reply_id: 320232[/import]
After more research I’ve got a plan of attack, however I’m not sure if it’s the standard way to do it. My plan is to first turn gravity off. Then on keypress I will use applyForce to put either a force in the X or Y direction. I’ll mark the location in a variable, and have a flag called isMoving. While the character is moving, all movement will be disabled. On the Update Function I will see if the character has moved 32 pixels and set isMoving to false. I haven’t had a chance to start coding all of that to tweek it, but I think that’s my plan of attack. However, this may be an awful way to go. I’ll post some code snippets when I get a chance to get in front of my development computer! [import]uid: 114566 topic_id: 20232 reply_id: 79516[/import]
One of the samples that comes with Lime might be able to help you, it’s for Iso maps but the same principals could be used. It’s called “BasicRPGMovement”. [import]uid: 5833 topic_id: 20232 reply_id: 80206[/import]