1
\$\begingroup\$

I will try and explain this as simple as I can, let me know if you need more details and I'll edit the text.

Imagine a simple gravity-enabled 2D-game with a ball inside a room where the objective is to prevent the ball from hitting the walls of the room while the room itself is tilting from side to side. As a player you can control the ball left or right. The game is over when the ball hits one of the walls.

I have been trying to think of a way to have the ball (entity) react to the tilt of the room (canvas), specifically how to manage the acceleration, velocity and movement of the entity in respect to the tilt, but I haven't been able to find a suitable plugin or solution to this. Has anyone tried implementing this? How do you handle acceleration, velocity and movement, and would you implement the tilt in the canvas, a room entity or something else?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.