RPG game zoom/graphics
Monkey Forums/Monkey Programming/RPG game zoom/graphics
| ||
Hi everyone, I have been working on my RPG game which I have made a few posts about recently. I am using the default 640*480 resolution with 16*16 pixel tiles. The map is looking good and everything is drawing correctly, however I am trying to figure out a way to have the game 'camera' fixed on the player. At the moment, the player can see the entire level, and everything is very small. Is there a way to 'zoom in' to the map, and have the camera follow the movement of the player? I am using the free version of Monkey-X with the default mojo module as my platform. Thanks! Brad |
| ||
You could just paint everything with an offset. Basically you move the player and increase/decrease its x and y values of the position. But instead of moving the player you move the underlying map. |
| ||
did you look into mojo.Translate and mojo.Scale? |
| ||
Extra; if you want that game looks same in 1920*1080 as in 640*480 you can calculate Virtualscale by: device resolution with your resolution if point at 640 should be at right side (640*3.0 = 1920) it is (probaply only needed in ios/android or so..) |
| ||
Thanks for the reply, I'll definitely look into this! |
| ||
sorry about my not working example :D here is working one.. |