Game where you need to maintain the ball on the screen for as long as possible by tilting the Core2. It utilizes MPU6050 sensor to read tilting value and refresh the ball position accordingly
To play:
- tilt the device
- it will be game over if the ball touch the screen border
- Press left button (button A to restart)
- Enjoy!
You can play around with several parameter to change the ball behaviour
Harder setting:
friction = 0.95 # Lower friction to reduce the rate of slowing down
scale_x = 30.0 # Increase scaling factor to make the ball more responsive to tilt
scale_y = 30.0
Parameters
ball_radius = 15update_interval = 0.0000001 # 10 ms for faster refresh rate
velocity_x = 0
velocity_y = 0
friction = 0.90 # Lower friction to reduce the rate of slowing down
scale_x = 4.0 # Increase scaling factor to make the ball more responsive to tilt
scale_y = 4.0 # Increase scaling factor to make the ball more responsive to tilt
You can find more simple games for M5Stack Core2 here:
gunpowder003/M5Stack-Core2: Source code for python program for M5Stack Core2
Gameplay demo:
Comments