+ 3
1-
if u dont want it to go outside of the div
just add
//left
if(f>0)
f--;
and
//right
if(f>=widthof the div)
f++;
and
//up
if(t>0)
t--;
//down
if (t<=height of div)
t++;
2-
on css
add
body{
user-selection:none;
}
to not select the text in the buttons
3-
its better to use canvas for games
+ 3
Here you will find something similar:
https://www.w3schools.com/graphics/game_intro.asp
+ 2
Arjun Dawande
That all you can learn in Sololearns game development with Javascript.
+ 2
Arjun Dawande You go to section Learn, then click on selection above and click on âdiscover all coursesâ to see all offered courses.
Or click here:
https://sololearn.com/learn/courses/le-gamedev-with-js
+ 2
I can see that in Sololearns app. Did you try that in the app or in the website?
+ 2
Maybe the course was old and is in the meantime deleted.