What is the code to move an object left to right of the screen? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the code to move an object left to right of the screen?

I need the code for a game in development with my partner Ian. (not IRL, clean your heads)

20th Jan 2017, 12:27 PM
CzarCoder
CzarCoder - avatar
5 Answers
+ 5
Wich language? You can use linear movement with constant speed or sinusoidal movement. For second one just get center of screen, then use (Math.sin(timePassed) + 1) * center
20th Jan 2017, 12:35 PM
WittyBit
WittyBit - avatar
+ 4
@CzarCoder. Hehe {:D I'm learning at scool too, like a lot of users here
20th Jan 2017, 9:53 PM
WittyBit
WittyBit - avatar
+ 1
I will do it
20th Jan 2017, 9:39 PM
Ian
Ian - avatar
0
js,HTML,css
20th Jan 2017, 12:36 PM
CzarCoder
CzarCoder - avatar
0
OK thank you, sorry for the late reply, school you know?
20th Jan 2017, 5:10 PM
CzarCoder
CzarCoder - avatar