Sure! Here's a simple implementation of the game you described using JavaScript and HTML:
To play the game, simply open the HTML file in a web browser on your smartphone. Tapping the screen will cause the square to jump, and you need to jump over the triangles and avoid falling into the pit while collecting 3 star coins to complete the level.