I am creating an HTML5 race game with help of CSS & JS. But not sure how to make it fit for all devices, browser size and touch responsive.
You can help me with reference to below game codes I made. Even these doesn't work with touch and resize.
Wow, the platform games sound very fun, the kind of very very very addicting RPG game.
For the car racing game, i think you will an accelerate / decelerate function
so the transform should eat variable instead of constant,
when button pressed, acc++ up to a max, put into accelerate() and the transform (translate?) will be faster and faster, for decelerate, it's starts when buttonclick ends and keep calling itself until velocity is zero
Well in car racing game touch was the only issue. Though the code you provided only give me option to move the car left/right on each tap. though my track canvas is big and it works fine if I use arrow keys for left/right/up& down.
And I only reached 1st half of the platform game. it's a huge one. Trying to make it endless with multiple characters. I have sprite and everything ready. Just need to code. Touch will work as player only jumps.