As an AI text-based model, I can provide you with a basic structure and code snippet to get started on building a game based on your description. However, please note that building a fully functional game as requested might go beyond the scope of a single HTML file and script tags. Additionally, creating game assets like pictograms is not possible through this text-only interface. Nonetheless, I'll provide a simple example of a game implementation using JavaScript and HTML.
This code sets up a basic game where the player moves a blue square (representing a cup) using the device's motion. The objective is to avoid colliding with red squares (representing sand cubes) while collecting green squares (representing cups). The score is displayed at the top left corner. If a collision with a cube occurs, the game is over, and the score is shown in an alert box.
Please note that this code only provides a starting point for your game. You can enhance and modify it according to your specific requirements to make it more appealing and feature-rich.