I’m new in java gaming development and I’m trying to make rpg game based on tiles.
I’m at the stage of drawing scenes on the screen. Some of the elements I draw with tiles (such as grass, trails, etc), and other elements I just draw the hole picture using Java objects that I create and for each object I fit an image and location (eg house, tree, people, etc.).
Now when I try to manage the order of drawing objects, to give the illusion of depth, I encounter the next dilemma - when is it better to paint a full picture and when is it better to use tiles? I’ll clarify the question - when it comes to objects it’s an easy task - I sort by the y position and then draw them. But with tiles it is very inefficient because there are many of them. For example, I want to draw a partition in a room, in all its width. On the one hand with tiles it is more simple and logical than creating “partition” object just for this room, but on the other hand, with tiles I can not get the depth effect (for example if the player is behind the partition).
Do you have any tips on this? About the combination of painting with tiles and the whole images of objects.