libgdx & tiled how to render specific tiles?
I have a large tmx map which I made in Tiled. I am using libgdx to render the tmx map. I would like to know how can I render specific tiles. For example I have a 100x100 tile/tmx map. Player entity spawns in 10,30 (x,y) I only want to render around the location of the player entity (or for any entity, and control the seeing distance within the respective entity class). How can I use libgdx to selectively render like this? I tried setting rendering bounds to camera but not working like I want.
I want to be able to zoom in/out of overall map (which would look dark/completely blacked out) except for the parts where an entity sprite is located. Looking to maintain the fog of war around the entity sprite.. and multiple entities.
Should I pass renderer into the entity constructor? multiple cameras? How can I do a layered effect where i have another 100x100 blacked out tilemap on top of the actual map and have it so the alpha around entities is 0? (bear in mind im using tmx maps)
链接地址: http://www.djcxy.com/p/71206.html上一篇: 等距地图渲染错误