Tag Info

New answers tagged

5

There's no clearly "most common" position beside one the four corners. If you an information band/ribbon/... you typically want to embed it in your information ribbon, and leave the viewport as clean as possible. Since it's usually one of the biggest and more visual element to display in a HUD, you often want to push it to the corner to avoid it to be too ...


0

(A) If you need the countries to be sprites I would try this: Make the sprite for each country just big enough to contain them Make a UIBezierPath for each country and save that as a property of the country Use containsPoint in the touchesBegan of each country to check if touch is inside (B) If you don't have to use SpriteKit (for this particular part) ...


0

You can accomplish this with CanvasRenderingContext2D's methods setTransform, save, and restore. Together they allow you to create a draw transform stack, which permits you to draw all your tiles at their (unchanging) world position, but have them move around on screen. If you have a position of the left-top world-position of your viewport, you can create ...


0

If I understand the question correctly, you want a camera that you can move, which is not a standard with vanilla canvas. To emulate this, you should create two variables for the x and y position of the camera. You can then manipulate these values for instance if you want the camera to move when the player moves. To make all your scenes objects act properly ...



Top 50 recent answers are included