I
I
ivankirshin2018-05-24 19:27:54
JavaScript
ivankirshin, 2018-05-24 19:27:54

How to cut an image into many parts?

Need to make a puzzle game. Accordingly, the application must first break the picture into parts.
The first thing that comes to mind is to create blocks of the right size and adjust the background position.
But something tells me that this is not the best solution) How would you do it in terms of design and performance? I have never dealt with Canvas, as far as I understand, it can help here too

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-05-24
@ivankirshin

The first thing that comes to mind is to create blocks of the right size and adjust the background position.
But something tells me that this is not the best solution

Normal solution . Simple and short.
How would you do it in terms of design and performance?

What do you mean by "design position" I have no idea, but as for performance - first you should do it somehow, then you will be engaged in optimization (if necessary).
I have never dealt with Canvas, as far as I understand, it can help here too

Maybe. But what then does Vue, specified by you in the tags, have to do with it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question