Answer the question
In order to leave comments, you need to log in
JS / How to make background in 2d game?
Classic background in 2d games, background 40000x650px (png) should move to the left in 2 minutes. Play in full browser screen.
I tried to animate via
css: left:-40000 and transition:120,
animate, setinterval, tweenmax,
canvas (here the max size is about 32000, but even at 8k you can see the brakes)
split into 10 blocks of 4000px each, and tried to scroll them
Problem: A little twitching , it is clear that the animation is not smooth, and it is clear that this is not a framerate problem, all these jerks are not uniform.
How is it generally right to do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question