Question: Processing (Java based) - Please working on processing environment!!!! I'm working on the 2d tile-based game and get confused regarding to the movement of the

Processing (Java based) - Please working on processing environment!!!!

I'm working on the 2d tile-based game and get confused regarding to the movement of the object between the tiles!

So basically the object is controlled using the arrow keys and it moves smoothly from tile space to another space (the center of one tile to center of another tile). Noting that the object is only stopped on a whole tile space, not part-way between the tiles(which means although the user released the key when the object between the boundaries of 2 tiles, it'll just keep moving till it reaches the next tile instead of suddenly appear at/ snap to the next tile or stop right away!)

Please give the example code of a map which consists grid of tiles 30x30 in which each tiles is 10x10 pixels. An object is a colored square that fit with the size of tile (10x10 pixels) and it can move smoothly to another tiles (within the screen) with the speed of 3 pixels per frame! Thank you in advanced!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!