hi, im trying to make a html5 cpps (Club Penguin Private Server), do any know how to make a online game and a way that you can move clicking to a place?
there is not really a way to make multiplayer games in wick (according to me) but you can make the move by clicking but i just don’t know bcus i’m dumb
when the mouse is pressed you read the Mouse.X and Mouse.Y and store them in two variables (let’s call it destination_x_position and destination_y_position )
Now, at every frame refresh, you check if your player clip positions are the same as those stored in the variables
If not it need to move to reach destination positions
The easier way is to have your player move every frame the same amount on the x and/or the y.
This is not correct but is good enough for a simple game.
A more precise movement requires trigonometry