Motion Sensor Based Ping Pong Game Tutorial For #Delphi Firemonkey On Android And IOS


Building games with Delphi Firemonkey is pretty straight forward and I found a simple beginners tutorial over on YouTube that demonstrates using the motion sensor in your mobile device to create a ping pong style game using simple objects. A game loop is created using a few TTimers and then the motion sensor is used to move paddles at the bottom of the screen back and forth. For a more advanced version you would really only need one timer. A ball (actually a TRectangle) bounces around the screen and off of the paddles. The tutorial itself is written in Polish but the code is easily understandable and you can run a translator like Google Chrome against it for an English version. The tutorial was built in Delphi XE7 but the code should be the same in Delphi XE8. There is a video that demonstrates the end result below. The code should work on Android, IOS, OSX, and Windows. Additionally, you should be able to follow the tutorial in Appmethod and C++Builder as well.
Head over and check out the full tutorial for building a motion sensor based ping pong game in Delphi Firemonkey.

As a follow up here is a video tutorial of building a 3D ping pong game with Delphi Firemonkey.

Comments are closed.